Mar 2026
Nexus-MCP: Hybrid Code Intelligence Server
- Live site
- Public repo
- Published package
Built to unblock a client engagement: a large, undocumented Flutter codebase that AI agents could not navigate reliably. Combines vector search, BM25 and a structural code graph (containment and imports), so an agent uses an estimated 70–90% fewer tokens to find relevant code and 30–60% fewer across a typical session. Published on PyPI (nexus-mcp-ci) with 3,500+ downloads and listed on the Glama MCP marketplace. 10 tools in one local server, tree-sitter parsing across 25+ languages, within a 350MB memory budget, no cloud dependency and no API keys.
- PyPI downloads
- 4,100+
Problem
AI coding agents spend most of their token budget reading irrelevant code — grepping for a function, reading entire files, repeating for every dependency. Existing code intelligence tools are fragmented across separate servers, each consuming 500 MB+ RAM.
Approach
Built a single MCP server consolidating two predecessor projects. Dual parsing (tree-sitter for symbol extraction, ast-grep for structural graph) feeds three search engines fused with Reciprocal Rank Fusion (vector 0.5 + BM25 0.3 + graph 0.2). Added an ONNX Runtime model path (~50 MB vs ~500 MB on PyTorch) alongside the default bge-small-en model, used LanceDB with mmap for disk-backed vectors, and added FlashRank re-ranking, token budgeting, semantic memory with TTL, and production hardening (graceful shutdown, corrupt index recovery, rate limiting, audit logging).
Result
10 tools within a 350 MB memory budget — hybrid search, symbol lookup, explain, an import and containment graph, persistent memory and architecture mapping across 25+ languages. Call-edge extraction, and the impact analysis that depends on it, is the open next step. 607 tests, 18 Architecture Decision Records, published on PyPI (pip install nexus-mcp-ci) with 3,500+ downloads and listed on the Glama MCP marketplace, CI/CD with trusted publishing. Zero API keys, fully local.