| Crates.io | mcp-stdio-proxy |
| lib.rs | mcp-stdio-proxy |
| version | 0.1.27 |
| created_at | 2025-12-16 06:17:24.150762+00 |
| updated_at | 2026-01-11 18:35:23.657779+00 |
| description | MCP (Model Context Protocol) proxy server and CLI tool for protocol conversion and remote service access |
| homepage | |
| repository | https://github.com/nuwax-ai/mcp-proxy |
| max_upload_size | |
| id | 1987311 |
| size | 513,825 |
MCP (Model Context Protocol) client proxy tool that converts remote MCP services (SSE/Streamable HTTP) to local stdio interface.
Package Name:
mcp-stdio-proxyCommand Name:mcp-proxy(shorter)
mcp-proxy is a lightweight client proxy tool that solves one core problem:
Enabling stdio-only MCP clients to access remote SSE/HTTP MCP services.
Remote MCP Service (SSE/HTTP) ←→ mcp-proxy ←→ Local Application (stdio)
cargo install mcp-stdio-proxy
git clone https://github.com/nuwax-ai/mcp-proxy.git
cd mcp-proxy/mcp-proxy
cargo build --release
# Binary located at: target/release/mcp-proxy
# Convert remote SSE service to stdio
mcp-proxy convert https://example.com/mcp/sse
# Or use simplified syntax (backward compatible)
mcp-proxy https://example.com/mcp/sse
# Use Bearer token authentication
mcp-proxy convert https://api.example.com/mcp/sse \
--auth "Bearer your-api-token"
# Add custom headers
mcp-proxy convert https://api.example.com/mcp/sse \
-H "Authorization=Bearer token" \
-H "X-Custom-Header=value"
# Pipe mcp-proxy output to your MCP client
mcp-proxy convert https://remote-server.com/mcp \
--auth "Bearer token" | \
your-mcp-client
# Or use in MCP client configuration
# Example (Claude Desktop configuration):
{
"mcpServers": {
"remote-service": {
"command": "mcp-proxy",
"args": [
"convert",
"https://remote-server.com/mcp/sse",
"--auth",
"Bearer your-token"
]
}
}
}
convert - Protocol Conversion (Core Command)Convert remote MCP service to local stdio interface.
mcp-proxy convert <URL> [options]
Options:
| Option | Short | Description | Default |
|---|---|---|---|
--auth <TOKEN> |
-a |
Authentication header (e.g., "Bearer token") | - |
--header <KEY=VALUE> |
-H |
Custom HTTP headers (can be used multiple times) | - |
--timeout <SECONDS> |
- | Connection timeout in seconds | 30 |
--retries <NUM> |
- | Number of retries | 3 |
--verbose |
-v |
Verbose output (show debug info) | false |
--quiet |
-q |
Quiet mode (errors only) | false |
Examples:
# Basic conversion
mcp-proxy convert https://api.example.com/mcp/sse
# With authentication and timeout
mcp-proxy convert https://api.example.com/mcp/sse \
--auth "Bearer sk-1234567890" \
--timeout 60 \
--retries 5
# Add multiple custom headers
mcp-proxy convert https://api.example.com/mcp \
-H "Authorization=Bearer token" \
-H "X-API-Key=your-key" \
-H "X-Request-ID=abc123"
# Verbose mode (view connection process)
mcp-proxy convert https://api.example.com/mcp/sse --verbose
check - Service Status CheckCheck if remote MCP service is available, verify connectivity and protocol support.
mcp-proxy check <URL> [options]
Options:
| Option | Short | Description | Default |
|---|---|---|---|
--auth <TOKEN> |
-a |
Authentication header | - |
--timeout <SECONDS> |
- | Timeout in seconds | 10 |
Examples:
# Check service status
mcp-proxy check https://api.example.com/mcp/sse
# With authentication
mcp-proxy check https://api.example.com/mcp/sse \
--auth "Bearer token" \
--timeout 5
Exit Codes:
0: Service is healthyNon-zero: Service unavailable or check faileddetect - Protocol DetectionAutomatically detect the protocol type used by remote MCP service.
mcp-proxy detect <URL> [options]
Options:
| Option | Short | Description |
|---|---|---|
--auth <TOKEN> |
-a |
Authentication header |
--quiet |
-q |
Quiet mode (output protocol type only) |
Output:
SSE - Server-Sent Events protocolStreamable HTTP - Streamable HTTP protocolStdio - Standard input/output protocol (not applicable for remote services)Examples:
# Detect protocol type
mcp-proxy detect https://api.example.com/mcp/sse
# Use in scripts
PROTOCOL=$(mcp-proxy detect https://api.example.com/mcp --quiet)
if [ "$PROTOCOL" = "SSE" ]; then
echo "Detected SSE protocol"
fi
Claude Desktop only supports stdio protocol MCP services. Use mcp-proxy to access remote services.
Configuration Example (~/Library/Application Support/Claude/config.json):
{
"mcpServers": {
"remote-database": {
"command": "mcp-proxy",
"args": [
"convert",
"https://your-server.com/mcp/database",
"--auth",
"Bearer your-token-here"
]
},
"remote-search": {
"command": "mcp-proxy",
"args": ["https://search-api.com/mcp/sse"]
}
}
}
#!/bin/bash
# Check MCP service status before deployment
echo "Checking MCP service..."
if mcp-proxy check https://api.example.com/mcp --timeout 5; then
echo "✅ MCP service is healthy, continuing deployment"
# Execute deployment script
./deploy.sh
else
echo "❌ MCP service unavailable, aborting deployment"
exit 1
fi
# Access internal MCP service via VPN or jump host
mcp-proxy convert https://internal-mcp.company.com/api/sse \
--auth "Bearer ${MCP_TOKEN}" \
--timeout 120 | \
local-mcp-client
# Quick test remote MCP service
mcp-proxy convert https://test-api.com/mcp/sse --verbose
# View detailed connection and communication logs
RUST_LOG=debug mcp-proxy convert https://api.com/mcp/sse -v
mcp-proxy can connect to remote MCP services using the following protocols:
| Protocol | Description | Status |
|---|---|---|
| SSE | Server-Sent Events, unidirectional real-time push | ✅ Fully Supported |
| Streamable HTTP | Bidirectional streaming HTTP communication | ✅ Fully Supported |
Output Protocol: Always stdio (standard input/output)
| Variable | Description | Example |
|---|---|---|
RUST_LOG |
Log level | RUST_LOG=debug mcp-proxy convert ... |
HTTP_PROXY |
HTTP proxy | HTTP_PROXY=http://proxy:8080 |
HTTPS_PROXY |
HTTPS proxy | HTTPS_PROXY=http://proxy:8080 |
A: Many MCP clients (like Claude Desktop) only support local stdio protocol services. If your MCP service is deployed on a remote server using SSE or HTTP protocols, you need mcp-proxy as a protocol conversion bridge.
A:
A: Yes! Whether using SSE or Streamable HTTP protocol, mcp-proxy supports full bidirectional communication (request/response).
A: Use --verbose option and RUST_LOG environment variable:
RUST_LOG=debug mcp-proxy convert https://api.com/mcp --verbose
A: Current version uses system default certificate verification. For self-signed certificate support, please submit an Issue.
# Increase timeout
mcp-proxy convert https://slow-api.com/mcp --timeout 120
# Check token format, ensure "Bearer " prefix
mcp-proxy convert https://api.com/mcp --auth "Bearer your-token-here"
# Or use custom header
mcp-proxy convert https://api.com/mcp -H "Authorization=Bearer your-token"
# View detailed error message
mcp-proxy detect https://api.com/mcp --verbose
# Check service status
mcp-proxy check https://api.com/mcp
This project is dual-licensed under MIT or Apache-2.0.
Issues and Pull Requests are welcome!