mcp-proxy
Aggregating MCP proxy with ~95% context reduction through progressive tool disclosure
Install / Use
claude mcp add IAMSamuelRodda -- npx -y github:IAMSamuelRodda/mcp-proxyIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of mcp-proxy
mcp-proxy scores 74/100 on our quality scale, 435th of 542 AI & Machine Learning skills we index.
Its MCP Server is 9.5 KB long, well organised into 32 sections with 11 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 7 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 81/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
mcp-proxy compared with similar skills
All 4 of these similar skills score higher than mcp-proxy; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mcp-proxy (this skill)by IAMSamuelRodda | 74 | 3 | 7mo ago | MCP Server |
| cavemanby JuliusBrussee | 100 | 107.5k | today | CLAUDE.md |
| claude-memby thedotmack | 100 | 94.5k | 1d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 85.0k | 8d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 83.8k | 11d ago | CLAUDE.md |
Frequently asked questions
- How do I install mcp-proxy?
- Run
claude mcp add IAMSamuelRodda -- npx -y github:IAMSamuelRodda/mcp-proxy. The install tabs above show the steps for each supported agent. - Which AI agents does mcp-proxy work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is mcp-proxy safe to use?
- It is MIT-licensed and scores 81/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mcp-proxy still maintained?
- The repository was last updated about 7 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubmcp-proxy
An aggregating MCP proxy that reduces context window usage by ~95% while providing zero-latency tool execution.
How It Works
Instead of exposing all tools directly to Claude (consuming ~15,000+ tokens), mcp-proxy exposes just 2 meta-tools:
get_tools_in_category- Navigate a hierarchical tree of available toolsexecute_tool- Execute any tool by its path
This progressive disclosure pattern reduces context to ~800 tokens while maintaining full access to all tools.
Features
| Feature | Benefit | |---------|---------| | 95% context reduction | ~800 tokens instead of ~15,000 | | Background preloading | Zero cold-start latency | | Multi-transport | stdio, SSE, HTTP Streamable | | Graceful degradation | Failed servers disabled, don't block | | Secrets integration | Optional OpenBao/Vault support | | Source-based installation | MCP servers installed from git/local sources | | Portable config | Variable expansion for machine-independent configs |
Prerequisites
| Dependency | Purpose | Install |
|-----------|---------|---------|
| Go 1.21+ | Build mcp-proxy binary | go.dev/dl or ./scripts/install-go.sh |
| Python 3.10+ | MCP server runtimes | Usually pre-installed |
| jq | JSON config parsing | sudo apt install jq / brew install jq |
| envsubst | Variable expansion in configs | sudo apt install gettext-base / brew install gettext |
| uv (optional) | Faster Python package installs | docs.astral.sh/uv |
Quick Start
# 1. Clone
git clone https://github.com/IAMSamuelRodda/mcp-proxy.git
cd mcp-proxy
# 2. Create your config
cp config/config.template.json config/config.local.json
# 3. Edit config.local.json:
# - Remove example-* entries
# - Add your MCP servers with source URLs
# - Keep ${VARIABLES} as-is (expanded automatically)
# 4. Bootstrap (validates config, installs servers, updates ~/.claude.json)
./scripts/bootstrap.sh
# 5. Restart Claude Code
Minimal Config Example
{
"mcpProxy": {
"hierarchyPath": "${MCP_PROXY_DIR}/hierarchy",
"options": { "lazyLoad": true, "preloadAll": true }
},
"mcpServers": {
"my-server": {
"source": { "type": "git", "url": "https://github.com/you/my-mcp.git" },
"transportType": "stdio",
"command": "${MCP_SERVERS_DIR}/my-server/.venv/bin/python",
"args": ["${MCP_SERVERS_DIR}/my-server/server.py"],
"envFile": "${MCP_SERVERS_DIR}/my-server/.env",
"env": {},
"options": { "lazyLoad": true }
}
}
}
Key points:
- Use
${MCP_SERVERS_DIR}for server paths (expands to~/.claude/mcp-servers) - Use
${MCP_PROXY_DIR}for proxy paths (expands to~/.claude/mcp-proxy) - Add
envFilefor.envsecrets OR useenv: {}for inline variables - Every server needs a
sourcefor bootstrap to install it
Bootstrap Workflow
The bootstrap script orchestrates full workstation setup:
./scripts/bootstrap.sh [FLAGS]
| Flag | Behavior |
|------|----------|
| (none) | Default: MCP servers → mcp-proxy |
| --secure | Include secrets infrastructure (bitwarden-guard, obao) |
| --refresh | Config + hierarchy only (fast, skips source updates) |
| --force | Clean reinstall all MCP servers from source |
What it does:
- Validates config - Checks for missing/placeholder values
- Installs MCP servers - Clones from git, creates venvs
- Builds mcp-proxy - Compiles Go binary + structure generator
- Deploys - Copies to
~/.claude/mcp-proxy/, expands variables - Updates ~/.claude.json - Adds mcp-proxy entry automatically
- (--secure only) Installs bitwarden-guard + obao
Configuration
Portable Config with Variables
Config files use variables that are expanded at deploy time:
{
"mcpProxy": {
"hierarchyPath": "${MCP_PROXY_DIR}/hierarchy"
},
"mcpServers": {
"my-server": {
"source": {
"type": "git",
"url": "https://github.com/user/mcp-server.git"
},
"command": "${MCP_SERVERS_DIR}/my-server/.venv/bin/python",
"args": ["${MCP_SERVERS_DIR}/my-server/server.py"]
}
}
}
Available variables:
| Variable | Default |
|----------|---------|
| ${MCP_SERVERS_DIR} | ~/.claude/mcp-servers |
| ${MCP_PROXY_DIR} | ~/.claude/mcp-proxy |
| ${HOME} | User home directory |
Source Types
Each MCP server can specify a source for installation:
Git source (recommended):
"source": {
"type": "git",
"url": "https://github.com/user/mcp-server.git"
}
Local source (for development):
"source": {
"type": "local",
"path": "~/repos/my-mcp-server"
}
Remote HTTP (no installation needed):
"transportType": "streamable-http",
"url": "https://example.com/mcp"
Update Behavior
| Source Type | Update Mechanism |
|-------------|------------------|
| Git | git pull on each bootstrap run |
| Local | Clean replace (rm + cp) preserving .venv |
| Remote | No installation, connects directly |
Venv rebuilds only occur when pyproject.toml or requirements.txt changes (hash-based detection).
Setup Options
| Mode | Secrets Storage | Best For |
|------|-----------------|----------|
| Simple | .env files per server | Local dev, single machine |
| Secure | OpenBao + Bitwarden | Production, multi-machine, audit trails |
Simple mode: Configure MCP servers with environment variables. See config.template.json.
Secure mode: Full secrets management with OpenBao, Bitwarden integration. See docs/SECURE_SETUP.md.
Claude Code Integration
Add to ~/.claude.json:
{
"mcpServers": {
"mcp-proxy": {
"type": "stdio",
"command": "~/.claude/mcp-proxy/mcp-proxy",
"args": ["--config", "~/.claude/mcp-proxy/config.json"]
}
}
}
⚠️ CRITICAL: Your
~/.claude.jsonshould contain ONLY themcp-proxyentry above.Remove all other MCP server entries (cloudflare, joplin, etc.) - the proxy handles them.
Having both direct servers AND mcp-proxy causes duplicate connections and wasted context.
The install script will detect this and prompt you to clean up automatically.
Finding MCP Servers
mcp-proxy aggregates any MCP server that uses stdio, SSE, or Streamable HTTP transport. To find servers to add:
- mcp.so — Community registry of MCP servers
- modelcontextprotocol/servers — Official reference implementations
- awesome-mcp-servers — Curated list
Add any server to your config with a source field and bootstrap will install it automatically.
Architecture
┌─────────────────────────────────────────────────────┐
│ Claude Code │
│ │ │
│ ▼ │
│ ┌──────────────────────────────┐ │
│ │ mcp-proxy │ │
│ │ │ │
│ │ 2 meta-tools (~800 tokens) │ │
│ │ • get_tools_in_category() │ │
│ │ • execute_tool() │ │
│ │ │ │
│ │ Background: preload all │ │
│ └──────────────────────────────┘ │
│ │ │
│ ┌──────────────────┼──────────────────┐ │
│ ▼ ▼ ▼ │
│ [Server 1] [Server 2] [Server 3] │
│ warm warm warm │
└─────────────────────────────────────────────────────┘
Project Structure
mcp-proxy/
├── cmd/mcp-proxy/ # Main entry point
├── internal/
│ ├── client/ # MCP client connections
│ ├── config/ # Configuration parsing
│ ├── hierarchy/ # Tool schema management
│ ├── secrets/ # Secrets provider interface
│ └── server/ # Proxy server logic
├── structure_generator/ # Hierarchy generation tool
├── config/ # Configuration templates
│ ├── config.template.json # Portable template with variables
│ └── config.local.json # Your local config (gitignored)
├── scripts/
│ ├── bootstrap.sh # Full setup: install MCP servers + build proxy (start here)
│ ├── install.sh # Binary-only: rebuild proxy without touching servers
│ └── install-go.sh # Install Go if missing
└── docs/
└── SECURE_SETUP.md # OpenBao + Bitwarden guide
Development
# Build
make build
# Test
go test ./...
# Deploy binary only (keeps existing config)
make deploy
# Full install (binary + config from config.local.json)
make install
# Regenerate hierarchy only
make generate-hierarchy
Acknowledgments
This project was inspired by voicetreelab/lazy-mcp, which introduced the elegant 2-meta-tool pattern for progressive tool disclosure. mcp-proxy extends this foundation with background preloading, multi-transport support, secrets integration, and production resilience features.
License
MIT License
Related Skills
caveman
107.5k🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
claude-mem
94.5kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
85.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
83.8kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
