Gateway MCP Server

by delexw

313 downloads Not rated yet MIT license
GitHub

About

A gateway server that intelligently routes MCP requests to multiple backend servers.

Details

License
MIT license

Explore

- Routes MCP requests to multiple backend servers through a single gateway
- Exposes only 2 routing tools, bypassing client-side tool limits
- Experimental security with taint tracking and cross-backend isolation
- Docker-based deployment and automatic backend process management
- Supports environment variable substitution in backend configurations
- Works alongside other MCP servers in the same Claude Desktop setup

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Gateway MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


Then configure Claude Desktop as shown in the Installation section.

1. Clone this repository:

   git clone https://github.com/delexw/mcpware.git
cd mcpware

2. Configure your backends in config.json (see Configuration section below)

3. Set up your environment variables:


The gateway needs access to the Docker socket to launch backend containers. The mount path differs by platform:

Why is Docker socket access required?
mcpware acts as a process manager that launches backend MCP servers. When a backend is configured to run as a Docker container (e.g., ghcr.io/github/github-mcp-server), mcpware needs to:
- Create and start Docker containers
- Manage their lifecycle (stop/restart)
- Communicate with them via stdio

Without Docker socket access, mcpware cannot launch Docker-based backends and will fail with permission errors.

Run this script to check your Docker configuration:

bash
python scripts/check_docker_socket.py

1. Clone the repository:
bash
git clone https://github.com/delexw/mcpware.git
cd mcpware

2. Create a virtual environment (recommended):
bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate

3. Install development dependencies:
bash
pip install -r requirements.txt

bash

black src/ tests/ gateway_server.py

isort src/ tests/ gateway_server.py

flake8 src/ tests/ gateway_server.py --max-line-length=120


bash

docker run -it --rm \
-v /path/to/your/config.json:/app/config.json:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-e GITHUB_PERSONAL_ACCESS_TOKEN \
mcpware


The gateway supports environment variable substitution in backend configurations. Set these in your .env file:

bash

backend_server

Name of the backend server

server_tool

Name of the tool to call

tool_arguments

Arguments to pass to the tool

backend_name

(Optional) Specific backend to query

- Challenge: MCP clients often have limits on how many tools can be loaded at once
- Solution: mcpware exposes only 2 routing tools while providing access to unlimited backend tools
- Result: Connect to GitHub (50+ tools), databases, and more through a single gateway!

Routes a tool call to a specific backend server.

Parameters:
- backend_server: Name of the backend server
- server_tool: Name of the tool to call
- tool_arguments: Arguments to pass to the tool

Example:

{
"backend_server": "github",
"server_tool": "create_issue",
"tool_arguments": {
"owner": "myorg",
"repo": "myrepo",
"title": "New issue",
"body": "Issue description"
}
}

Discovers available backends and their tools.

Parameters:
- backend_name: (Optional) Specific backend to query

- Use security_status tool to monitor session security
- Configure policies in config.json (see config.example.json for full options)
- Automatic taint tracking after suspicious activity

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "gateway mcp server": {
            "mcpware": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "mcpware",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "mcpware": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "mcpware",
            "."
        ]
    }
}

mcpware

<div align="center">
mcpware Logo
</div>

<div align="center">

Tests
Coverage
Python
License: MIT

</div>

Route MCP requests intelligently to multiple backend servers with comprehensive security validation.

🎯 Key Features

🚀 Bypass Tool Limits

- Challenge: MCP clients often have limits on how many tools can be loaded at once - Solution: mcpware exposes only 2 routing tools while providing access to unlimited backend tools - Result: Connect to GitHub (50+ tools), databases, and more through a single gateway!

🔒 Built-in Security 🧪 (Experimental)

- Prevents cross-backend data leakage (e.g., database → GitHub) - Blocks SQL injection and sensitive data exposure - Taint tracking stops all access after suspicious activity - Mandatory security classification for each backend (public/internal/sensitive) - Opt In/Out Security Check from config.json

🔧 Additional Benefits

- Single entry point for multiple MCP servers - Automatic process management for backend servers - Docker-based isolation and deployment

Quick Start

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.