Joncik91/slim-mcp
MCP proxy that gives agents their context window back
Platform-specific configuration:
{
"mcpServers": {
"slim-mcp": {
"command": "npx",
"args": [
"-y",
"slim-mcp"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
MCP proxy that compresses tool schemas, lazy-loads definitions, caches responses, and aggregates multiple servers -- giving AI agents their context window back.
Tested against 3 real MCP servers (42 tools total) on a production Claude Code machine:
| Feature | What happened | Tokens | |---------|--------------|--------| | Without slim-mcp | 42 raw tool schemas | 5,812 | | Lazy loading | 42 slim indexes | 2,191 (62% saved) | | Compression | Trimmed descriptions, deduped params | Stacks on full schemas | | Caching | 2nd identical call → instant | ~1,644 saved per repeated call |
Single server (8 tools): 715 → 611 tokens (15% compression). Multi-server (42 tools): lazy loading dominates at 62%. Both features stack -- a 50-tool setup with full schemas sees 80-95% combined reduction.
Every tool call routed correctly. Cache hit confirmed on repeated calls. All 203 tests pass.
npm install -g slim-mcpSingle server -- wrap any MCP server:
slim-mcp -- npx -y @modelcontextprotocol/server-filesystem /tmpMultiple servers -- create .slim-mcp.json:
{
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" }
}
}
}slim-mcpRemote server:
slim-mcp --url https://mcp.example.com/mcp --header "Authorization:Bearer $TOKEN"In .mcp.json:
{
"mcpServers": {
"tools": {
"command": "npx",
"args": ["slim-mcp", "--config", "/path/to/.slim-mcp.json"]
}
}
}Or wrap a single server:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["slim-mcp", "--", "npx", "-y", "@modeLoading reviews...