A high-performance, minimal MCP (Model Context Protocol) proxy for Zed editor integration. This binary acts as a protocol bridge between Zed's STDIO interface and remote MCP servers using HTTP/SSE/WebSocket transports.
π Complete Documentation | π Quick Start | βοΈ Configuration | π Authentication | π Troubleshooting
-
Install the proxy:
cargo install zed-mcp-proxy
-
Test connection:
zed-mcp-proxy https://mcp.deepwiki.com
-
Configure Zed (add to Zed settings):
{ "experimental": { "mcp": true }, "mcp_servers": { "deepwiki": { "command": "zed-mcp-proxy", "args": ["https://mcp.deepwiki.com"] } } } -
Restart Zed and enjoy MCP features! π
Need help? Check the π Full Documentation or π Quick Start Guide.
- Official MCP SDK: Built with
rmcpv0.3.0 for full MCP 2025-03-26 protocol compliance - Auto Transport Detection: Automatically detects and uses HTTP/SSE/WebSocket transports based on URL patterns
- OAuth2 Authentication: Built-in browser-based OAuth2 flow with secure token storage
- Configuration Options: Supports TOML configuration files with extensive customization options
- Zero Configuration: Works out-of-the-box with sensible defaults for most MCP servers
- High Performance: Minimal overhead proxy with async Rust implementation
- Cross-Platform: Supports Linux, macOS, and Windows
cargo install zed-mcp-proxyOther methods: π Complete Installation Guide
zed-mcp-proxy https://your-mcp-server.comzed-mcp-proxy --config config.toml https://server.comDetailed guides: π Usage Documentation | βοΈ Configuration Guide
The proxy automatically chooses the best transport:
- WebSocket:
ws://,wss://,/ws,/websocket - Server-Sent Events:
/sse,/events - HTTP: Default for all other URLs
Learn more: π Transport Guide
βββββββββββββββ STDIO βββββββββββββββ HTTP/SSE βββββββββββββββ
β Zed β ββββββββββΊ β zed-mcp- β βββββββββββββΊ β MCP Server β
β Extension β β proxy β β β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
The proxy handles:
- Protocol Translation: STDIO β HTTP/SSE message conversion
- Connection Management: Maintains persistent connections to remote servers
- Error Handling: Graceful error recovery and reporting
- Authentication: OAuth2 support for secure endpoints (when configured)
| Topic | Description | Link |
|---|---|---|
| Quick Start | Get up and running in 5 minutes | π Quick Start |
| Installation | Complete installation guide | π Installation |
| Configuration | All configuration options | π Configuration |
| Authentication | OAuth2 setup and troubleshooting | π Authentication |
| Transport Types | HTTP, SSE, WebSocket transports | π Transports |
| Zed Integration | Detailed Zed editor setup | π Integration |
| Troubleshooting | Common issues and solutions | π Troubleshooting |
| Examples | Real-world configurations | π Examples |
OAuth2 authentication is automatic for supported servers:
zed-mcp-proxy https://mcp.devin.ai # Browser opens for authDetailed setup: π Authentication Guide
This provides a seamless authentication experience without manual configuration.
You can configure OAuth2 in your configuration file:
[auth]
client_id = "your-client-id"
client_secret = "your-client-secret" # optional for public clients
redirect_uri = "http://localhost:{port}/callback" # {port} is automatically replaced
scopes = ["mcp:read", "mcp:write"]Or using environment variables:
export MCP_OAUTH_CLIENT_ID="your-client-id"
export MCP_OAUTH_CLIENT_SECRET="your-client-secret" # optional for public clients
export MCP_OAUTH_REDIRECT_URI="your-redirect-uri"The {port} placeholder in the redirect URI is automatically replaced with the actual port of the local callback server.
Full support for MCP protocol features:
- Tools: Execute tools and return results
- Resources: Access and manipulate resources
- Prompts: Handle prompt requests and responses
- Sampling: Support for model sampling requests
- Notifications: Bidirectional notification support
- Progress: Progress tracking for long-running operations
The proxy supports a TOML configuration file for more detailed configuration:
# Example configuration
endpoint_url = "https://mcp.example.com"
[transport]
connection_timeout_secs = 10
service_setup_timeout_secs = 5
[logging]
level = "debug"
format = "plain"
[auth]
client_id = "your-client-id"
client_secret = "your-client-secret"
redirect_uri = "http://localhost:8080/callback"
scopes = ["mcp:read", "mcp:write"]Configuration options include:
- Transport settings: Connection timeouts, transport type
- Logging configuration: Log level, format, output destination
- Authentication: OAuth2 credentials and settings
- Reconnection settings: Automatic reconnection with exponential backoff
See the example configuration file for a complete list of options.
Control logging level with the RUST_LOG environment variable or in the configuration file:
# Debug level logging
RUST_LOG=debug zed-mcp-proxy https://your-server.com
# Info level (default)
RUST_LOG=info zed-mcp-proxy https://your-server.com
# Error level only
RUST_LOG=error zed-mcp-proxy https://your-server.comThe proxy responds to standard signals:
- Ctrl+C (SIGINT): Graceful shutdown
- SIGTERM: Graceful shutdown
git clone https://github.com/keshav1998/zed-mcp-proxy
cd zed-mcp-proxy
cargo build --releasecargo testcargo clippy
cargo fmt- Binary Size: ~3.8MB (release build)
- Memory Usage: <10MB typical runtime
- Startup Time: <100ms cold start
- Latency: <1ms protocol overhead
- MCP 2025-03-26: Full support (latest specification)
- MCP 2024-11-05: Backwards compatibility maintained
- Transport Protocols: HTTP, SSE, WebSocket, Streamable HTTP
Contributions are welcome! Please see our Contributing Guide for details.
- Clone the repository
- Install Rust (1.70+)
- Run
cargo build - Run tests with
cargo test
This project is licensed under the MIT License - see the LICENSE file for details.
- Model Context Protocol - Official MCP specification
- rmcp - Official Rust MCP SDK
- Zed Editor - The editor this proxy is designed for
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
Made with β€οΈ for the Zed and MCP communities