13 Commits

Author SHA1 Message Date
knaou
cd13624f7b feat: support env field in config file (#79) 2025-06-28 11:54:38 +02:00
Sam
b25056fadd feat: support proxying multiple MCP stdio servers to SSE (#65)
This PR adds support for running multiple MCP (STDIO) servers and
serving them up via a single mcp-proxy instance, each with a named path
in the URL.

Example usage:

```
mcp-proxy --port 8080 --named-server fetch 'uvx mcp-server-fetch' --named-server github 'npx -y @modelcontextprotocol/server-github'
```

Would serve:

- `http://localhost:8080/servers/fetch`
- `http://localhost:8080/servers/github`

I've also added the ability to provide a standard mcp client config file
with accompanying tests.

Please feel free to make any changes as you see fit, or reject the PR if
it does not align with your goals.

Thank you,

---------

Co-authored-by: Magnus Tidemann <magnustidemann@gmail.com>
Co-authored-by: Sergey Parfenyuk <sergey.parfenyuk@gmail.com>
2025-05-27 11:48:25 +02:00
caydenwei
2980a50ad2 feat: support passing 'stateless' and 'cwd' arguments (#62)
1. Add support for --stateless parameter configuration
2. Add support for --cwd parameter passing working directory to mcp
stdio server
3. Use StreamableHTTPSessionManager from the latest python-mcp-sdk
release to manage sessions, simplifying code
4. Optimize test cases
2025-05-11 13:26:37 +02:00
caydenwei
8fee3d9833 feat: support streamable http proxy (#60) 2025-05-09 19:03:26 +02:00
Sergey Parfenyuk
357c8c23f0 feat: support --debug argument for verbose output (#47)
Closes #34
2025-04-13 11:55:10 +02:00
Sergey Parfenyuk
79670a4afa chore: bump all deps (#38) 2025-03-25 09:38:18 +01:00
Fedir Zadniprovskyi
209268a361 feat: expose CORS configuration (#31)
Allow specifying CORS configuration so that a client can call the proxy from a different host/port.

Co-authored-by: Fedir Zadniprovskyi <github.g1k56@simplelogin.com>
Co-authored-by: Sergey Parfenyuk <myseverality@gmail.com>
2025-03-05 18:10:15 +01:00
Allen Porter
44b09ec954 feat: serve a SSE server proxying a STDIO server (#8)
* 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 <guillaume.raille@gmail.com>
2024-12-31 19:08:31 +01:00
Allen Porter
8423905ca2 refactor: separate client and proxy server in preparation for more client behaviors (#7)
* Refactor to separate client and proxy server in preparation for more client behaviors

* Fix incorrect package names
2024-12-31 10:10:33 +01:00
Sergey Parfenyuk
5ddc091caf tests: increase coverage to 84% (#4) 2024-12-29 12:05:56 +01:00
Sergey Parfenyuk
5aa016ea37 chore: add pre-commit hooks
Enable ruff linter and formatter
Resolve findings
Remove tests/__init__.py as unused
Bump version to 0.2.0
2024-12-28 22:34:53 +01:00
Allen Porter
728404641b Update tests to exercise client behavior 2024-12-28 11:39:20 -08:00
Allen Porter
b59f34e855 Add basic test for mcp-proxy 2024-12-28 09:20:17 -08:00