pcompass: a sub-10ms local router that tames 20+ MCP servers eating your agent context
HackyHarish · reddit · 2026-10-21
Developer HackyHarish open-sourced Prompt Compass (pcompass) after 20+ MCP servers and dozens of skills clogged his agent context window.
Problems addressed
- Context clutter: thousands of tokens burned before the real question, tool confusion, higher latency and API bills
- Tool fragmentation: skills configured in .cursor/ don't exist for Claude Code or Gemini CLI
- Security: third-party skills leaking env secrets or hiding prompt-injection strings
What it does
- Scans project and home directories to index every SKILL.md, MCP server, system prompt/rule file, and dev CLI
- Routes prompts in <10ms with local BM25 ranking, injecting only the 1-3 relevant tools under a strict 400-token budget
- Sanitizes credentials, API keys, hidden Unicode direction markers, and injection tags before the agent sees them
- pcompass setup hooks into Claude Code, Antigravity, Copilot CLI, Windsurf, OpenCode, and Codex
Under the hood: pure Python stdlib, zero Torch dependencies; 65 golden eval prompts with sub-6ms p95 latency and 100% top-3 recall; MIT/Apache-compatible open source.
Related event: pcompass: Open-Source Local Router Trims Agent Context Bloat(2 posts)→
More from coding & agent
- How do you evaluate GenAI output quality before shipping? Devs weigh in — ssnuopi · 2026-10-21
- RunInfra launches $10/mo coding plan: fastest open models across 19 agents incl. Claude Code — ycombinator · 2026-10-21
- Matt Shumer launches an 'AI employee' you assign work to over email — mattshumer_ · 2026-10-21
- uv-ty integration: how to enable PEP 723 script type checking — charliermarsh · 2026-10-21
- Astral ships experimental uv-ty integration: uv check type-checks your project — charliermarsh · 2026-10-21
- Dev's self-built tracker claims 7.1x speedup with Claude, 2.5 work-years banked — arthurcolle · 2026-10-21