Best of · AI Agents
Best code context tools for agents (2026)
Stack Gems reviews 12 code context tools for agents: 11 free or open source, 1 hosted with a real free tier. These are the top 10, each with its verdict and the Catch we would want to know before installing it.
Order: free and open source first, then hosted products with a real free tier, then paid-led; catalog order inside each group, with quiet or archived repos last. Not a score, and no tool pays for its place.
12 reviewed · 10 shown in full
Free / OSS · OSS/MIT · 74.4k GitHub stars
VerdictMIT local code graph for agents. Free forever; packers are the text cousins.
CatchIndex cost and residual context occupancy are real. Not a hosted SaaS brain. Distinct from Repomix/Gitingest (pack text) and Aider (edit loop).
Free / OSS · OSS/MIT · 28.9k GitHub stars
VerdictMIT repo packer. Free forever.
CatchStill a dump - huge monorepos blow context. Distinct from CodeGraph and Gitingest.
Free / OSS · OSS/MIT · 15.9k GitHub stars
VerdictMIT GitHub ingest. Free forever.
CatchPublic-URL convenience, not a private monorepo indexer. Distinct from Repomix local pack and CodeGraph graph.
Free / OSS · OSS/MIT · 30.4k GitHub stars
VerdictMIT symbol MCP for agents. Free LSP core; JetBrains plugin is optional paid.
CatchComplements agents; it is not a turnkey SWE loop. JetBrains plugin backend is paid optional (free trial) — LSP path stays free. Symbol quality tracks whatever language server you wire.
Free / OSS · OSS/MIT · 191k GitHub stars
VerdictMIT document converter. Free forever; use when agents need to read Office and PDF, not just code.
CatchVs files-to-prompt/Repomix/Gitingest (code-context tools): MarkItDown is the *document converter*, not a codebase packer. Heavy formats (PDF, images, audio) need optional dependencies (pdfminer, speechrecognition, Azure services). Quality varies by source format — complex PDFs may need the vision/Azure path.
Free / OSS · Apache-2.0 · 83.9k GitHub stars
VerdictApache-2.0 agent shell thrift. Cut tokens under agents; it is not the agent.
CatchVs the coding agent itself (Claude Code, Codex, Aider): RTK is a token-thrift layer under agents — output compression/proxy, not an agent, not a model router. You must wire it into the shell path the agent actually uses; over-aggressive filtering can hide the error you needed.
Free / OSS · AGPL-3.0 · 6.1k GitHub stars
VerdictAGPL-3.0 local privacy search. Useful personal context for agents; the network-copyleft Catch is loud.
CatchVs Gitingest and Repomix (package repositories for model context) and Agent Reach (agent-facing public-web access): Hister searches your local history/files, not a repo snapshot or the open web. AGPL-3.0 carries network copyleft if you modify Hister and offer it as a service; keep that boundary in your deployment review.
Free / OSS · Elastic-2.0 · 30.8k GitHub stars
VerdictElastic-2.0 source-available context middleware. Useful SQLite/FTS MCP sandbox; no hosted/managed offering without a careful license review.
CatchElastic License 2.0 is source-available, not OSI open-source; do not treat the `open-source` label as MIT/Apache freedom. ELv2 restricts offering the software as a hosted or managed service, so review the license before embedding or commercializing a managed Context Mode deployment. Vs a plain MCP server: this is output/context infrastructure, not another domain tool.
Free / OSS · OSS/MIT · 46.9k GitHub stars
VerdictMIT local code-graph MCP when agents need structural queries without a server-side model key; audit the install path and treat the ★ spike as a signal, not proof.
CatchVs CodeGraph, Serena, and Supermemory: this is a persistent local code-graph MCP from a static binary, not an AST/MCP peer alone, an LSP-symbol MCP alone, or a general memory API. Default install is curl|bash; Microsoft Defender has false-positived release binaries (Wacatac-family); star velocity is extreme (~45k, repo created 2026-02) — verify checksums/VirusTotal links before trusting the pipeline.
Free / OSS · OSS/MIT · 5.3k GitHub stars
VerdictMIT structural graph RAG when monorepo English query/edit needs Memgraph+Tree-sitter — not vector-only RAG and not a thin MCP graph.
CatchVs LAIN (thin ★9 MCP graph): not an MCP coordinator. Vs plain vector RAG: this is structural graph+Memgraph, not chunk embeddings alone. Enterprise support upsell on the site is optional — OSS path stands alone.
Also reviewed (2)
- files-to-prompt — Apache-2.0 concatenate a directory into one LLM prompt
- Context7 — MIT MCP client for live library docs; free anon / free key
FAQ
- What is the top free pick among code context tools for agents?
- CodeGraph leads the Stack Gems list for code context tools for agents. Verdict: MIT local code graph for agents. Free forever; packers are the text cousins.
- How many code context tools for agents does Stack Gems review?
- 12: 11 free or open source, 1 hosted with a real free tier. Each review has a verdict and an honest Catch; no tool pays for its spot.
- Which code context tools for agents can I self-host for free?
- CodeGraph, Repomix, Gitingest, Serena, MarkItDown, RTK, Hister, Codebase Memory MCP and 2 more.
- Which code context tools for agents have the most GitHub stars?
- MarkItDown (191k), RTK (83.9k), CodeGraph (74.4k), per GitHub on 2026-10-19. Stars measure attention, not fit; read the Catch.
- What is the catch with CodeGraph?
- Index cost and residual context occupancy are real.
Alternatives
Tags in this list
Related lists
JSON: /api/gems?subcategory=code-context · MCP: best_for on /api/mcp