mcp-stdio-proxy
mcp-stdio-proxy
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)
Core Features
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.
How It Works
Remote MCP Service (SSE/HTTP) ←→ mcp-proxy ←→ Local Application (stdio)
- Input: Remote MCP service URL (supports SSE or Streamable HTTP protocols)
- Output: Local stdio interface (standard input/output)
- Purpose: Protocol conversion + transparent proxy
Features
- 🔄 Protocol Conversion: Auto-detect and convert SSE/Streamable HTTP → stdio
- 🌐 Remote Access: Enable local applications to access remote MCP services
- 🔍 Auto Protocol Detection: Intelligently identify service protocol types
- 🔐 Authentication Support: Custom Authorization header and HTTP headers
- ⚡ Lightweight & Efficient: No extra configuration needed, works out of the box
Installation
Install from crates.io (Recommended)
Build from Source
# Binary located at: target/release/mcp-proxy
Quick Start
Basic Usage
# Convert remote SSE service to stdio
# Or use simplified syntax (backward compatible)
Complete Example with Authentication
# Use Bearer token authentication
# Add custom headers
Use with MCP Clients
# Pipe mcp-proxy output to your MCP client
| \
# Or use in MCP client configuration
# Example (Claude Desktop configuration):
{
}
Command Details
1. convert - Protocol Conversion (Core Command)
Convert remote MCP service to local stdio interface.
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
# With authentication and timeout
# Add multiple custom headers
# Verbose mode (view connection process)
2. check - Service Status Check
Check if remote MCP service is available, verify connectivity and protocol support.
Options:
| Option | Short | Description | Default |
|---|---|---|---|
--auth <TOKEN> |
-a |
Authentication header | - |
--timeout <SECONDS> |
- | Timeout in seconds | 10 |
Examples:
# Check service status
# With authentication
Exit Codes:
0: Service is healthyNon-zero: Service unavailable or check failed
3. detect - Protocol Detection
Automatically detect the protocol type used by remote MCP service.
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
# Use in scripts
PROTOCOL=
if [; then
fi
Use Cases
Case 1: Claude Desktop with Remote MCP Service
Claude Desktop only supports stdio protocol MCP services. Use mcp-proxy to access remote services.
Configuration Example (~/Library/Application Support/Claude/config.json):
Case 2: Health Check in CI/CD Pipeline
#!/bin/bash
# Check MCP service status before deployment
if ; then
# Execute deployment script
else
fi
Case 3: Cross-Network Enterprise Internal MCP Service
# Access internal MCP service via VPN or jump host
| \
Case 4: Development and Testing
# Quick test remote MCP service
# View detailed connection and communication logs
RUST_LOG=debug
Supported Protocols
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)
Environment Variables
| 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 |
FAQ
Q: Why do I need mcp-proxy?
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.
Q: What's the difference between mcp-proxy and MCP server?
A:
- MCP Server: Backend service that provides specific functionality (database access, file operations, etc.)
- mcp-proxy: Pure client proxy tool that only does protocol conversion, provides no business functionality
Q: Does it support bidirectional communication?
A: Yes! Whether using SSE or Streamable HTTP protocol, mcp-proxy supports full bidirectional communication (request/response).
Q: How to debug connection issues?
A: Use --verbose option and RUST_LOG environment variable:
RUST_LOG=debug
Q: Does it support self-signed SSL certificates?
A: Current version uses system default certificate verification. For self-signed certificate support, please submit an Issue.
Troubleshooting
Connection Timeout
# Increase timeout
Authentication Failed
# Check token format, ensure "Bearer " prefix
# Or use custom header
Protocol Detection Failed
# View detailed error message
# Check service status
System Requirements
- Operating System: Linux, macOS, Windows
- Rust Version: 1.70+ (only required for building from source)
- Network: Ability to access target MCP service
License
This project is dual-licensed under MIT or Apache-2.0.
Contributing
Issues and Pull Requests are welcome!
- GitHub Repository: https://github.com/nuwax-ai/mcp-proxy
- Issue Tracker: https://github.com/nuwax-ai/mcp-proxy/issues
- Feature Discussions: https://github.com/nuwax-ai/mcp-proxy/discussions
Related Resources
Changelog
v0.1.18
- ✅ SSE and Streamable HTTP protocol conversion support
- ✅ Auto protocol detection
- ✅ Authentication and custom headers support
- ✅ Service status check command
- ✅ Protocol detection command
- ✅ OpenTelemetry integration with OTLP
- ✅ Background health checks
- ✅ Run code execution via external processes