{"_id":"@aiagentkarl/context-optimizer-mcp","name":"@aiagentkarl/context-optimizer-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aiagentkarl/context-optimizer-mcp","version":"0.1.0","description":"Solve MCP context window overload — smart tool pruning, relevance scoring, budget tracking","type":"module","main":"index.js","bin":{"context-optimizer-server":"index.js"},"keywords":["mcp","context","optimization","agent","tool-pruning","context-window","model-context-protocol"],"author":{"name":"AiAgentKarl"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_id":"@aiagentkarl/context-optimizer-mcp@0.1.0","gitHead":"4f846c1202a74a2445120e06bd9a5dc1ec703ccd","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-XGvuIOpHgSSShq2SAPKbSuIA8W1X1oV9zmB6hqg2PWZafv1VcecgZ1ophAHHmGwfzH+NkuH/M45NZPU/UUM66w==","shasum":"b4bc31a7a8ee0054f219cde89c231bb1a343d23b","tarball":"https://registry.npmjs.org/@aiagentkarl/context-optimizer-mcp/-/context-optimizer-mcp-0.1.0.tgz","fileCount":3,"unpackedSize":21796,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH6L/m4kFDNU+hvE9CttpTLUwhnTZWCiraNoYTJQnwkZAiAnQt11rXb/2QyAAXoAp3ZpPo4GqLk00F7DfmaQnvEtcA=="}]},"_npmUser":{"name":"aiagentkarl","email":"harrythunder.ai@gmail.com"},"directories":{},"maintainers":[{"name":"aiagentkarl","email":"harrythunder.ai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/context-optimizer-mcp_0.1.0_1774006345652_0.6939582621242941"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-20T11:32:25.575Z","0.1.0":"2026-03-20T11:32:25.788Z","modified":"2026-03-20T11:32:26.102Z"},"maintainers":[{"name":"aiagentkarl","email":"harrythunder.ai@gmail.com"}],"description":"Solve MCP context window overload — smart tool pruning, relevance scoring, budget tracking","keywords":["mcp","context","optimization","agent","tool-pruning","context-window","model-context-protocol"],"author":{"name":"AiAgentKarl"},"license":"MIT","readme":"# @aiagentkarl/context-optimizer-mcp\n\n**Solve the #1 MCP problem: context window overload.**\n\n## The Problem\n\nEvery MCP server you connect adds tool definitions to your context window. Connect 10 servers with 5-15 tools each, and you've burned 30-50k tokens before the agent even starts working. That's 15-25% of a 200k context window — gone.\n\nThe result: shorter conversations, lost context, degraded performance, higher costs.\n\n## The Solution\n\nContext Optimizer analyzes your task, scores server relevance, and recommends the minimal set of MCP servers you actually need. Typical savings: **60-80% fewer tokens** wasted on unused tool definitions.\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `analyze_task` | Analyze a task and recommend optimal server combination with savings % |\n| `estimate_context_usage` | Estimate token usage for a server set (tokens, % of 200k window) |\n| `optimize_server_set` | Optimize existing servers for a task — keep vs. remove with savings |\n| `suggest_minimal_set` | Absolute minimum servers needed (max 3) for maximum efficiency |\n| `get_server_catalog` | Full catalog of 18 known servers organized by category |\n\n## Quick Start\n\n### With Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"context-optimizer\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aiagentkarl/context-optimizer-mcp\"]\n    }\n  }\n}\n```\n\n### Run directly\n\n```bash\nnpx @aiagentkarl/context-optimizer-mcp\n```\n\n## Example\n\n**Task:** \"Check my Solana wallet balance and find the best DeFi yields\"\n\nWithout optimizer: 18 servers loaded = ~55k tokens (27% of context)\n\nWith optimizer:\n- Recommended: `solana` (relevance: 100)\n- Tokens used: ~4,800 (2.4% of context)\n- **Savings: 91%**\n\n## Server Catalog\n\nBuilt-in knowledge of 18 popular MCP servers across categories:\n\n- **System:** Filesystem\n- **Development:** GitHub\n- **Database:** PostgreSQL, SQLite\n- **Web:** Fetch, Brave Search, Puppeteer\n- **Communication:** Slack\n- **Productivity:** Google Drive\n- **Blockchain:** Solana\n- **Data:** OpenMeteo\n- **Infrastructure:** Cloudflare\n- **Monitoring:** Sentry\n- **Project Management:** Linear\n- **Agent Infra:** Memory\n- **Reasoning:** Sequential Thinking\n- **Utility:** Time\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-3c102d0f6da9f6f3c9a92db255b2b6ee"}