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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.