| Crates.io | mcpproxy |
| lib.rs | mcpproxy |
| version | 0.2.1 |
| created_at | 2025-08-14 18:45:45.791045+00 |
| updated_at | 2025-08-14 18:45:45.791045+00 |
| description | MCP proxy server for remote HTTP endpoints supporting JSON and Server-Sent Events |
| homepage | https://github.com/sutterhill/agentdb/tree/main/mcpproxy |
| repository | https://github.com/sutterhill/agentdb |
| max_upload_size | |
| id | 1795274 |
| size | 77,174 |
A local stdin/stdout MCP (Model Context Protocol) server that proxies requests to a remote MCP server over HTTP.
This tool acts as a bridge between MCP clients that expect a local stdin/stdout interface and remote MCP servers that communicate over HTTP. It reads JSON-RPC requests from stdin, forwards them to the configured remote server, and writes the responses back to stdout.
# Global installation
npm install -g @agentdb/mcpproxy
# Or use with npx (no installation required)
npx @agentdb/mcpproxy --url https://your-server.com/mcp
cargo install mcpproxy
cargo build --release
./target/release/mcpproxy --url https://your-remote-mcp-server.com/mcp
./target/release/mcpproxy --url https://your-remote-mcp-server.com/mcp --token your-auth-token
--url, -u: Remote MCP server URL to proxy to (required)--token, -t: Optional authentication token for the remote serverContent-Type: application/jsonAccept: application/json, text/event-streamAuthorization: Bearer <token> (if token provided)Standard single JSON-RPC response from the remote server.
When the remote server responds with Content-Type: text/event-stream, the proxy:
data: ... lines)The proxy handles standard JSON-RPC 2.0 messages:
{
"jsonrpc": "2.0",
"method": "method_name",
"params": {...},
"id": 1
}
{
"jsonrpc": "2.0",
"result": {...},
"id": 1
}
{
"jsonrpc": "2.0",
"error": {
"code": -32603,
"message": "Internal error",
"data": "Additional error details"
},
"id": 1
}
-32700: Parse error (invalid JSON)-32603: Internal error (network or server errors)# Using npm package
npx @agentdb/mcpproxy --url https://api.example.com/mcp --token abc123
# Or if globally installed
mcpproxy --url https://api.example.com/mcp --token abc123
# Test with a simple request
echo '{"jsonrpc":"2.0","method":"ping","id":1}' | npx @agentdb/mcpproxy --url https://api.example.com/mcp
{
"mcpServers": {
"agentdb-remote": {
"command": "npx",
"args": [
"-y", "@agentdb/mcpproxy",
"--url", "https://your-agentdb-server.com/mcp",
"--token", "your-auth-token"
]
}
}
}
{
"mcpServers": {
"agentdb-remote": {
"command": "mcpproxy",
"args": [
"--url", "https://your-agentdb-server.com/mcp",
"--token", "your-auth-token"
]
}
}
}
cargo build
cargo test
RUST_LOG=debug cargo run -- --url https://your-server.com/mcp
tokio: Async runtimereqwest: HTTP client with streaming supportserde/serde_json: JSON serializationclap: Command line argument parsinganyhow: Error handlingfutures-util: Stream processing for event streamstokio-util: Additional utilities for async I/OThis project is licensed under the MIT License.