Context Engine: An MCP Server That Lets Coding Agents Navigate Code as a Graph
artwelf · reddit · 2026-08-04
A developer built Context Engine, a local MCP server designed to fix context pollution and hallucination issues when coding agents read codebases.
- The Problem: Agents typically read raw file text, but code is inherently a directed graph of symbols. Forcing text reading wastes compute on reconstructing relationships and causes API hallucinations.
- The Solution: Combining Tree-sitter and Language Servers, the tool shapes the codebase into a workflow-level interface. It offers primitives like outline (API signatures only), extract (selective fetching via symbol handles), and jump (following the graph across files/deps).
- Engineering Details: Supports batched requests to reduce model-to-tool round trips. Provides type-annotated code views by default to optimize for reading rather than editing.
- Agent Routing: Instead of blocking built-in file tools, it relies on injecting routing instructions into CLAUDE.md to guide the model on when to use these workflows.
More from coding & agent
- Verity: Open-Source Permission-Aware Memory for Multi-Tenant Agents — mattyboombalatti · 2026-08-04
- Peking Union Medical College Model Reduces False Positives to <1%, Seeks Local Agent Solutions — aigclink · 2026-08-04
- Dev Builds Fully In-Browser Research Agent Using Liquid AI's 2.6B Model — nicodotdev · 2026-08-04
- Research Unpacks Agent Memory: The Memory Contract of Sparse Event-KV — Zefeng Cai · 2026-08-04
- Cloudflare Launches Programmable Wallets to Enable AI Agent Payments — kleffew94 · 2026-08-04
- New Agent Memory Benchmark: 68% of Vector Stores Return Stale Facts — Future_AGI · 2026-08-04