MCP Proxy Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Proxy Server - Use Claude.ai Remotely with Any MCP Server
Stop working from your local machine. Access your Model Context Protocol (MCP) servers from anywhere using Claude.ai - securely aggregate multiple MCP tools through one remote endpoint with Google OAuth authentication.
Use Claude.ai with remote MCP servers - filesystem, database, API, and custom tools accessible from any device.
π― Perfect for:
Remote MCP access - Use Claude.ai tools from anywhere, not just localhost
Team collaboration - Share MCP servers securely across your organization
Cloud deployments - Host MCP tools on VPS, Docker, Kubernetes, or serverless
Multi-device workflows - Switch between work laptop, home desktop, and mobile
Centralized tool management - One endpoint for all your MCP servers
Why MCP Proxy?
Problems:
Claude's MCP support only works with servers running on your local machine
You can't access your tools remotely, share with teammates, or use from different devices
Managing authentication for remote MCP access is complex
Solution: MCP Proxy is a remote MCP server gateway that lets you:
β Access Claude.ai tools from anywhere (not just localhost)
β Use Claude.ai with any MCP-compatible client remotely
β Deploy MCP servers once, use everywhere
β Share tools securely with team members via Google OAuth
β Aggregate multiple MCP servers into one endpoint
Related MCP server: mcp-gway
Features
Remote Access & Deployment
π Remote MCP Server Access - Use Claude.ai from anywhere, not just your local machine
βοΈ Cloud-Ready - Deploy to AWS, GCP, Azure, DigitalOcean, Railway, Render, or any VPS
π³ Docker Support - One-line deployment with multi-architecture support (AMD64/ARM64)
π Secure Remote Access - Built-in Google OAuth 2.0 authentication
π Cloudflare Tunnel Ready - Expose securely without public IP or port forwarding
MCP Server Management
π Multi-Server Aggregation - Combine stdio (uvx, npx), SSE, and HTTP MCP servers
π Claude-Compatible Config - Same JSON format as Claude Desktop configuration
π Live Config Reload - Add/remove servers without restarting
β Claude.ai Compatible - Works seamlessly with Claude.ai and other MCP clients
π₯ Auto-Restart & Health Checks - Resilient server lifecycle management
Security & Control
π Google OAuth Authentication - Secure, trusted authentication via Google accounts
π€ User Identity Tracking - Know which team member is using which tools
π Zero-Trust Ready - Works with network segmentation and access policies
π Production-Ready - JWT signing keys, HTTPS enforcement
Quick Start - Remote MCP in 10 Minutes
Get Claude.ai working with remote MCP servers in 3 steps:
Prerequisites
Docker (easiest) or Python 3.10+ (for development)
Google Cloud Account (free)
Public URL - Domain, VPS IP, or Cloudflare Tunnel (free options below)
1. Google Cloud OAuth Setup (5 minutes)
Go to Google Cloud Console: https://console.developers.google.com/
Create or Select a Project
Click "Select a project" β "New Project"
Name: "MCP Proxy"
Click "Create"
Configure OAuth Consent Screen
Navigate to: APIs & Services β OAuth consent screen
Choose External (for public access) or Internal (G Workspace only)
Fill in required fields:
App name: "MCP Proxy"
User support email: your@email.com
Developer contact: your@email.com
Click "Save and Continue"
Add Scopes: Click "Add or Remove Scopes"
Select:
openid,emailOr manually add:
https://www.googleapis.com/auth/userinfo.email
Click "Save and Continue" through remaining screens
Create OAuth Client ID
Navigate to: APIs & Services β Credentials
Click "+ CREATE CREDENTIALS" β "OAuth client ID"
Application type: "Web application"
Name: "MCP Proxy Production"
Authorized JavaScript origins:
Add:
https://your-domain.com(replace with your domain)For local dev, also add:
http://localhost:8080
Authorized redirect URIs:
Add:
https://your-domain.com/auth/callbackFor local dev, also add:
http://localhost:8080/auth/callback
Click "CREATE"
Copy Credentials
Copy the Client ID (ends with
.apps.googleusercontent.com)Copy the Client Secret (starts with
GOCSPX-)Save these securely - you'll need them in step 2
Important Notes:
HTTPS is required for production (Google only allows HTTP for localhost)
Redirect URI must match exactly (including port if non-standard)
For Cloudflare Tunnel, use your tunnel URL
2. Configure MCP Proxy
Create mcp_config.json
Copy the example config and customize with your MCP servers:
cp mcp_config.example.json mcp_config.jsonEdit the file to define which MCP servers to proxy:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/data"]
},
"time": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-time"]
}
}
}Supported server types:
stdio servers:
uvx,npxcommands (like above)HTTP servers:
{"url": "https://server.com/mcp", "transport": "http"}SSE servers:
{"url": "https://server.com/sse", "transport": "sse"}
Create .env
Create a .env file with your Google OAuth credentials:
# Google OAuth Credentials (from step 1)
GOOGLE_CLIENT_ID=123456789-abc123def456.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-abc123def456ghi789
# Public URL where MCP Proxy is accessible
# IMPORTANT: Must match authorized redirect URI in Google Cloud Console
MCP_BASE_URL=https://your-domain.com
# Optional: JWT signing key for production (generate with: openssl rand -hex 32)
# GOOGLE_JWT_KEY=your-32-byte-hex-key
# MCP Proxy Configuration
MCP_CONFIG_PATH=mcp_config.json
MCP_HOST=0.0.0.0
MCP_PORT=8080
MCP_LIVE_RELOAD=true3. Run MCP Proxy
Using Docker (Recommended)
docker run -d \
--name mcp-proxy \
-p 8080:8080 \
-v $(pwd)/mcp_config.json:/app/mcp_config.json:ro \
--env-file .env \
--restart unless-stopped \
ghcr.io/jonhearsch/mcp-proxy:latestUsing Docker Compose
Create docker-compose.yml:
version: "3.8"
services:
mcp-proxy:
image: ghcr.io/jonhearsch/mcp-proxy:latest
container_name: mcp-proxy
ports:
- "8080:8080"
volumes:
- ./mcp_config.json:/app/mcp_config.json:ro
env_file:
- .env
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3Start with:
docker-compose up -dUsing Python (Development)
# Clone repository
git clone https://github.com/jonhearsch/mcp-proxy.git
cd mcp-proxy
# Install dependencies
pip install -r requirements.txt
# Run server
python proxy_server.py4. Connect Claude.ai
Deploy with HTTPS (required by Google OAuth)
Use Cloudflare Tunnel, nginx reverse proxy, or cloud provider load balancer
Example Cloudflare Tunnel: See "Production Deployment" section below
Add to Claude.ai
Open Claude.ai settings
Navigate to MCP servers configuration
Add server URL:
https://your-domain.com/mcpComplete Google OAuth flow when prompted
Test Tools
Ask Claude: "What tools do you have available?"
Claude should list your configured MCP servers
Try using a tool: "List files in the current directory"
Production Deployment
Option 1: Cloudflare Tunnel (Easiest, Free HTTPS)
Cloudflare Tunnel provides free HTTPS without exposing ports or managing certificates.
Setup Cloudflare Tunnel
Install cloudflared
# macOS brew install cloudflared # Linux wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb sudo dpkg -i cloudflared-linux-amd64.debLogin to Cloudflare
cloudflared tunnel loginCreate Tunnel
cloudflared tunnel create mcp-proxyCreate config file (
~/.cloudflared/config.yml):tunnel: <your-tunnel-id> credentials-file: /home/user/.cloudflared/<your-tunnel-id>.json ingress: - hostname: mcp.your-domain.com service: http://localhost:8080 - service: http_status:404Route DNS
cloudflared tunnel route dns mcp-proxy mcp.your-domain.comRun tunnel
cloudflared tunnel run mcp-proxyUpdate Google OAuth
Add authorized origin:
https://mcp.your-domain.comAdd redirect URI:
https://mcp.your-domain.com/auth/callbackUpdate
.env:MCP_BASE_URL=https://mcp.your-domain.com
Option 2: VPS with Nginx (Traditional)
Install on Ubuntu/Debian VPS
# Update system
sudo apt update && sudo apt upgrade -y
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Clone and configure
git clone https://github.com/jonhearsch/mcp-proxy.git
cd mcp-proxy
cp .env.example .env
nano .env # Edit with your Google OAuth credentials
# Run with Docker Compose
docker-compose up -dNginx Reverse Proxy
Install nginx and certbot:
sudo apt install nginx certbot python3-certbot-nginx -yCreate /etc/nginx/sites-available/mcp-proxy:
server {
listen 80;
server_name mcp.your-domain.com;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}Enable and get SSL certificate:
sudo ln -s /etc/nginx/sites-available/mcp-proxy /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo certbot --nginx -d mcp.your-domain.comOption 3: Cloud Platforms
Railway.app
Connect GitHub repository
Add environment variables from
.envDeploy - Railway provides HTTPS automatically
Render.com
New Web Service β Connect repository
Add environment variables
Deploy - Render provides HTTPS automatically
DigitalOcean App Platform
Create new app β GitHub repository
Add environment variables
Deploy - Automatic HTTPS
Configuration
Authentication Modes
The proxy supports three authentication modes, resolved in this precedence order. Exactly one is active, and it is logged at startup.
# | Trigger | Mode | Use when |
1 |
| No authentication | Local debugging only |
2 |
| Shared static token | Running behind a gateway that handles OAuth |
3 | (default) | Google OAuth | Claude.ai (or another MCP client) connects directly |
Mode 3: Google OAuth (direct connections)
The default. Claude.ai performs OAuth discovery and Dynamic Client Registration against this proxy, users sign in with Google, and each request carries a per-user identity. Requires GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and MCP_BASE_URL.
Mode 2: Static shared token (gateway-fronted)
For topologies where an upstream gateway β for example agentgateway β terminates the real OAuth flow and forwards requests to this proxy:
Claude.ai ββOAuthβββΆ agentgateway ββBearer <MCP_AUTH_TOKEN>βββΆ mcp-proxyThe client never talks to the proxy directly, so the proxy has no OAuth flow to participate in β it only needs to confirm the caller is the gateway. Configure the gateway to set a fixed upstream header:
Authorization: Bearer <MCP_AUTH_TOKEN>Generate the token with:
openssl rand -hex 32Tokens shorter than 32 characters are rejected at startup.
Limitations. A static token has no expiry, no rotation, and no per-user identity β every request is logged as the same client, so the user-identity tracking available in Google OAuth mode does not apply. It is suitable for a machine-to-machine credential between two services you control, not for multi-user access.
This is not a substitute for network scoping. The token stops casual access; the network boundary is what keeps the internet out. If the gateway runs on the same host, set
MCP_HOST=127.0.0.1so the proxy is not reachable from the rest of your network. In Docker, prefer a shared network with the gateway over publishing the port.
Known integration risk: if your gateway forwards the client's Authorization header rather than setting a fixed one, the client's token overwrites the static token and every request returns 401. Verify with an end-to-end tool call after configuring.
Mode 1: Disable authentication
MCP_DISABLE_AUTH=true leaves the proxy completely open to anything that can reach the port. Intended for local debugging on a loopback bind. Never enable it on a host reachable from an untrusted network.
Environment Variables
Variable | Required | Description | Default |
| β οΈ | Shared static token (auth mode 2). Min 32 chars | - |
| β | Disable authentication entirely (mode 1) |
|
| β οΈ | OAuth 2.0 Client ID (required for mode 3) | - |
| β οΈ | OAuth 2.0 Client Secret (required for mode 3) | - |
| β οΈ | Public URL for OAuth callbacks (mode 3) | - |
| β οΈ | JWT signing key (recommended for production) | auto-generated |
| β | Path to MCP servers config |
|
| β | Server bind address |
|
| β | Server bind port |
|
| β | Enable live config reload |
|
| β | Config load retry attempts |
|
| β | Initial restart delay (seconds) |
|
| β | Global log level |
|
| β | Per-logger levels ( | - |
| β | Verbose auth logging |
|
β οΈ = required for a specific auth mode; see Authentication Modes above.
MCP Server Configuration
The mcp_config.json file uses the same format as Claude Desktop.
Getting Started: Copy the example config to create your own:
cp mcp_config.example.json mcp_config.jsonYour mcp_config.json is automatically ignored by git to prevent committing sensitive server URLs or credentials.
Note: Copy mcp_config.example.json to mcp_config.json to get started. The example file is version controlled; your mcp_config.json is gitignored to prevent committing sensitive configs.
Stdio Servers (npx, uvx)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/data"]
},
"python-server": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "/path/to/repo"]
}
}
}Remote HTTP/SSE Servers
{
"mcpServers": {
"remote-api": {
"url": "https://api.example.com/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer ${API_TOKEN}"
}
},
"sse-server": {
"url": "https://events.example.com/sse",
"transport": "sse"
}
}
}Mixed Configuration
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/data"]
},
"remote-api": {
"url": "https://api.example.com/mcp",
"transport": "http"
},
"database": {
"command": "uvx",
"args": ["mcp-server-postgres", "--connection-string", "${DATABASE_URL}"]
}
}
}Security Best Practices
Production Checklist
Use HTTPS - Required by Google OAuth (use Cloudflare Tunnel, Let's Encrypt, or cloud provider)
Set JWT signing key - Generate with
openssl rand -hex 32, setGOOGLE_JWT_KEYRestrict origins - Only add necessary domains to Google Cloud Console authorized origins
Use environment variables - Never commit
.envto git (add to.gitignore)Regular updates - Keep Docker image updated:
docker pull ghcr.io/jonhearsch/mcp-proxy:latestMonitor logs - Check for authentication failures:
docker logs mcp-proxyFirewall rules - Only expose ports 80/443 publicly
Backup configuration - Keep
mcp_config.jsonbacked up
Securing MCP Servers
{
"mcpServers": {
"sensitive-api": {
"command": "npx",
"args": ["-y", "mcp-server-custom"],
"env": {
"API_KEY": "${SENSITIVE_API_KEY}",
"DATABASE_URL": "${DATABASE_URL}"
}
}
}
}Store secrets in .env:
SENSITIVE_API_KEY=sk-prod-abc123...
DATABASE_URL=postgresql://user:pass@host/dbTroubleshooting
OAuth Authentication Issues
Problem: "OAuth authentication is required but not configured"
Solution: Check environment variables are set correctly:
export GOOGLE_CLIENT_ID="123456789-abc.apps.googleusercontent.com"
export GOOGLE_CLIENT_SECRET="GOCSPX-abc123..."
export MCP_BASE_URL="https://your-domain.com"Problem: "Redirect URI mismatch" error
Solution: Ensure Google Cloud Console redirect URI matches exactly:
- Authorized redirect URI: https://your-domain.com/auth/callback
- MCP_BASE_URL must match: https://your-domain.com
- No trailing slashes, must include protocolProblem: "JavaScript origin blocked"
Solution: Add authorized JavaScript origin in Google Cloud Console:
- Authorized JavaScript origins: https://your-domain.com
- Must match your MCP_BASE_URL domainServer Connection Issues
Problem: MCP servers fail to start
# Check logs
docker logs mcp-proxy
# Verify mcp_config.json is valid JSON
cat mcp_config.json | jq .
# Test individual server manually
npx -y @modelcontextprotocol/server-filesystem /dataProblem: "Port already in use"
# Find process using port 8080
sudo lsof -i :8080
# Stop existing process or use different port
MCP_PORT=8081 python proxy_server.pyProblem: Health check fails
# Test health endpoint
curl http://localhost:8080/health
# Expected response:
# {"status":"healthy","service":"mcp-proxy"}Google OAuth Setup Issues
Problem: Can't find OAuth consent screen
Solution: Ensure you've selected the correct project in Google Cloud Console
- Top navigation bar β Select correct project
- If no projects exist, create one firstProblem: "App not verified" warning
Solution: Normal for test/dev. For production:
- Complete OAuth consent screen verification process
- Or limit to Google Workspace organization (Internal app)Development
Local Development
# Clone repository
git clone https://github.com/jonhearsch/mcp-proxy.git
cd mcp-proxy
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up local OAuth (use http://localhost:8080)
export GOOGLE_CLIENT_ID="your-client-id"
export GOOGLE_CLIENT_SECRET="your-client-secret"
export MCP_BASE_URL="http://localhost:8080"
# Run with live reload
export MCP_LIVE_RELOAD=true
python proxy_server.pyTesting OAuth Flow
# 1. Start server
python proxy_server.py
# 2. Visit in browser (will redirect to Google OAuth)
open http://localhost:8080/.well-known/oauth-authorization-server
# 3. Check DCR endpoint
curl -X POST http://localhost:8080/dcr \
-H "Content-Type: application/json" \
-d '{"client_name":"test","redirect_uris":["http://localhost"]}'
# 4. Check health (no auth required)
curl http://localhost:8080/healthBuilding Docker Image
# Build
docker build -t mcp-proxy:local .
# Test locally
docker run -p 8080:8080 \
-v $(pwd)/mcp_config.json:/app/mcp_config.json:ro \
--env-file .env \
mcp-proxy:localFAQ
Why Google OAuth instead of API keys?
When Claude.ai connects directly to this proxy, OAuth is not optional β Claude.ai's MCP connector performs OAuth discovery and Dynamic Client Registration (DCR), and has no field for pasting a static key. Google OAuth also provides:
Trusted authentication via Google accounts
No manual API key management
Built-in user identity tracking
Compatible with Claude.ai's security requirements
If instead you run the proxy behind a gateway that terminates OAuth itself, the proxy never sees the client's OAuth flow and a shared static token is appropriate β see Authentication Modes.
Can I use a different OAuth provider?
Not directly β the built-in provider is Google, optimized for Claude.ai compatibility. For other providers, check out the git history for previous OAuth implementations or contribute a provider!
A common alternative is to put a gateway in front of the proxy: the gateway handles whatever identity provider you like, and the proxy authenticates the gateway with MCP_AUTH_TOKEN (auth mode 2).
What MCP servers are supported?
All MCP servers that support:
stdio transport: npx, uvx commands
HTTP transport: REST API-style servers
SSE transport: Server-Sent Events servers
Examples: filesystem, git, postgres, slack, github, custom servers.
How do I update to the latest version?
# Docker
docker pull ghcr.io/jonhearsch/mcp-proxy:latest
docker-compose down && docker-compose up -d
# Python
git pull
pip install -r requirements.txt --upgradeCan I run multiple MCP Proxy instances?
Yes! Each instance can have different configurations:
# Instance 1 - Production
MCP_PORT=8080 MCP_CONFIG_PATH=prod_config.json python proxy_server.py &
# Instance 2 - Development
MCP_PORT=8081 MCP_CONFIG_PATH=dev_config.json python proxy_server.py &How do I monitor the server?
# Docker logs
docker logs -f mcp-proxy
# Health check
curl http://localhost:8080/health
# Detailed logs
MCP_LOG_LEVEL=DEBUG python proxy_server.pyContributing
Contributions welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open a Pull Request
License
MIT License - see LICENSE file for details.
Support
Discussions: https://github.com/jonhearsch/mcp-proxy/discussions
Documentation: CLAUDE.md
Acknowledgments
Made with β€οΈ for the Claude.ai community
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP gateway and cloud hosting for MCP servers, agents and apps like RAG, managed from your agent.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Hosted BigQuery MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted MCP server for GA4, Google Ads and Search Console. Google OAuth, nothing to install.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables clients to access multiple backend MCP servers through a single endpoint, with OAuth 2.1 authorization, namespaced tools, and secure credential management.2AGPL 3.0
- AlicenseAqualityBmaintenanceEnables aggregating multiple MCP servers behind a single HTTP/SSE endpoint, with Code Mode to reduce token usage and support for OAuth and sandboxed execution.5201 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables Claude Cowork to securely connect to remote MCP servers hosted on a homelab over public HTTPS, using Google OAuth for authentication and access control.-
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to connect to a single MCP endpoint that aggregates many MCP servers and built-in tools, with multi-user authentication, per-user server configuration, encrypted secrets, and a skills hub.MIT