MCP Coordinator
Acts as a proxy for multiple MCP servers, reducing context window usage from 15,000+ tokens to ~500 tokens by dynamically loading servers on-demand and exposing only 3 tools instead of all tool definitions.
README
MCP Coordinator
An MCP server that acts as a proxy for multiple MCP servers, exposing only 3 tools to Claude instead of loading all tool definitions from each server. This dramatically reduces context window consumption while maintaining full access to all MCP capabilities.
The Problem
Each MCP server you add to Claude loads all its tool definitions into your context window. GitHub MCP alone can consume 50+ tool definitions worth of tokens on every single message.
The Solution
The MCP Coordinator exposes only 3 tools. When Claude needs to use an MCP, the Coordinator dynamically loads it, calls the tool, and returns just the result.
Features
- Reduce context window usage from ~15,000+ tokens to ~500 tokens
- Dynamically load MCP servers on-demand
- Reuse connections for better performance
- Easy manifest-based configuration for adding/removing servers
- Support for environment variable substitution in server configs
Tools
list_mcps
List all available MCP servers and their descriptions.
Inputs: None
Returns: Array of server names and descriptions from the manifest.
get_mcp_tools
Get the list of tools available in a specific MCP server.
Inputs:
server_name(string, required): Name of the MCP server fromlist_mcps
Returns: Array of tools with names, descriptions, and input schemas.
call_mcp_tool
Call a specific tool on an MCP server.
Inputs:
server_name(string, required): Name of the MCP servertool_name(string, required): Name of the tool to calltool_args(object, optional): Arguments to pass to the tool
Returns: The result from the MCP tool call.
Usage
The MCP Coordinator is designed for:
- Reducing context window consumption when using multiple MCP servers
- Projects that need access to many MCPs but not all at once
- Workflows where you want to query available tools before using them
- Keeping your Claude conversations lean and focused
Configuration
The coordinator itself requires no API keys or tokens. You only need to provide tokens for specific MCP servers in the manifest that require them (like GitHub MCP).
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"coordinator": {
"command": "node",
"args": ["C:\\path\\to\\mcp_coordinator\\build\\index.js"]
}
}
}
Usage with Claude Code
Project-Level Configuration
Create a .mcp.json file in your project root:
{
"mcpServers": {
"coordinator": {
"command": "cmd",
"args": ["/c", "node", "C:\\path\\to\\mcp_coordinator\\build\\index.js"]
}
}
}
Global Configuration (All Projects)
Create ~/.claude/.mcp.json:
{
"mcpServers": {
"coordinator": {
"command": "cmd",
"args": ["/c", "node", "C:\\path\\to\\mcp_coordinator\\build\\index.js"]
}
}
}
Passing Tokens for Specific MCPs
If you use MCP servers that require authentication (like GitHub), pass the tokens as environment variables:
{
"mcpServers": {
"coordinator": {
"command": "node",
"args": ["C:\\path\\to\\mcp_coordinator\\build\\index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token_here"
}
}
}
}
The coordinator passes these to child MCPs via the ${VAR_NAME} syntax in the manifest.
Adding MCP Servers
Edit src/manifest.json (and rebuild) or directly edit build/manifest.json.
MCPs That Need No Authentication
Many MCPs work without any tokens:
{
"servers": {
"sequential-thinking": {
"description": "Step-by-step thinking and problem decomposition",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"],
"env": {}
},
"filesystem": {
"description": "Read, write, and manage local files",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "C:/"],
"env": {}
}
}
}
MCPs That Require Authentication
Some MCPs need API tokens to access external services:
{
"servers": {
"github": {
"description": "GitHub operations: repos, issues, PRs, branches, commits",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
Environment variables use ${VAR_NAME} syntax and are resolved from the coordinator's environment at runtime. Only pass the tokens you actually need for the MCPs you're using.
Building
# Install dependencies
npm install
# Build TypeScript
npm run build
# Copy manifest to build folder
cp src/manifest.json build/manifest.json
Context Window Savings
| Approach | Tools in Context | Approximate Tokens |
|---|---|---|
| Direct GitHub MCP | 50+ tools | ~15,000 tokens |
| Direct + Filesystem + Fetch | 80+ tools | ~25,000 tokens |
| MCP Coordinator | 3 tools | ~500 tokens |
Included Servers
The default manifest includes:
- github - GitHub operations (repos, issues, PRs, branches, commits)
- filesystem - Read, write, and manage local files
- fetch - Fetch URLs and retrieve web content
Acknowledgments
- Reddit user u/mrgoonvn for the inspiration regarding MCP context bloat that led to this project
- Anthropic for the Model Context Protocol SDK
- The MCP community for the official server implementations (GitHub, Filesystem, Fetch, Sequential Thinking)
- Built with Claude Code
License
This MCP server is licensed under the GPL-3.0 License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the GPL-3.0 License. For more details, please see the LICENSE file in the project repository.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。