CP

consiliency/pmcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

23 stars 4 forks 质量 80 趋势 30MIT

MCP Gateway - 一个旨在减少 Claude Code 工具臃肿的元服务器,并实现渐进披露

概览

PMCP介于你的助手(Claude Code、Codex等)和可插入的服务之间——GitHub、Jira、数据库等90+。它不会在你提问前加载每个工具的完整模式,而是先提供一个简短菜单,只有在工具实际使用时才获取详细模式。 助手通过(模型上下文协议)——这是AI与其他软件通信的常用接口。当助手直接连接十几台MCP服务器时,会一次性将所有工具定义加载到上下文中。 上下文是有限且计量化的:每个工具定义都需要花费代币,挤出实际工作的空间。加载50+个你可能永远不会调用的工具又慢又昂贵,新增服务通常意味着重启助手。Anthropic指出上下文膨胀是MCP工具的一个关键挑战。 PMCP是保持这种紧凑且按需的单一连接点。

概述(AI 翻译)

一个网关,让你的AI编码助手使用数十种外部工具,而无需一开始就全部加载。

PMCP介于你的助手(Claude Code、Codex等)和可插入的服务之间——GitHub、Jira、数据库等90+。它不会在你提问前加载每个工具的完整模式,而是先提供一个简短菜单,只有在工具实际使用时才获取详细模式。

为什么它存在

助手通过MCP(模型上下文协议)——一种AI与其他软件通信的常用接口,连接到外部服务。当助手直接连接十几台MCP服务器时,它会一次性将所有工具定义加载到上下文中。

上下文是有限且计量化的:每个工具定义都需要花费代币,挤出实际工作的空间。加载50+个你可能永远不会调用的工具又慢又昂贵,新增服务通常意味着重启助手。Anthropic指出上下文膨胀是MCP工具的一个关键挑战。

PMCP是保持这种紧凑且按需的单一连接点。

这是给谁的

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

PMCP - Progressive MCP

A gateway that lets your AI coding assistant use dozens of external tools without loading them all up front.

PMCP sits between your assistant (Claude Code, Codex, and others) and the services it can plug into — GitHub, Jira, databases, 90+ more. Instead of loading every tool’s full schema before you’ve asked a question, it offers a short menu first and fetches the detailed schema only when a tool is actually used.

Why it exists

Assistants reach external services through MCP (Model Context Protocol) — a common interface for an AI to talk to other software. When an assistant connects to a dozen MCP servers directly, it loads all of their tool definitions into context at once.

Context is limited and metered: every tool definition costs tokens and crowds out room for the actual work. Loading 50+ tools you may never call is slow and expensive, and adding a new service usually means restarting the assistant. Anthropic has highlighted context bloat as a key challenge with MCP tooling.

PMCP is the single connection point that keeps this compact and on-demand.

Who it’s for

Developers and teams running AI coding assistants with many connected tools — especially anyone hitting “too many tools” or context-full limits.

What you get

  • Lower token cost — the assistant sees a compact capability card, not 50+ full schemas, before doing real work.
  • Load tools only when needed — downstream servers stay dormant until first use (“lazy by default”), and eager-start only when listed in autoStart.
  • Add tools without restarting — provision a new server on demand from a manifest of 90+.
  • One stable connection — your assistant sees ~26 steady meta-tools instead of a shifting set of many.
  • Guardrails built in — output size caps and optional secret redaction.
  • Works out of the box — core capability matching needs no API key.

Quick Start

Installation

# With uv (recommended)
uv pip install pmcp

# Or run directly without installing
uvx pmcp

# With pip
pip install pmcp

Upgrading from 2.x

3.0.0 refuses several things 2.7.3 accepted. Most importantly, a repository’s .mcp.json, .pmcp/manifest.yaml and .mcp-gateway-policy.yaml are ignored until you approve them with pmcp trust approve . MIGRATING.md has an upgrade checklist, a section for each breaking change (with a check, the fix and how to verify it), and how to roll back. To stay on 2.x for now, pin pmcp<3.

Capability matching is built-in — no API key needed. gateway.request_capability uses a pure-Python matcher that can return direct CLI guidance for installed

在 GitHub 查看完整 README

安装

uvx --from index-it-mcp==<approved-version> index-it-mcp stdio
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "pmcp": { "type": "http", "url": "http://127.0.0.1:3344/mcp" } } }