MCP Gateway MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add --transport http mcp-gateway-914e http://localhost:3010/mcp
README.md

Universal MCP aggregation server with 15 layers of token optimization

MCP Gateway

![LobeHub MCP listing badge][lobehub-mcp-badge]

Universal MCP aggregation server that routes 300+ tools from multiple MCP servers through a single endpoint with 15 layers of token optimization (95-98% reduction). Works with Claude Desktop, Claude Code, Cursor, OpenAI Codex, and VS Code Copilot.

Key Features

  • Multi-Server Aggregation — Connect multiple MCP servers (STDIO, HTTP, SSE) through one gateway endpoint
  • 15 Token Optimization Layers — Progressive disclosure, smart filtering, aggregations, code batching, delta responses, auto-summarization, and more
  • Web Dashboard — Real-time UI to manage tools, backends, and server lifecycle with hot-reload
  • Sandboxed Code Execution — Execute TypeScript/JavaScript in secure Node.js VM for batch operations
  • Skills System — Save and reuse code patterns for zero-shot task execution
  • Authentication — API Key and OAuth/JWT support with rate limiting
  • Docker Ready — Easy deployment with Docker/Compose

Quick Install

git clone https://github.com/abdullah1854/MCPGateway.git
cd MCPGateway
npm install
cp config/servers.example.json config/servers.json
npm run dev

Connect Your AI Client

Claude Desktop / Cursor / VS Code Copilot — Add as remote MCP server:

http://localhost:3010/mcp

Claude Code — Add to settings:

{
  "mcpServers": {
    "mcp-gateway": {
      "type": "url",
      "url": "http://localhost:3010/mcp"
    }
  }
}

Dashboard: http://localhost:3010/dashboard

Best for: teams that want one MCP endpoint, a browser dashboard, and aggressive token savings when working across many tools.

Quick Links

Quick Start in 3 Commands

npm install
cp config/servers.example.json config/servers.json
npm run dev

Then open http://localhost:3010/dashboard, connect your preferred client, and continue with the full Quick Start below for server configuration and production setup.

Supported MCP Clients

Client Support Notes
Claude Desktop Connect through the gateway's HTTP or SSE endpoints
Claude Code Reduces context overhead for large tool catalogs
Cursor Use one gateway to expose hundreds of backend tools
OpenAI Codex Works with the gateway's standard MCP endpoints
VS Code Copilot Centralizes MCP tooling across local and remote servers

MCP Gateway Architecture


How MCP Gateway Complements Anthropic's Tool Search

January 2025: Anthropic released Tool Search Tool - a native server-side feature for discovering tools from large catalogs using defer_loading and regex/BM25 search.

MCP Gateway and Anthropic's Tool Search solve different problems:

Problem Anthropic Tool Search MCP Gateway
Tool Discovery (finding the right tool from 100s) ✅ Native defer_loading + search ✅ Progressive disclosure
Result Filtering (trimming large results) ❌ Not available maxRows, fields, format
Auto-Summarization (extracting insights) ❌ Not available ✅ 60-90% token savings
Delta Responses (only send changes) ❌ Not available ✅ 90%+ savings for polling
Aggregations (count, sum, groupBy) ❌ Not available ✅ Server-side analytics
Code Batching (multiple ops in one call) ❌ Not available ✅ 60-80% fewer round-trips
Skills (reusable code patterns) ❌ Not available ✅ 95%+ token savings

Bottom line: Anthropic's Tool Search helps you find the right tool. MCP Gateway helps you use tools efficiently by managing large results, batching operations, and providing reusable patterns.

You can use both together - let Anthropic handle tool discovery while routing tool calls through MCP Gateway for r

Configuration

claude_desktop_config.json
{"mcpServers": {"mcp-gateway": {"type": "url", "url": "http://localhost:3010/mcp"}}}

Try it

Aggregate my local file system server and database server into the MCP Gateway.
Use the gateway to filter the results of my large database query to only include the last 10 entries.
Summarize the output of the connected MCP tools to reduce token usage.
Batch these three tool calls into a single request using the gateway.

Frequently Asked Questions

What are the key features of MCP Gateway?

Multi-server aggregation for STDIO, HTTP, and SSE MCP servers. 15 layers of token optimization including auto-summarization and delta responses. Web dashboard for real-time management of tools and server lifecycle. Sandboxed code execution in a secure Node.js VM. Skills system for saving and reusing code patterns.

What can I use MCP Gateway for?

Reducing context window usage by up to 95% when working with large tool catalogs. Centralizing multiple MCP servers into a single endpoint for Claude Desktop or Cursor. Performing server-side data aggregation and filtering before sending results to the AI. Managing tool discovery and execution across distributed local and remote environments.

How do I install MCP Gateway?

Install MCP Gateway by running: git clone https://github.com/abdullah1854/MCPGateway.git && cd MCPGateway && npm install && cp config/servers.example.json config/servers.json && npm run dev

What MCP clients work with MCP Gateway?

MCP Gateway works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Gateway docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare