MCP server proxy

by 12beam

1 stars
379 downloads
Not rated
GitHub

About

Extend MCP server functionality to work as a worker

Details

Author
12beam
GitHub stars
1
Downloads
379
Categories
Developer Tools

- Provides the proxyMessage function for forwarding MCP messages.
- Integrates seamlessly with standard MCP Server instances.
- Shown in a Cloudflare Worker (WorkerEntrypoint) example.
- Lightweight and focused solely on message proxying.

Install the @contextdepot/mcp-proxy package, import the proxyMessage function, create an MCP Server instance, then call proxyMessage(server, requestMessage) inside a message handler. Configuration follows the usual MCP server setup; the example shows a Cloudflare Worker entrypoint that delegates incoming requests to the proxy.

MCP server proxy

Use proxyMessage to pass a message to an existing MCP server:

import { proxyMessage } from '@contextdepot/mcp-proxy/dist/index.js'

// create server and configure handlers
const server = new Server(..);
..

export default class extends WorkerEntrypoint {
// send message to the server
async message(requestMessage): Promise<void> {
return proxyMessage(server, requestMessage)
}
};

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.