Claude Mcp Server Gateway
FreeNot checkedMCP server gateway for Claude Code, Claude Desktop, and Cline. Loads only specific tools from your MCPs as you need them and saves thousands of tokens. Works wi
About
MCP server gateway for Claude Code, Claude Desktop, and Cline. Loads only specific tools from your MCPs as you need them and saves thousands of tokens. Works with any Model Context Protocol server.
README
A Python MCP server gateway for Claude Desktop, Claude Code, Cline and Roo. Instead of loading all MCP tools at startup, it loads them on demand.
Works with: Claude Desktop (app), Claude Code (terminal), Cline and Roo (VSCode extensions)
Compatibility
| Platform | Config File | Supported |
|---|---|---|
| Claude Desktop | claude_desktop_config.json |
Yes |
| Claude Code | .claude.json or .mcp.json |
Yes |
| Cline (VSCode) | cline_mcp_settings.json |
Yes |
The MCP server problem
When you connect multiple MCP servers to Claude:
- GitHub MCP server: 51 tools
- Slack MCP server: 20 tools
- Google Drive MCP: 15 tools
- Filesystem MCP: 12 tools
That's 100+ MCP tool definitions loaded before you even start. Each tool's JSON schema eats up tokens.
What this Claude MCP server gateway does
The gateway acts as a single MCP server with 3 tools:
list_available_mcps- shows configured MCP serversload_mcp_tools- loads tools from a specific MCP servercall_mcp_tool- executes the tool
Model Context Protocol servers only start when Claude actually needs them.
Setup
Requirements
- Python 3.11+ (for MCP Python SDK)
- Claude Desktop, Claude Code, or Cline/Roo
- MCP servers you want to use
Install
git clone https://github.com/bzsasson/claude-mcp-server-gateway.git
cd claude-mcp-server-gateway
python3.11 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install mcp python-dotenv
Configure API keys
cp .env.example .env
# Edit .env with your tokens
Claude Desktop MCP server configuration
Add to your Claude Desktop config:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"gateway": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/claude-mcp-server-gateway/dcl_wrapper.py"]
}
}
}
Restart Claude Desktop.
How to add MCP server to Claude Code
Claude Code MCP server setup uses a similar config with one additional field.
User-level configuration (all projects)
Edit ~/.claude.json:
{
"mcpServers": {
"gateway": {
"type": "stdio",
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/claude-mcp-server-gateway/dcl_wrapper.py"]
}
}
}
Project-level configuration
For project-specific MCP servers, create .mcp.json in your project root:
{
"mcpServers": {
"gateway": {
"type": "stdio",
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/claude-mcp-server-gateway/dcl_wrapper.py"]
}
}
}
Claude Code will prompt for approval when using project-scoped servers.
Alternative: Claude Code CLI
# Add the gateway using CLI
claude mcp add gateway --scope user \
--command /path/to/.venv/bin/python \
-- /path/to/claude-mcp-server-gateway/dcl_wrapper.py
# Verify it's added
claude mcp list
Cline/Roo MCP server configuration
For Cline and Roo (VSCode extensions), the MCP server gateway configuration goes in:
Mac: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows: %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
"mcpServers": {
"gateway": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/claude-mcp-server-gateway/dcl_wrapper.py"],
"disabled": false
}
}
}
Restart VSCode after updating.
How it works
- Claude starts - sees gateway (3 tools)
- You ask about GitHub - Claude calls
list_available_mcps - Claude sees GitHub available - calls
load_mcp_tools("github") - Gateway returns GitHub's tool list
- Claude picks the right tool - calls
call_mcp_tool("github", "search_repositories", {...}) - Gateway spins up GitHub MCP, runs the tool, returns results
Adding MCP servers to the gateway
Edit dcl_wrapper.py and add to the MCP_SERVERS dict:
MCP_SERVERS = {
"your-server": {
"command": "npx",
"args": ["-y", "your-mcp-package"],
"env": {
"API_KEY": os.getenv("YOUR_API_KEY", "")
},
"description": "What it does"
}
}
Currently configured servers
- github
- slack
- google-drive
- filesystem
- postgres
- memory
- brave-search
(Check dcl_wrapper.py for the full list)
Limitations
- Small delay on first tool use (server startup)
- Each MCP server connection is temporary
- No persistence between calls
Troubleshooting
Gateway not appearing
- Check Python path in config points to virtual environment
- Verify
dcl_wrapper.pypath is correct - Restart Claude Desktop/Code/VSCode completely
MCP server connection errors
- Check API keys in
.envfile - Verify MCP server package is installed
- Check gateway logs for errors
Claude Code specific issues
- Make sure to include
"type": "stdio"in config - For project configs, approve when prompted
- Use
claude mcp listto verify installation
Files
dcl_wrapper.py- The gateway server.env- Your API keysrequirements.txt- Python dependencies
License
MIT
Installing Claude Mcp Server Gateway
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/bzsasson/claude-mcp-server-gatewayFAQ
Is Claude Mcp Server Gateway MCP free?
Yes, Claude Mcp Server Gateway MCP is free — one-click install via Unyly at no cost.
Does Claude Mcp Server Gateway need an API key?
No, Claude Mcp Server Gateway runs without API keys or environment variables.
Is Claude Mcp Server Gateway hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Claude Mcp Server Gateway in Claude Desktop, Claude Code or Cursor?
Open Claude Mcp Server Gateway on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Claude Mcp Server Gateway with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
