mcp-gateway

mcp-gateway

3.2

If you are the rightful owner of mcp-gateway and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An MCP gateway that aggregates multiple MCP resource servers through a single interface.

MCP Gateway

An MCP gateway that aggregates multiple MCP resource servers through a single interface.

Features

  • MCP Proxy: A single endpoint for accessing multiple MCP servers
  • Batch Request Tool: Optimized parallel execution for multiple tool calls
  • Configuration Merging: Works with Claude desktop configuration

Configuration Paths

The gateway looks for configuration files in the following order:

  1. Environment variable: MCP_CONFIG_PATH if set
  2. Claude desktop config:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  3. Default: config.json in current directory

Config Merging with Claude

The gateway can read the proxyBatchMcpServers section from your Claude desktop config:

{
  "mcpServers": {
    "mcp-gateway": {
      "command": "npx",
      "args": [
        "-y",
        "@thinkware/mcp-gateway"
      ]
    }
  },
  "proxyBatchMcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ],
      "toolOverrides": {
        "read_file": {
          "enabled": true,
          "description": "Read complete contents of a file\nInput: path (string)\nReads complete file contents with UTF-8 encoding"
        },
        "read_multiple_files": {
          "enabled": false
        }
      }
    },
    "server-1": {
      "command": "/path/to/server1/build/index.js",
      "toolOverrides": {
        "some_tool": {
          "enabled": true,
          "description": "Custom description"
        }
      }
    }
  }
}

Server Configuration Options

OptionTypeDescriptionRequired
commandstringPath to server executableYes (for command servers)
argsstring[]Command argumentsNo
envobjectEnvironment variablesNo
urlstringSSE endpoint URLYes (for SSE servers)
toolOverridesobjectTool customizationNo

Tool Override Options

OptionTypeDescriptionDefault
enabledbooleanEnable/disable tooltrue
descriptionstringCustom tool descriptionOriginal description
disabledbooleanDisable entire toolfalse

Environment Variables

{
  "mcpServers": {
    "mcp-gateway": {
      "command": "npx",
      "args": [
        "-y",
        "@thinkware/mcp-gateway"
      ],
      "env": {
        "MCP_GATEWAY_LOG_FILE": "/path/to/logs/mcp-gateway.log"
      }
    }
  }
}

Development

# Install dependencies
npm install

# Development with auto-rebuild
npm run dev

# Build
npm run build