home / mcp / claude mcp gateway server

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.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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-dotenv

Additional configuration and setup notes

You 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 .env

Available tools

list_available_mcps

Returns the list of configured MCP servers that are available to Claude for tool discovery.

load_mcp_tools

Loads the tools from a specified MCP server so Claude can present them for selection.

call_mcp_tool

Executes a selected tool from a loaded MCP server and returns the results to Claude.