# mcp-proxy — Bridge MCP Stdio to HTTP/SSE > mcp-proxy exposes stdio-based MCP servers over HTTP/SSE, so you can route tools across clients and environments without rewriting servers. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Install (PyPI): ```bash pipx install mcp-proxy ``` 2. Smoke test: ```bash mcp-proxy --help ``` 3. Verify: - Configure one named server and confirm the proxy forwards requests to the underlying stdio server. ## Intro mcp-proxy exposes stdio-based MCP servers over HTTP/SSE, so you can route tools across clients and environments without rewriting servers. - **Best for:** teams standardizing MCP deployments who need a thin proxy layer for routing - **Works with:** MCP servers using stdio transport; clients/environments that prefer HTTP/SSE - **Setup time:** 15–40 minutes ## Practical Notes - Quant: start with 1 server and measure end-to-end tool latency before proxying vs after. - Quant: define a timeout budget (e.g., 10–30s) per tool call to avoid stuck runs. ## When a proxy helps Use a proxy when you need: - a stable network endpoint, - centralized logging/limits, - or to share a single MCP server across multiple clients. ## Ops checklist - Pin the proxy version. - Run it behind a local firewall/VPN if tools are sensitive. - Log requests at the boundary (but redact secrets). The goal is to keep MCP servers simple (stdio) while making deployment and routing easier. ### FAQ **Q: Do I have to use pipx?** A: No. The README also mentions `uv tool install` and container images; choose what fits your environment. **Q: What transport does it help with?** A: It’s designed to bridge stdio-based servers to network-friendly HTTP/SSE forms. **Q: How do I keep it safe?** A: Keep it off public networks unless you add auth and strict allowlists; redact secrets in logs. ## Source & Thanks > Source: https://github.com/sparfenyuk/mcp-proxy > License: MIT > GitHub stars: 2,507 · forks: 233 --- ## 快速使用 1. 安装(PyPI): ```bash pipx install mcp-proxy ``` 2. 冒烟测试: ```bash mcp-proxy --help ``` 3. 验证: - 配置一个 named server,确认代理能把请求转发到原始 stdio server。 ## 简介 mcp-proxy 可以把基于 stdio 的 MCP server 转接到 HTTP/SSE 形式,便于你在不同客户端与环境间路由/复用工具;无需重写 server,就能把接入方式做成可部署的网关形态。 - **适合谁:** 在统一 MCP 部署形态、需要轻量代理做路由的团队 - **可搭配:** 使用 stdio transport 的 MCP servers;以及更偏好 HTTP/SSE 的客户端/环境 - **准备时间:** 15–40 分钟 ## 实战建议 - 量化建议:先接 1 个 server,对比代理前后端到端工具调用延迟。 - 量化建议:为每次工具调用设定超时预算(如 10–30s),避免长时间卡死。 ## 什么时候需要代理 当你需要: - 稳定的网络入口、 - 集中的日志/限流、 - 或让多个客户端共享同一个 MCP server 时,代理层很有价值。 ## 运维清单 - 固定 proxy 版本。 - 工具敏感时放在内网/VPN 后。 - 在边界处记录请求(但必须脱敏)。 目标是让 MCP server 继续保持简单(stdio),把部署与路由复杂度移到代理层。 ### FAQ **必须用 pipx 吗?** 答:不必须。README 也提到 `uv tool install` 与容器镜像,按环境选择即可。 **主要解决什么传输问题?** 答:把 stdio server 变成更易部署/路由的 HTTP/SSE 形态。 **怎么保证安全?** 答:不建议直接暴露公网;加认证与白名单,并对日志脱敏。 ## 来源与感谢 > Source: https://github.com/sparfenyuk/mcp-proxy > License: MIT > GitHub stars: 2,507 · forks: 233 --- Source: https://tokrepo.com/en/workflows/mcp-proxy-bridge-mcp-stdio-to-http-sse Author: MCP Hub