Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

open-mcp-proxy

MCP.Pizza Chef: grll

Open MCP Proxy is a simple, lightweight, and open-source bidirectional proxy designed for MCP servers. It supports both Server-Sent Events (SSE) and STDIO protocols, enabling seamless communication between MCP clients and servers that use different protocols. The proxy exposes callbacks for custom logic implementation during the MCP protocol lifecycle, making it highly extensible. It leverages the official mcp-python-sdk to ensure simplicity, maintainability, and future-proofing. Open MCP Proxy comes in two versions to support either SSE or STDIO, allowing clients like the Claude Desktop App (which supports only stdio) to interact with SSE-based MCP servers.

Use This MCP server To

Enable MCP clients with stdio to communicate with SSE servers Implement custom logic during MCP protocol lifecycle Bridge MCP servers and clients using different protocols Lightweight proxy for MCP server communication Extend MCP server functionality with callback hooks

README

Open MCP Proxy

A simple and lightweight open-source bidirectional proxy for MCP servers.

It exposes several callbacks that you can use to implement your own logic and do your own actions during the MCP protocol lifecycle.

It supports both SSE and STDIO protocols so it can be used to enable MCP Client supporting only stdio (like the Claude Desktop App) to also support SSE.

It leverages as much as possible the official mcp-python-sdk to remains simple, lightweight and future-proof.

it declines in 2 versions to support both SSE and STDIO protocols:

SSE Proxy

graph LR
    STDIN -->|stdio| Proxy[Open MCP Proxy]
    Proxy -->|SSE| Server[Remote MCP Server]
Loading
graph RL
    Server[Remote MCP Server] -->|SSE| Proxy[Open MCP Proxy]
    Proxy -->|stdio| STDOUT
Loading

STDIO Proxy

graph LR
    STDIN -->|stdio| Proxy[Open MCP Proxy]
    Proxy -->|stdio| Server[Local MCP Server]
Loading
graph RL
    Server[Local MCP Server] -->|stdio| Proxy[Open MCP Proxy]
    Proxy -->|stdio| STDOUT
Loading

Note that in both cases the proxy listen to STDIN and write to STDOUT to work seemlessly with stdio MCP Clients.

Usage

Hook into the MCP protocol lifecycle

The recommended approach to hook into the MCP protocol lifecycle is to subclass one of the Proxy class that we expose and override the callback methods you need.

At the moment, we expose 4 callback methods:

Method Description Parameters
_on_mcp_client_message Can be used to handle messages from the MCP client message: JSONRPCMessage
_on_mcp_server_message Can be used to handle messages from the MCP server message: JSONRPCMessage | Exception
_on_start Can be used to handle the start of the proxy None
_on_close Can be used to handle the close of the proxy None

For example if you need a proxy over the stdio protocol:

from omproxy.proxy import StdioProxy

class MyStdioProxy(StdioProxy):
    def _on_start(self):
        print("Starting proxy", file=sys.stderr)

    def _on_mcp_client_message(self, message: JSONRPCMessage):
        print(message, file=sys.stderr)

    def _on_mcp_server_message(self, message: JSONRPCMessage | Exception):
        print(message, file=sys.stderr)

    def _on_close(self):
        print("Closing proxy", file=sys.stderr)

if __name__ == "__main__":
    proxy = MyStdioProxy()
    proxy.run(StdioServerParameters(command="uv", args=["run", "src/example_server.py"]))

tip: dont write to stdout in your callbacks or anywhere really as it will mess with the stdio MCP communication.

MCP Client supporting only STDIO to your SSE MCP Server

We provide a simple CLI to start the proxy if you have an SSE MCP server running and you want to make it available to an MCP Client supporting only stdio you can simply do:

uvx omproxy@latest sse --url https://yourssemcpserver.io

see uvx omproxy@latest sse --help for more information including setting headers for authorization for example.

open-mcp-proxy FAQ

How does Open MCP Proxy support both SSE and STDIO protocols?
It provides two versions—one for SSE proxying and one for STDIO proxying—allowing bidirectional communication between MCP clients and servers using either protocol.
Can I add custom logic during the MCP protocol lifecycle with Open MCP Proxy?
Yes, the proxy exposes several callbacks that let you implement your own actions and logic during the MCP protocol lifecycle.
Is Open MCP Proxy compatible with existing MCP clients like Claude Desktop App?
Yes, it enables MCP clients that only support stdio, such as Claude Desktop App, to communicate with MCP servers using SSE.
What dependencies does Open MCP Proxy rely on?
It leverages the official mcp-python-sdk to remain simple, lightweight, and future-proof.
Is Open MCP Proxy suitable for production environments?
Yes, its lightweight design and protocol support make it suitable for production use cases requiring protocol bridging or custom MCP logic.
How do I deploy Open MCP Proxy?
You can deploy it as a standalone server that proxies MCP communication between clients and servers, supporting either SSE or STDIO protocols.
Does Open MCP Proxy support bidirectional communication?
Yes, it is designed as a bidirectional proxy to handle MCP traffic in both directions between clients and servers.