-
Notifications
You must be signed in to change notification settings - Fork 207
Add library for serving an sse server proxying a stdio server #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
this change is really great exactly what I wanted to do for: Claude Desktop App (MCP Client) <- stdio -> proxy MCP Server <- sse -> proxy MCP Client <-stdio -> actual MCP Server I think this is very useful until the Claude Dekstop App supports sse. My 2 cents:
|
Awesome, happy to collaborate here since i saw you have a similar project started. (I was going to start one also and joined this project too)
Yes, agreed. This PR is not changing the main function yet, just adding an internal library to get to that next step. A follow up PR has the main and README changes which i'll send out next: main...allenporter:mcp-proxy:sse-to-stdio-main
I ran ruff with your lint config change and it did not flag any issues. My impression is that google style allows either a single line or a detail line with a specific format https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings -- so single line should be ok. If you have a specific issue to point out feel free to make a suggestion and I can have a look. |
b18305b to
78d8d92
Compare
allenporter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated SseServerSettings and then rebased for the new code locations for the proxy server.
Co-authored-by: Guillaume Raille <[email protected]>
Yes indeed worked on that a while ago, my approach was a bit different though I made a proxy at the stream level so I didnt need to care about reimplementing the various server function to call the client within. I was just forwarding the streams it's working ok but having the function like @sparfenyuk did is quite nice to process already parsed object in the proxy. |
sparfenyuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @allenporter, looks awesome.
* Add library for serving an sse server proxying a stdio server * Change context manager for running server in the background thread * Fix lint errors in new test fixture * Update starlette response routing * Fix ruff format errors * Fix ruff format errors * Fix typos in SseServerSettigs * Rename host to bind host and update to localhost * Update for new import location * Update imports based on ruff rules * Update src/mcp_proxy/sse_server.py Co-authored-by: Guillaume Raille <[email protected]>
## 1.0.0 (2025-07-27) ### 🚀 Features * add CODEOWNERS file and improve PR validation workflow ([3100f27](3100f27)) * add functionality to start an SSE server to proxy a local stdio server ([#11](#11)) ([1b9880b](1b9880b)) * add support for SSE level authentication ([#2](#2)) ([abfb250](abfb250)) * Allow passing through all environment variables to server ([#27](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/27)) ([cc8a4fa](cc8a4fa)) * comprehensive project overhaul with semantic release and automation ([9575ed1](9575ed1)) * comprehensive project overhaul with semantic release and automation ([#1](#1)) ([11fad75](11fad75)) * connect to remote servers with SSE ([6584ed4](6584ed4)) * expose CORS configuration ([#31](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/31)) ([209268a](209268a)) * implement complete TODO functionality and fix repository corruption ([83522cd](83522cd)) * print version ([#93](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/93)) ([e8ad1a0](e8ad1a0)) * serve a SSE server proxying a STDIO server ([#8](#8)) ([44b09ec](44b09ec)) * simplify CODEOWNERS configuration for streamlined review process ([9abd444](9abd444)) * support --debug argument for verbose output ([#47](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/47)) ([357c8c2](357c8c2)), closes [#34](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/34) * support 'headers' argument for SSE server connection ([#23](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/23)) ([1de8394](1de8394)) * support env field in config file ([#79](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/79)) ([cd13624](cd13624)) * support multi-arch Docker image ([e6f9f3d](e6f9f3d)) * support passing 'stateless' and 'cwd' arguments ([#62](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/62)) ([2980a50](2980a50)) * support proxying multiple MCP stdio servers to SSE ([#65](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/65)) ([b25056f](b25056f)) * support streamable http proxy ([#60](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/60)) ([8fee3d9](8fee3d9)) * support streamable transport in client mode ([#70](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/70)) ([f31cd3e](f31cd3e)) ### 🐛 Bug Fixes * add COM812 to ruff ignore list to resolve formatter conflict ([649eb1b](649eb1b)) * add command shortcut ([c07d479](c07d479)) * add workflow permissions ([c1edc1f](c1edc1f)) * annotate multi-arch image before pushing to ghcr ([b84e774](b84e774)) * connect other github actions with mypy job ([#14](#14)) ([e095434](e095434)) * correct debug logging typo ([#68](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/68)) ([27a1627](27a1627)) * correct JSON syntax error in semantic release configuration ([0304339](0304339)) * disable redirect to trailing slashes ([#89](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/89)) ([73d6d79](73d6d79)) * explicitly activate virtual environment in Docker entrypoint ([c072a3b](c072a3b)) * finalize Docker configuration for reliable module execution ([de93dd8](de93dd8)) * missing slash on SSE /messages path ([#71](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/71)) ([90134a9](90134a9)) * nonetype is not callable ([#92](https://github.com/billyjbryant/mcp-foxxy-bridge/issues/92)) ([5f1d4de](5f1d4de)) * repair broken Python symlinks in virtual environment ([6c6cf16](6c6cf16)) * resolve all GitHub Actions workflow failures ([4d94be7](4d94be7)) * resolve all ruff linting errors and enhance pre-commit setup ([1b9d93a](1b9d93a)) * resolve critical workflow failures ([827bd6f](827bd6f)) * resolve GitHub Actions workflow failures ([8d0d714](8d0d714)) * resolve remaining GitHub Actions workflow failures ([69e9a88](69e9a88)) * resolve test failures and version configuration ([323c492](323c492)) * resolve test-docker and validate-pr workflow failures ([06b10b1](06b10b1)) * resolve workflow failures and add comprehensive pre-commit hooks ([404eb1b](404eb1b)) * use installed console script for Docker entrypoint ([88a6802](88a6802)) * use virtual environment python in Docker entrypoint ([98d3e6c](98d3e6c)) ### 📚 Documentation * mention pypi package ([#10](#10)) ([1b5b05b](1b5b05b)) * notes on docker-compose use ([78783f3](78783f3)) * readme correction ([da9cbf7](da9cbf7)) * README updates on --env ([6a888cb](6a888cb)) * update documentation with workflow status ([f54a9cd](f54a9cd)) * update readme and --help output ([#13](#13)) ([874ae38](874ae38)) * update README on how to use container ([b56e574](b56e574)) * use latest tag ([b4f3533](b4f3533))
Add library for serving an sse server proxying a stdio server. This is a building block to enable powering connections in the opposite direction.
The motivation is I want to make Home Assistant an MCP client. By adding this functionality, we can allow users to use MCP proxy to start local servers that are stdio only.
This does not add the command line options yet, which can come in a follow up PR and will need more discussion about how to serve both use cases in a friendly way.