Open MCP Proxy: a simple and lightweight python MCP proxy implementation #132
grll
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pre-submission Checklist
Discussion Topic
I have been wrapping my head around designing a good and simple python MCP proxy that would allow to write and execute code in callbacks during the MCP protocol lifecycle for a while now.
I am finally happy with the design so I am introducing Open MCP Proxy: https://github.com/grll/open-mcp-proxy. It's a simple MCP proxy that allows you to do 2 things for now:
register callbacks during the lifecycle of the MCP protocol to do any actions you wish at specific times.
convert a STDIO only MCP Client like the Claude Desktop App into a SSE enabled MCP Client.
It leverages as much as possible the official mcp-python-sdk to minimize the codebase and in an attempt to be somewhat future proof.
In my reflexion for a better solution I took inspiration from https://github.com/sparfenyuk/mcp-proxy have a look if you are interested. The core difference is that in sparfenyuk implementation he implements a whole MCP client within the proxy to handle the communication with the MCP server while I prefer to just forward the messages from the original MCP client which in my humble opinion is less error-prone but also a lot less to implement on the proxy side.
Hope you enjoy, let me know if any questions or feedbacks!
Beta Was this translation helpful? Give feedback.
All reactions