home / mcp / claude mcp gateway server
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.
Configuration
View docs{
"mcpServers": {
"bzsasson-claude-mcp-server-gateway": {
"command": "/path/to/.venv/bin/python",
"args": [
"/path/to/claude-mcp-server-gateway/dcl_wrapper.py"
],
"env": {
"API_KEY": "YOUR_API_KEY_PLACEHOLDER"
}
}
}
}This Claude MCP server gateway provides a single, on-demand interface to manage multiple MCP servers for Claude Desktop, Claude Code, Cline, and Roo. It loads MCP tools only when needed, reducing startup overhead and token usage, while offering a consistent API to list, load, and execute tools from any configured MCP server.
You interact with the gateway through your Claude client to discover available MCP servers, load their tools on demand, and call a specific tool. The flow is straightforward: you ask Claude about a source (for example, a repository search or file access), Claude asks the gateway to list available MCPs, you choose which MCP to use, the gateway loads that server’s tools, and Claude calls the chosen tool. Tools are started only when needed, and model context servers start when Claude requires them.
Prerequisites you need before installation include Python 3.11 or newer and Claude Desktop, Claude Code, or Cline/Roo. You also need the MCP servers you plan to use.
# Clone the gateway repository
git clone https://github.com/bzsasson/claude-mcp-server-gateway.git
cd claude-mcp-server-gateway
# Create and activate a Python virtual environment
python3.11 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install required Python packages
pip install mcp python-dotenvYou will likely configure API keys in a local environment file. The setup provides an example environment file to copy and customize.
# Copy the example environment file
cp .env.example .env
# Edit the environment file to add your API keys
nano .envReturns the list of configured MCP servers that are available to Claude for tool discovery.
Loads the tools from a specified MCP server so Claude can present them for selection.
Executes a selected tool from a loaded MCP server and returns the results to Claude.