
Codemesh
Codemesh builds a persistent knowledge graph of your codebase and exposes it through MCP tools or direct CLI calls. Instead of grepping and reading dozens of files, agents call codemesh_answer or codemesh_explore to get structured context about symbols, dependencies, and call paths. The graph supports semantic search with embeddings, PageRank scoring for relevance, and write-back operations so agents can enrich the graph with what they learn. Benchmarks show 71% cost reduction and 72% faster execution versus grep-and-read baselines across six real repositories. It runs as an MCP server for structured tool workflows or as a subprocess for zero-overhead Bash integration. Best for large codebases where discovery overhead dominates agent token budgets.
- tools
- 10
- transport
- STDIO
- env var
- 1
- last updated
- Apr 20, 2026
Tools
10 toolsPublic tool metadata for what this MCP can expose to an agent.
codemesh_mapBounded, one-level navigation through directories, files, symbols, and graph links
Bounded, one-level navigation through directories, files, symbols, and graph links
No parameter schema in public metadata yet.
codemesh_sourceExact source for a selected symbol ID
Exact source for a selected symbol ID
No parameter schema in public metadata yet.
codemesh_inspectExact source for a symbol plus direct call evidence, within a byte and symbol budget
Exact source for a symbol plus direct call evidence, within a byte and symbol budget
No parameter schema in public metadata yet.
codemesh_hydrateVerify saved symbol references and reopen exact source after context loss
Verify saved symbol references and reopen exact source after context loss
No parameter schema in public metadata yet.
codemesh_answerOptional ranked context assembly with source snippets
Optional ranked context assembly with source snippets
No parameter schema in public metadata yet.
codemesh_exploreSearch, context (multi-target), impact analysis
Search, context (multi-target), impact analysis
No parameter schema in public metadata yet.
codemesh_traceFollow call chains with source code
Follow call chains with source code
No parameter schema in public metadata yet.
codemesh_enrichWrite back what you learned for future sessions
Write back what you learned for future sessions
No parameter schema in public metadata yet.
codemesh_workflowRecord multi-file workflow paths
Record multi-file workflow paths
No parameter schema in public metadata yet.
codemesh_statusGraph health check
Graph health check
No parameter schema in public metadata yet.
Sponsors
Configuration
CODEMESH_PROJECT_ROOTAbsolute path to the local codebase to index
Readme
Codemesh
Intelligent code knowledge graph for AI coding agents
71% cheaper, 72% faster, 82% fewer tool calls vs baseline Grep+Read
on 6 real-world repos (Sonnet 4.6) — from a single codemesh index.
Benchmarks · Quick Start · Integrations · Write-Back · How It Works · API Reference · Full Results
The Problem
AI coding agents waste 40-80% of their tokens on discovery — grepping through files, reading irrelevant code, and rebuilding context they've already seen in previous sessions.
Details
- Repository
- github.com/pyalwin/codemesh
- Category
- Documents & Knowledge
- Package
@pyalwin/codemesh- Transport
- STDIO
- Registry
- MCP registry, active