Analytics proxy for Model Context Protocol servers. Transparent middleware that collects metrics without code changes.
go install github.com/sirrobot01/mcpulse-proxy@latest
Or build from source:
go build -o mcpulse-proxy .
mcpulse-proxy stdio [OPTIONS] # Local stdio server
mcpulse-proxy sse [OPTIONS] # Remote SSE server
mcpulse-proxy http [OPTIONS] # Remote HTTP server
Local stdio server:
mcpulse-proxy stdio --server-id my-server --command "python server.py"
Remote HTTP server:
mcpulse-proxy http --server-id my-server \
--remote-url https://api.example.com/mcp \
--bearer-token your_token
Expose as HTTP (with auth mirroring):
mcpulse-proxy stdio --server-id my-server \
--command "python server.py" \
--bearer-token secret123 \
--listen :8080
Using config file:
mcpulse-proxy stdio --config mcp.json --server my-server
Server Configuration:
--server-id
- Unique server identifier (required)--mcpulse-url
- MCPulse gRPC endpoint (default: localhost:50051)--mcpulse-api-key
- MCPulse API key
Upstream Connection:
--command
- Command to execute upstream server (stdio mode)--remote-url
- Remote server URL (sse/http mode)--bearer-token
- Bearer token for upstream auth--auth-token
- Alias for bearer-token--headers
- Custom headers (format: "Key:Value,Key2:Value2")
Output Mode:
--listen
- Listen address for HTTP output (e.g., ":8080")
Config File:
--config
- Path to mcp.json file--server
- Server name from config file
MCPulse config (use directly):
MCPULSE_URL
orMCPULSE_SERVER
- MCPulse endpointMCPULSE_API_KEY
- API key
Proxy config (use MCPULSE_PROXY_ prefix):
MCPULSE_PROXY_SERVER_ID
- Server IDMCPULSE_PROXY_COMMAND
- Command to runMCPULSE_PROXY_REMOTE_URL
- Remote URLMCPULSE_PROXY_BEARER_TOKEN
- Bearer tokenMCPULSE_PROXY_HEADERS
- Custom headersMCPULSE_PROXY_LISTEN
- Listen address
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"my-server": {
"command": "mcpulse-proxy",
"args": [
"stdio",
"--server-id", "my-server",
"--command", "python server.py"
],
"env": {
"MCPULSE_URL": "localhost:50051",
"MCPULSE_API_KEY": "your-api-key",
"API_KEY": "your-server-api-key"
}
}
}
}
When --listen
is set with --bearer-token
, the proxy HTTP endpoint requires the same token. This mirrors upstream auth to the output.
# Upstream and output both use same token
mcpulse-proxy http --server-id my-server \
--remote-url https://api.example.com/mcp \
--bearer-token secret123 \
--listen :8080
Same as MCPulse project