Commit Graph

29 Commits

Author SHA1 Message Date
Sergey Parfenyuk
9dd600c61f docs: get rid of smithery (#112) 2025-09-23 09:14:55 +02:00
Rene Leonhardt
85bf96cb35 feat: docker image respects shutdown signals (#98)
### Features
- Docker image respects shutdown signals
- Improve Docker build and metadata
2025-09-22 07:59:46 +02:00
Baptiste Fontaine
7d71bd08ad feat: add --log-level option (#102)
Fixes https://github.com/sparfenyuk/mcp-proxy/issues/95

This adds the option `--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}`
to define the log level. If both `--debug` and `--log-level` are
provided, the former takes precedence.
2025-09-22 07:53:19 +02:00
Sergey Parfenyuk
e8ad1a0b9d feat: print version (#93) 2025-07-05 15:39:36 +02:00
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
Sergey Parfenyuk
f31cd3e73c feat: support streamable transport in client mode (#70)
When running in client mode, use `--transport=streamablehttp` to enforce the new communication method between `mcp-proxy` and remote MCP servers.
2025-05-26 09:50:35 +02:00
Magnuti
6a888cbe09 docs: README updates on --env
`--env` takes in `FOO BAR` and not `FOO=BAR`
2025-05-17 14:06:04 +02:00
Sergey Parfenyuk
774b4aaa2a chore: bump version 2025-05-13 08:44:49 +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
73e90cb649 Update README (#46)
Closes #42
2025-04-13 11:22:16 +02:00
Sergey Parfenyuk
79670a4afa chore: bump all deps (#38) 2025-03-25 09:38:18 +01:00
Sergey Parfenyuk
b4f35330f0 docs: use latest tag
skip-checks: true
2025-03-10 20:33:11 +01:00
Sergey Parfenyuk
78783f3aec docs: notes on docker-compose use 2025-03-05 18:28:12 +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
Ross Masters
cc8a4fac87 feat: Allow passing through all environment variables to server (#27)
This PR adds the ability to pass through all environment variables to
the server, using the flag `--pass-environment` (default off).

This change allows a compose spec like this to access all environment
variables from an env_file (as well as PATH):

```yaml
server-brave-search:
  image: mcp-proxy:latest
  env_file: .brave.env
  # ENTRYPOINT from custom SSE-only image, for context
  entrypoint: ["mcp-proxy", "--sse-host=0.0.0.0", "--sse-port=8080", "--pass-environment", "--"]
  command: ["npx", "--yes", "@modelcontextprotocol/server-brave-search"]
```

The motivation behind this is I am developing in Docker Compose, with a
custom client and multiple servers. I made a debian-based mcp-proxy
image, with an entrypoint that set some SSE settings. When it came to
adding brave search, I spent a bit of time struggling against var
interpolation and an overridden entrypoint (cause: you can't access env
vars in entrypoints, I think). I figured passing through all environment
variables would be easier (and safe in a container).

I started adding tests for this, but found myself refactoring
\_\_main\_\_.py quite a bit to make it more testable. I've left that for
now in the aim of an easy-to-review PR, but am happy to continue that
effort if you'd like? Essentially breaking out the argument parser and
the SSE client/server parts into functions and validating their config.

Thanks again for this tool - it's made adding support for stdio servers
in our client much easier!

---------

Co-authored-by: Sergey Parfenyuk <myseverality@gmail.com>
2025-03-01 00:03:30 +01:00
andersenthomas98
1de8394767 feat: support 'headers' argument for SSE server connection (#23)
I have replaced the `--api-access-token` argument with the more generic
`--headers` argument for SSE. This will allow for other auth mechanisms
such as api keys as well. Intended usage:

```sh
# API key
mcp-proxy http://example.io/sse --headers x-api-key my-super-secret-api-key

# Bearer token
mcp-proxy http://example.io/sse --headers Authorization 'Bearer my-super-secret-bearer-token'

# Multiple headers
mcp-proxy http://example.io/sse --headers Authorization 'Bearer my-super-secret-bearer-token' --headers x-api-key my-super-secret-api-key
```
2025-02-07 20:49:27 +01:00
Sergey Parfenyuk
da9cbf7386 docs: readme correction 2025-01-26 19:30:18 +01:00
Sergey Parfenyuk
b56e574cd9 docs: update README on how to use container 2025-01-26 19:24:59 +01:00
Sergey Parfenyuk
787ba896e7 chore: add Python 3.10 support (#17)
- Add badges
- Use codecov.io
- Change classifiers to include 3.10
2025-01-13 19:04:14 +01:00
Henry Mao
4cfe76a59a chore: add Smithery CLI installation instructions and badge (#12) 2025-01-02 21:25:12 +01:00
Sergey Parfenyuk
874ae38087 docs: update readme and --help output (#13)
* Refine CLI and reflect the change in the documentation
* Update README.md with concise examples
* Bump version

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2025-01-02 21:22:59 +01:00
Allen Porter
1b9880bc56 feat: add functionality to start an SSE server to proxy a local stdio server (#11)
* Add CLI for starting the SSE server

* Update README.md 

* Fix lint errors

* Update debug signature

* Minor fixes

---------

Co-authored-by: Sergey Parfenyuk <sergey.parfenyuk@gmail.com>
2025-01-01 09:50:52 +01:00
Sergey Parfenyuk
1b5b05b1ea docs: mention pypi package (#10) 2024-12-31 10:44:34 +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
30c874d4bb Add support for SSE level authentication
Fix syntax error in example json, and update the README with details.
2024-12-28 11:52:34 -08:00
Sergey Parfenyuk
6584ed47c6 feat: connect to remote servers with SSE 2024-12-26 22:02:55 +01:00