About Fastmcp Proxy Bridge
Fastmcp Proxy Bridge is an MCP server in the Browser category.
Install
git clone https://github.com/jussker/fastmcp_proxy_bridgeThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Fastmcp Proxy Bridge
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
fastmcp-proxy-bridge
基于 fastmcp 的 SSE → STDIO 透明代理。让只支持本地 STDIO MCP 的客户端(Claude Code / Cursor / VS Code MCP 插件等)可以配置 HTTP_PROXY 后,访问远程 SSE + /mcp 服务。
特性
- 0 自行协议实现:直接复用 fastmcp
SSETransport+FastMCP.as_proxy()。 - Header 模板 + 环境变量占位
${VAR}动态注入(MCP_HEADER_TEMPLATE/MCP_HEADER_FILE)。 - 多次
--header k=v追加覆盖。 - 支持通过
--proxy/--socks或标准HTTP_PROXY与HTTPS_PROXY/ALL_PROXY代理。 - 与 fastmcp 安装器兼容:导出模块级
mcp变量。
安装(本地开发)
uv pip install git+https://github.com/jussker/fastmcp_proxy_bridge.git
或者
git clone https://github.com/jussker/fastmcp_proxy_bridge.git
uv pip install -e ./fastmcp_proxy_bridge
运行示例
或通过 VS Code .vscode/mcp.json:
"jina-mcp-server-py": {
"command": "uv",
"args": ["run","python","-m","fastmcp_proxy_bridge.bridge"],
"env": {
"JINA_API_KEY": "${input:jina-key}",
"MCP_REMOTE_SSE": "https://mcp.jina.ai/sse",
"MCP_HEADER_TEMPLATE": "{\"Authorization\":\"Bearer ${JINA_API_KEY}\"}",
"HTTP_PROXY": "http://127.0.0.1:8890",
"HTTPS_PROXY": "http://127.0.0.1:8890"
}
}
变量与解析流程
- 读取
--header-template或MCP_HEADER_TEMPLATEJSON。 apply_env()用正则替换${VAR}。- 合并
--header追加项。 - 生成
SSETransport(headers=...)供 MCP 会话使用。
代理行为
- 若传
--proxy且未显式设置HTTP_PROXY/HTTPS_PROXY,则写入二者。 - 若传
--socks且未设置ALL_PROXY,则写入ALL_PROXY。 - httpx(fastmcp 底层)默认
trust_env=True自动读取这些变量。
CLI 启动
安装后可直接:
fastmcp-proxy-bridge --sse https://example.com/sse \
--header-template '{"Authorization":"Bearer ${TOKEN}"}'
或使用 uv run:
uv run fastmcp-proxy-bridge --sse https://example.com/sse
License
MIT License
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.