← Directory

ViperJuice/mcp-gateway

Open Source
• Updated Sep 2, 2026, 02:15 AM

MCP Gateway (pmcp) is an open-source meta-server designed to minimize tool bloat in Claude Code and other MCP-compatible AI assistants.

Use Cases ▼
01

Using Claude Code with 20+ MCP servers without exceeding context limits by keeping only essential meta-tools active.

02

Automatically launching a Playwright browser session via a meta-tool when a task requires web scraping or UI testing.

03

Fetching up-to-date documentation from Context7 on demand rather than loading it permanently into the AI's context.

04

Adding a new MCP server (e.g., for database access) without restarting Claude Code, thanks to dynamic discovery.

05

Deploying the gateway as a Docker container to centralize tool access across multiple development environments.

06

Extending the gateway with custom meta-tools that aggregate functionality from several underlying servers.

What Problem It Solves ▼

AI assistants like Claude Code can become overwhelmed by tool bloat when many MCP servers are connected, each registering multiple tools that consume context window space and increase latency. MCP Gateway solves this by consolidating access behind a unified meta-server that exposes a minimal, stable tool surface. It dynamically starts specialized servers only when their tools are requested, preventing unnecessary context pollution and improving performance for developers and power users who rely on a large suite of MCP integrations.

Key Features ▼
✓

Significantly reduces token and memory usage by consolidating tools into a few meta-tools.

✓

Automatic, on-demand provisioning of heavy servers like Playwright and Context7.

✓

Progressive disclosure keeps the AI focused and minimizes prompt clutter.

✓

Easy to extend with custom tool mappings and new server integrations.

✓

Supports multiple deployment options (pip, Docker) and platforms.

Overview

MCP Gateway (pmcp) is an open-source meta-server designed to minimize tool bloat in Claude Code and other MCP-compatible AI assistants. It acts as a central gateway that exposes a small set of stable meta-tools (9 by default), which dynamically discover and provision other MCP servers on demand using a progressive disclosure model. Instead of loading dozens of tools into the AI's context, the gateway presents a clean, minimal interface and auto-starts specialized servers like Playwright for browser automation and Context7 for documentation retrieval only when needed. This reduces memory and token usage, resulting in faster, more focused interactions.

Full Description ▼

Under the hood, MCP Gateway manages lifecycle and discovery for multiple downstream MCP servers. It can be configured to start essential services automatically, while less frequently used tools remain dormant until a meta-tool invocation triggers their activation. The meta-server also supports dynamic tool discovery, allowing new MCP servers to be added without restarting the entire assistant session. This architecture keeps tool lists lean and avoids the context window dilution common when many tools are active concurrently.

MCP Gateway is built in Python and is distributed as both a pip-installable package and a Docker container. It uses a configuration-driven approach where users define which MCP servers to expose and under what conditions they should be activated. The server can run locally alongside Claude Code, or as a standalone daemon, providing compatibility across Linux, macOS, and Windows.

Key features include automatic Playwright and Context7 server provisioning, a stable set of 9 meta-tools for common operations, progressive disclosure of additional tool capabilities, and extensible architecture that lets developers add custom tool mappings. The project aims to simplify MCP tool management while preserving the flexibility of the broader MCP ecosystem.

Pros & Cons

Pros

+

Significantly reduces token and memory usage by consolidating tools into a few meta-tools.

+

Automatic, on-demand provisioning of heavy servers like Playwright and Context7.

+

Progressive disclosure keeps the AI focused and minimizes prompt clutter.

+

Easy to extend with custom tool mappings and new server integrations.

+

Supports multiple deployment options (pip, Docker) and platforms.

Cons

−

Adds a layer of indirection that may introduce slight latency on first tool invocation.

−

Requires configuration and understanding of MCP protocols, which may deter beginners.

−

Currently tailored primarily to Claude Code, limiting broader MCP client compatibility.

Similar Tools

mcp-proxy mcp-router claude-mcp-manager mcp-hub

More in Developer Tools