Seamlessly use your favorite MCP servers anywhere. This project packages a small Go proxy that lets you connect local or experimental MCP servers to Claude.ai and the mobile app. Even if a server isn't officially "remote" yet, this proxy exposes it over Claude's new Remote MCP protocol so you can start integrating immediately.
Existing MCP servers often run only on your desktop, making them impossible to use with Claude's web UI or phone app. The Remote MCP protocol solves this, but not every server supports it yet. This proxy fills that gap so you can experiment right away.
Run the proxy in Docker and it will:
- Launches and monitors your local MCP servers automatically
- Converts traffic between HTTP/SSE and standard MCP JSON-RPC
- Hosts several MCP servers at once under different URL paths
- Reuses the familiar
claude_desktop_config.jsonformat - Shuts down cleanly and cleans up any spawned processes
- Exposes a
/healthendpoint so you can check status at a glance
This proxy now features automatic subdomain routing generation from your config.json file. Simply define your MCP servers in JSON, and the system automatically creates Traefik routing rules for each server.
# 1. Define servers
echo '{"mcpServers":{"memory":{"command":"npx","args":["-y","@modelcontextprotocol/server-memory"]}}}' > config.json
# 2. Set domain
echo "DOMAIN=yourdomain.com" > .env
# 3. Deploy
make install-deps && make up
# 4. Use in Claude.ai
# β https://memory.mcp.yourdomain.com/sse- β
Dynamic Subdomain Routing: Each server gets
{server}.mcp.{domain}/sse - β Automatic Traefik Integration: Routes generated automatically
- β Easy Scaling: Add servers by editing JSON only
- β Production Ready: Proper SSL, load balancing, service discovery
Create a config.json file describing your MCP servers (same format as claude_desktop_config.json):
{
"mcpServers": {
"notion-mcp": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-notion"],
"env": {
"NOTION_TOKEN": "your_notion_token_here"
}
},
"memory-mcp": {
"command": "python",
"args": ["-m", "memory_mcp"],
"env": {}
}
}
}Option A: Automated Make Workflow (Recommended)
# Install dependencies (first time only)
make install-deps
# Set your domain
echo "DOMAIN=yourdomain.com" > .env
# Generate configuration and deploy
make up
# View logs
make logsOption B: Manual Docker Deployment
# Build the image
docker build -t remote-mcp-proxy .
# Run the proxy
docker run -d \
--name mcp-proxy \
-p 8080:8080 \
-v $(pwd)/config.json:/app/config.json:ro \
remote-mcp-proxyThe compose setup expects /home/pezzos/docker/config/secrets/remote_mcp_proxy.env. The file is symlinked into this directory as .env.
cd /home/pezzos/docker/config
cp secrets/remote_mcp_proxy.env secrets/remote_mcp_proxy.env.example # optional backup
${EDITOR:-nano} secrets/remote_mcp_proxy.envExample contents:
DOMAIN=proxy.example.com
LOG_LEVEL_SYSTEM=INFO
LOG_LEVEL_MCP=DEBUG
LOG_RETENTION_SYSTEM=24h
LOG_RETENTION_MCP=12hdocker-compose up -dThis will deploy the service with Traefik reverse proxy integration, making it accessible at mcp.{DOMAIN} with automatic HTTPS.
Configure wildcard DNS for dynamic subdomain routing:
DNS Setup Example (Cloudflare):
Type: A
Name: *.mcp
Content: YOUR_SERVER_IP
Proxy status: Proxied (orange cloud)
For other DNS providers, create an A record:
*.mcp.your-domain.com A YOUR_SERVER_IP
Open Claude.ai (requires Pro, Max, Teams, or Enterprise plan) and add your automatically generated proxy URLs under Settings > Integrations:
Auto-Generated URLs (based on your config.json):
https://notion-mcp.mcp.your-domain.com/ssehttps://memory-mcp.mcp.your-domain.com/ssehttps://sequential-thinking.mcp.your-domain.com/sse
β Claude.ai Integration Status: The Connect button now works reliably! The proxy fully supports Claude.ai Remote MCP integration with proper session management and tool discovery.
1. Edit config.json:
{
"mcpServers": {
"existing-server": {...},
"new-server": {
"command": "python",
"args": ["/path/to/server.py"]
}
}
}2. Redeploy:
make restart3. Use immediately:
- New URL:
https://new-server.mcp.your-domain.com/sse - Automatically configured SSL, routing, load balancing
Debug Endpoints: Use these endpoints to verify your MCP servers are working:
- Check server status:
https://mcp.your-domain.com/listmcp - Verify tools available:
https://mcp.your-domain.com/listtools/your-server-name
Auto-Generated Format: Each MCP server is automatically available at:
https://{server-name}.mcp.{DOMAIN}/sse
Examples (from your config.json):
https://memory.mcp.your-domain.com/ssehttps://sequential-thinking.mcp.your-domain.com/ssehttps://notion.mcp.your-domain.com/sse
Where {DOMAIN} is set in your .env file and {server-name} matches the key in your config.json file.
| Command | Description |
|---|---|
make help |
Show all available commands |
make install-deps |
Install gomplate dependency |
make generate |
Generate docker-compose.yml from config.json |
make build |
Build Docker images |
make up |
Generate config and start services |
make down |
Stop and remove services |
make restart |
Restart services with new config |
make logs |
Show service logs |
make clean |
Remove generated files |
Claude.ai expects Remote MCP endpoints at root level (/sse), not path-based routing. This automated subdomain approach:
- β Matches Remote MCP standard format
- β Auto-scales with config.json changes
- β Provides clean separation between servers
- β Eliminates manual Traefik configuration
- β Enables instant deployment of new servers
The proxy uses the same configuration format as Claude Desktop's claude_desktop_config.json:
{
"mcpServers": {
"server-name": {
"command": "command-to-run",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR": "value"
}
}
}
}The following environment variables are used by the Docker Compose setup:
DOMAIN: Your base domain name (e.g.,example.com). MCP servers will be accessible at{server}.mcp.{DOMAIN}
- Set environment variables for your MCP servers in the
envsection ofconfig.json - Store secrets securely and reference them in your Docker deployment
- The proxy will pass these environment variables to the spawned MCP processes
The service is configured to work with Traefik reverse proxy for automatic HTTPS and wildcard subdomain routing:
version: '3.8'
services:
remote-mcp-proxy:
build: .
container_name: remote-mcp-proxy
restart: unless-stopped
volumes:
- ./config.json:/app/config.json:ro
environment:
- GO_ENV=production
networks:
- proxy
labels:
# Wildcard subdomain routing for dynamic MCP servers
- traefik.enable=true
- traefik.http.routers.mcp-wildcard.rule=Host(`*.mcp.${DOMAIN}`)
- traefik.http.routers.mcp-wildcard.entrypoints=websecure
- traefik.http.routers.mcp-wildcard.tls=true
- traefik.http.routers.mcp-wildcard.tls.certresolver=letsencrypt
- traefik.http.services.mcp-wildcard.loadbalancer.server.port=8080
# Utility endpoints on main domain
- traefik.http.routers.mcp-main.rule=Host(`mcp.${DOMAIN}`)
- traefik.http.routers.mcp-main.entrypoints=websecure
- traefik.http.routers.mcp-main.tls=true
- traefik.http.routers.mcp-main.tls.certresolver=letsencrypt
- traefik.http.services.mcp-main.loadbalancer.server.port=8080
networks:
proxy:
external: true- Wildcard Rule:
Host(\*.mcp.${DOMAIN}`)captures all subdomains likememory.mcp.domain.com` - Dynamic SSL: Traefik automatically generates SSL certificates for new subdomains
- Main Domain:
mcp.${DOMAIN}for utility endpoints (/health,/listmcp) - DNS Requirement: Wildcard DNS record
*.mcp.domain.commust be configured
- Docker and Docker Compose installed
- Domain name with DNS control
- Traefik reverse proxy running (or willingness to set it up)
# Clone the repository
git clone <repository-url>
cd remote-mcp-proxy
# Create environment configuration
echo "DOMAIN=your-domain.com" > .envEdit config.json with your desired MCP servers:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
},
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
},
"notion": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-notion"],
"env": {
"NOTION_TOKEN": "your_notion_token_here"
}
}
}
}For Cloudflare:
- Go to DNS settings for your domain
- Add new record:
- Type: A
- Name:
*.mcp - Content: Your server's IP address
- Proxy status: Proxied (orange cloud)
For other DNS providers:
Create a wildcard A record: *.mcp.your-domain.com β YOUR_SERVER_IP
Create traefik/docker-compose.yml:
version: '3.8'
services:
traefik:
image: traefik:v3.0
container_name: traefik
restart: unless-stopped
ports:
- "80:80"
- "443:443"
networks:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/traefik.yml:ro
- ./acme.json:/acme.json
environment:
- [email protected] # If using Cloudflare
- CF_API_KEY=your-cloudflare-api-key # If using Cloudflare
networks:
proxy:
external: trueCreate traefik/traefik.yml:
global:
checkNewVersion: false
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
certificatesResolvers:
letsencrypt:
acme:
email: [email protected]
storage: acme.json
dnsChallenge: # Recommended for wildcard certificates
provider: cloudflare
delayBeforeCheck: 0# Create proxy network (if not exists)
docker network create proxy
# Start Traefik (if not running)
cd traefik && docker-compose up -d && cd ..
# Deploy MCP Proxy
docker-compose up -d# Check if services are running
docker-compose ps
# Test main endpoints
curl -s https://mcp.your-domain.com/health
curl -s https://mcp.your-domain.com/listmcp
# Test individual MCP server subdomains
curl -s https://memory.mcp.your-domain.com/health
curl -s https://sequential-thinking.mcp.your-domain.com/health- Open Claude.ai (requires Pro/Team/Enterprise plan)
- Go to Settings β Integrations
- Click "Add More" β "Custom Integration"
- Add your MCP server URLs:
https://memory.mcp.your-domain.com/ssehttps://sequential-thinking.mcp.your-domain.com/ssehttps://notion.mcp.your-domain.com/sse
# Test DNS resolution
nslookup memory.mcp.your-domain.com
dig *.mcp.your-domain.com
# Should resolve to your server IP# Check Traefik logs
docker logs traefik
# Check certificate generation
docker exec traefik cat /acme.json# Check proxy logs
docker logs remote-mcp-proxy
# Test individual server tools
curl -s https://mcp.your-domain.com/listtools/memory- Verify URL format:
https://server.mcp.domain.com/sse - Check authentication (if required)
- Ensure DNS and SSL are working
- Test with browser first
DOMAIN: Your base domain (required)MCP_DOMAIN: Override domain for MCP routing (optional)PORT: HTTP server port (default: 8080)
# View current servers
jq '.mcpServers | keys' config.json
# Generate and view routing configuration
make generate
cat docker-compose.yml
# View logs for all services
make logs
# Quick restart after config changes
make restart
# Add new MCP server workflow:
# 1. Edit config.json - add new server
# 2. Run: make restart
# 3. New URL automatically available: https://newserver.mcp.domain.com/sse
# 4. All SSL, routing, service discovery handled automatically
# Update to latest version
docker-compose pull && make upconfig.json β gomplate β docker-compose.yml β Traefik β Claude.ai
β β β β β
Servers Templates Container Labels SSL Routes Integration
Workflow:
- config.json: Define MCP servers (single source of truth)
- gomplate: Template engine generates docker-compose.yml
- Traefik Labels: Each server gets automatic routing rules
- SSL: Automatic certificate generation for subdomains
- Claude.ai: Ready-to-use URLs with zero manual configuration
remote-mcp-proxy/
βββ config.json # β MCP server definitions (edit this)
βββ .env # β Domain configuration
βββ docker-compose.yml.template # β Template for generation
βββ docker-compose.yml # β Generated automatically (don't edit)
βββ Makefile # β Build automation
βββ ...
Key Files:
- Edit:
config.json,.env - Auto-generated:
docker-compose.yml - Use:
makecommands for all operations
- Go 1.21 or later
- Docker
- Your MCP servers' dependencies (Node.js, Python, etc.)
# Clone the repository
git clone <repository-url>
cd remote-mcp-proxy
# Install Go dependencies
go mod tidy
# Build locally
go build -o remote-mcp-proxy .
# Run locally (requires config.json at /app/config.json)
./remote-mcp-proxy
# Or build and run with Docker
docker build -t remote-mcp-proxy .
docker run -v $(pwd)/config.json:/app/config.json -p 8080:8080 remote-mcp-proxy- Build:
go build -o remote-mcp-proxy . - Run:
./remote-mcp-proxy - Test:
go test ./... - Lint:
go fmt ./...andgo vet ./... - Dependencies:
go mod tidy
The Remote MCP Proxy includes comprehensive tests to ensure reliability and correctness.
# Run all tests
./test/run-tests.sh# Unit tests only
go test -v ./protocol ./mcp ./proxy
# Integration tests
go test -v .
# Tests with coverage
go test -cover ./...
# Short tests (skip integration)
go test -short ./...
# Benchmarks
go test -bench=. -benchmem ./...Several test configurations are provided in the test/ directory:
test/minimal-config.json: Basic echo server for testingtest/development-config.json: Common MCP servers for developmenttest/production-config.json: Production server examplestest/config.json: Full test suite configuration
# Test with minimal config
CONFIG_PATH=./test/minimal-config.json ./remote-mcp-proxy
# Test with development servers (requires npm packages)
CONFIG_PATH=./test/development-config.json ./remote-mcp-proxy
# Test specific functionality
curl http://localhost:8080/health
curl -X GET http://localhost:8080/simple-echo/sse \
-H "Accept: text/event-stream"The test suite covers:
- Protocol Translation: JSON-RPC β Remote MCP message conversion
- Connection Management: Session handling, timeouts, cleanup
- Error Handling: Invalid requests, server failures, network issues
- Concurrency: Multiple simultaneous connections
- Authentication: Token validation and CORS
- Health Checks: Server status monitoring
- Integration: End-to-end workflow testing
For automated testing in CI environments:
# Install dependencies
go mod download
# Run tests with XML output (for CI)
go test -v ./... -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
# Static analysis
go vet ./...
go fmt ./...- Add the server configuration to
config.json - Restart the proxy container
- The new server will be available at
/{server-name}/sse
The proxy is built in Go and consists of:
- HTTP Proxy Server: Handles incoming Remote MCP requests using Gorilla Mux router
- MCP Process Manager: Spawns and manages local MCP server processes with health monitoring
- Protocol Translator: Converts between HTTP/SSE and MCP JSON-RPC protocols
- Configuration Loader: Reads and validates MCP server configs (claude_desktop_config.json format)
- SSE Handler: Implements Server-Sent Events for real-time Remote MCP communication
- Go 1.21: Core language for performance and concurrency
- Gorilla Mux: HTTP routing and path-based server selection
- Standard Library: Process management (
os/exec), HTTP/SSE, JSON handling - Alpine Linux: Minimal Docker base image for production deployment
The proxy implements the Remote MCP protocol specification to enable Claude.ai integration:
- OAuth 2.0 Authentication: Claude.ai authenticates using Bearer tokens via OAuth 2.0 Dynamic Client Registration
- Initialize Handshake: Synchronous POST request to
/{server}/ssewith initialize message - Session Management: Sessions are tracked using
Mcp-Session-Idheader and marked as initialized immediately after successful handshake - Tool Discovery: Follow-up requests use the same session to discover and call tools
- SSE Communication: Server-Sent Events for real-time message delivery (future requests)
Synchronous Initialize: Unlike local MCP servers, Claude.ai expects a synchronous JSON response to the initialize POST request, not an asynchronous SSE response.
Session Initialization: Sessions MUST be marked as initialized immediately after a successful MCP server response. Waiting for a separate "initialized" notification will cause tool discovery to fail.
Stdio Concurrency: MCP server stdout access is serialized using dedicated readMu mutex to prevent deadlocks when multiple Claude.ai requests access the same server simultaneously.
Timeout Handling: 30-second timeout for initialize responses to accommodate slow npm-based MCP servers. Shorter timeouts cause "context deadline exceeded" errors.
Tool Name Normalization: Tool names are automatically converted from hyphenated format (API-get-user) to snake_case (api_get_user) for Claude.ai compatibility, with bidirectional transformation for tool calls.
The proxy includes comprehensive monitoring and stability features designed to prevent server hangs and ensure reliable operation.
Proactive Health Checks: The proxy continuously monitors all MCP servers with periodic ping checks every 30 seconds.
# Check overall health
curl https://mcp.your-domain.com/health
# Response: {"status":"healthy"}
# Get detailed health status for all MCP servers
curl https://mcp.your-domain.com/health/servers
# Response: {
# "timestamp": "2025-06-26T10:30:00Z",
# "servers": {
# "memory": {
# "name": "memory",
# "status": "healthy",
# "lastCheck": "2025-06-26T10:29:45Z",
# "responseTimeMs": 120,
# "consecutiveFails": 0,
# "restartCount": 0
# }
# },
# "summary": {
# "total": 4,
# "healthy": 3,
# "unhealthy": 1,
# "unknown": 0
# }
# }Automatic Recovery: When servers become unresponsive:
- β Early Detection: 3 consecutive failed health checks trigger recovery
- β Smart Restart: Automatic server restart with graceful cleanup
- β Restart Limits: Maximum 3 restarts per 5-minute window to prevent loops
- β Status Tracking: Comprehensive health history and error tracking
Real-time Resource Tracking: Monitor memory and CPU usage of all MCP processes.
# Get current resource usage for all MCP processes
curl https://mcp.your-domain.com/health/resources
# Response: {
# "timestamp": "2025-06-26T10:30:00Z",
# "processes": [
# {
# "pid": 123,
# "name": "memory-server",
# "memoryMB": 145.2,
# "cpuPercent": 2.1,
# "virtualMB": 512.0,
# "residentMB": 145.2
# }
# ],
# "summary": {
# "processCount": 4,
# "totalMemoryMB": 580.5,
# "totalCPU": 8.3,
# "averageMemoryMB": 145.1,
# "averageCPU": 2.1
# }
# }Alert Thresholds:
- π¨ Memory Alert: >500MB per process
- π¨ CPU Alert: >80% CPU usage per process
- π Logging: Resource summaries logged every minute
Container Resource Limits: Prevent resource exhaustion that can cause server hangs.
# Docker Compose Resource Configuration
deploy:
resources:
limits:
memory: 2G # Maximum memory allocation
cpus: '2.0' # Maximum CPU allocation
reservations:
memory: 512M # Guaranteed memory
cpus: '0.5' # Guaranteed CPUBenefits:
- β Prevents OOM: Memory limits prevent out-of-memory conditions
- β CPU Protection: CPU limits prevent CPU starvation
- β Predictable Performance: Resource reservations ensure baseline performance
- β Container Stability: Improved overall system stability
Server Status Monitoring:
# List all configured MCP servers and their status
curl https://mcp.your-domain.com/listmcp
# Response: {
# "count": 4,
# "servers": [
# {
# "name": "memory",
# "running": true,
# "pid": 123,
# "command": "npx",
# "args": ["-y", "@modelcontextprotocol/server-memory"]
# }
# ]
# }
# List available tools for a specific MCP server
curl https://mcp.your-domain.com/listtools/memory
# Response: {
# "server": "memory",
# "response": {
# "jsonrpc": "2.0",
# "result": {
# "tools": [
# {
# "name": "create_entities",
# "description": "Create multiple new entities in the knowledge graph"
# }
# ]
# }
# }
# }
# Manual connection cleanup (if needed)
curl -X POST https://mcp.your-domain.com/cleanupStructured Logging: All logs include session correlation for better debugging.
Log Locations (with volume mount /logs):
- π System Logs:
/logs/system.log- Proxy operations and health monitoring - π MCP Server Logs:
/logs/mcp-{server-name}.log- Individual server logs - π Log Retention: Configurable cleanup (default: 24h system, 12h MCP)
Log Levels (configured via environment variables):
# .env configuration
LOG_LEVEL_SYSTEM=INFO # System logging level
LOG_LEVEL_MCP=DEBUG # MCP server logging level
LOG_RETENTION_SYSTEM=24h # System log retention
LOG_RETENTION_MCP=12h # MCP log retentionEnhanced Request Tracing: Every request includes Method, ID, and SessionID for complete traceability:
2025/06/26 10:30:15 [INFO] Method: initialize, ID: 0, SessionID: abc123-def456
2025/06/26 10:30:16 [INFO] Successfully received response from server memory
External Monitoring Integration: Use the health APIs with your monitoring stack.
Prometheus/Grafana Example:
# prometheus.yml
scrape_configs:
- job_name: 'mcp-proxy'
static_configs:
- targets: ['mcp.your-domain.com']
metrics_path: '/health/resources'
scheme: httpsUptime Monitoring:
# Health check endpoint for uptime monitors
https://mcp.your-domain.com/health
# Expected response: {"status":"healthy"}Alert Rules Examples:
- Server health: Check
/health/serversfor unhealthy status - Resource usage: Monitor
/health/resourcesfor threshold violations - Process count: Alert if fewer processes than expected servers
Memory Server Hanging Issues (Addressed in latest version):
- Check Health Status:
curl https://mcp.your-domain.com/health/servers - Review Resource Usage:
curl https://mcp.your-domain.com/health/resources - Monitor Auto-Recovery: Health checker will automatically restart hung servers
- Check Logs: Review
/logs/mcp-memory.logfor detailed error analysis
Resource Exhaustion Prevention:
- Container limits prevent runaway processes
- Resource monitoring provides early warning
- Automatic cleanup of old log files prevents disk issues
These monitoring features provide comprehensive visibility into MCP server health and performance, with automatic recovery capabilities to ensure reliable operation in production environments.
Issue: The Connect button in Claude.ai Remote MCP settings appears to work but then fails, or shows "context deadline exceeded" errors.
Root Cause: This was caused by stdio deadlocks during MCP server initialization handshake and improper session management.
Resolution: These critical issues have been resolved in the current version:
- Stdio Deadlock Fix: Added dedicated
readMumutex to prevent race conditions when multiple requests access the same MCP server stdout - Session Initialization Fix: Sessions are now properly marked as initialized after successful handshake
- Timeout Adjustment: Increased initialize timeout from 10 to 30 seconds for slow npm-based MCP servers
Verification:
- The Connect button should now work reliably
- Tools should be properly exposed and usable in Claude.ai
- Check logs for "Session marked as initialized" messages
- Check the command and arguments in your config
- Verify environment variables are set correctly
- Look at proxy logs for process spawn errors
- Ensure required dependencies are available in the container
Common npm-based MCP server issues:
# Check if npm packages are available
docker exec remote-mcp-proxy npm list -g
# Verify MCP server can start manually
docker exec -it remote-mcp-proxy npx -y @notionhq/notion-mcp-server- Ensure the proxy is accessible from Claude.ai
- Check that Traefik is properly configured with SSL certificates
- Verify the domain DNS points to your server
- Ensure port 80/443 are open in your firewall
Issue: Logs show "context deadline exceeded" during initialize handshake.
Root Cause: This was caused by stdio deadlocks and insufficient timeout for MCP server initialization.
Resolution: Fixed in current version with dedicated read mutex and increased timeouts.
If still occurring:
- Check if MCP server processes are actually running:
docker exec remote-mcp-proxy ps aux - Verify MCP server responds to direct communication:
docker exec -i remote-mcp-proxy npx -y <server> <<< '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}'
Issue: Tools not showing up in Claude.ai even after successful connection.
Root Cause: Sessions were not being marked as initialized after successful handshake.
Resolution: Fixed - sessions are now automatically marked as initialized when the MCP server responds successfully to the initialize request.
If tools don't appear after successful connection:
-
Check MCP server tools:
curl https://mcp.your-domain.com/listtools/your-server-name
-
Verify tool name normalization: Tool names are automatically converted to snake_case for Claude.ai compatibility
-
Check server capabilities: Some MCP servers may not expose tools immediately after startup
- Check firewall and network configuration
- Verify SSL/TLS setup for HTTPS endpoints
- Test the SSE endpoint directly:
curl http://localhost:8080/{server-name}/sse - Use the monitoring endpoints to debug:
- Check if MCP servers are running:
curl http://localhost:8080/listmcp - Verify tools are available:
curl http://localhost:8080/listtools/{server-name}
- Check if MCP servers are running:
- Confirm your MCP server supports the expected protocol version
- Check for proper JSON-RPC message formatting
- Review SSE connection handling
- Monitor proxy logs for translation errors
- Fork the repository
- Create a feature branch
- Make your changes
- Test with multiple MCP servers
- Submit a pull request
[Add your license here]