A lightweight proxy server that forwards MCP stdio protocol to streamable HTTP MCP servers with automatic reconnection support.
- 🔄 Auto-reconnection: Automatically reconnects to upstream MCP server on connection failure
- 📡 Protocol Bridge: Converts stdio MCP to streamable HTTP MCP
- 🪶 Lightweight: Minimal dependencies, single purpose
- 🚀 Easy to Use: Run with npx, no installation needed
- 📝 Optional Logging: Enable detailed logs when needed
No installation required! Use with npx:
npx mcp-ha-proxy --url http://localhost:3000Or install globally:
npm install -g mcp-ha-proxy
mcp-ha-proxy --url http://localhost:3000npx mcp-ha-proxy --url http://localhost:3000npx mcp-ha-proxy --url http://localhost:3000 --timeout 60000npx mcp-ha-proxy --url http://localhost:3000 --log-path ./logs/mcp.log| Option | Description | Required | Default |
|---|---|---|---|
--url <url> |
Upstream MCP server URL | Yes | - |
--timeout <ms> |
Request timeout in milliseconds | No | 120000 (2 minutes) |
--log-path <path> |
Log file path (logging disabled if not set) | No | - |
--help, -h |
Show help message | No | - |
Add to your Cursor MCP configuration (~/.cursor/mcp.json or workspace config):
{
"mcpServers": {
"my-remote-mcp": {
"command": "npx",
"args": [
"mcp-ha-proxy",
"--url",
"http://localhost:3000"
]
}
}
}npx mcp-ha-proxy --url https://my-mcp-server.example.comnpx mcp-ha-proxy \
--url http://localhost:3000 \
--timeout 30000 \
--log-path ./logs/debug.log┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Cursor │ stdio │ mcp-ha-proxy │ HTTP │ Upstream MCP │
│ or │◄───────►│ (stdio) │◄───────►│ Server │
│ MCP Client │ │ │ │ (streamable) │
└─────────────┘ └──────────────┘ └─────────────────┘
- Accepts MCP protocol via stdio (standard input/output)
- Forwards all requests to upstream HTTP MCP server
- Handles connection failures with automatic reconnection
- Returns responses back through stdio
- Node.js >= 18.0.0
MIT
Issues and pull requests are welcome!