@pzerofoundry/mcp-bridge
v0.1.4
Published
Universal stdio-to-Streamable-HTTP bridge for FastMCP and GTM servers
Maintainers
Readme
@pzerofoundry/mcp-bridge
Universal stdio-to-Streamable-HTTP bridge for FastMCP and GTM servers.
Translates local JSON-RPC communication over stdin/stdout into authenticated MCP Streamable HTTP requests routed through Cloudflare Worker MCP Gateways and remote FastMCP servers. The legacy SSE transport (/sse + /messages/) is not supported; point --endpoint at the server's /mcp path.
Key Features
- Zero Configuration for IDEs: Allows Claude Desktop, Cursor, and Codex to connect to remote GTM MCP servers via standard
mcpServersconfiguration. - Strict Secret Hygiene: Rejects API keys passed via CLI arguments to prevent process-table credential leaks (
ps/top). EnforcesGTM_API_KEYvia environment variables only. - Graceful Error Mapping: Intercepts HTTP 401 (Invalid Key) and HTTP 402 (Payment Required) and translates them into standard JSON-RPC errors (
code: -32000) so IDEs show readable warnings — with the gateway's top-up link when it sends one — instead of crashing.
Usage
Desktop Configuration (Claude Desktop / Cursor)
Add to your claude_desktop_config.json or .cursor/mcp.json:
{
"mcpServers": {
"gtm-agent": {
"command": "node",
"args": ["packages/mcp-bridge/dist/cli.js", "--endpoint", "https://mcp.example.com/mcp"],
"env": {
"GTM_API_KEY": "sk-your-workspace-api-key"
}
}
}
}Or via zero-install npx (once published):
{
"mcpServers": {
"gtm-agent": {
"command": "npx",
"args": ["-y", "@pzerofoundry/mcp-bridge", "--endpoint", "https://mcp.example.com/mcp"],
"env": {
"GTM_API_KEY": "sk-your-workspace-api-key"
}
}
}
}