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.
Codemesh is an MCP project maintained in the pyalwin/codemesh repository. The maintainer describes its purpose as “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…”. Read the project documentation for the complete scope.
The documented npm package is @pyalwin/codemesh. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.
The example declares CODEMESH_PROJECT_ROOT. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.
Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| codemesh_answer | One-call context assembly — returns all relevant files, call chains, hotspots, suggested reads |
| codemesh_explore | Search, context (multi-target), impact analysis |
| codemesh_trace | Follow call chains with source code |
| codemesh_enrich | Write back what you learned for future sessions |
| codemesh_workflow | Record multi-file workflow paths |
| codemesh_status | Graph health check |
{
"mcpServers": {
"codemesh": {
"command": "npx",
"args": [
"-y",
"@pyalwin/codemesh"
],
"env": {
"CODEMESH_PROJECT_ROOT": "/path/to/your/project"
}
}
}
}From the project documentation. Replace placeholders and example paths before connecting.
| Variable | Description | Required |
|---|---|---|
| CODEMESH_PROJECT_ROOT | Declared in the maintainer’s client configuration. | Check documentation |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Generate beautiful Excalidraw architecture diagrams with auto-layout and component styling
MCP server for SolarWinds Service Desk tickets, catalog, knowledge, ITSM operations, and workflows.
A lightweight way to use environment variables in your Cursor MCP server definitions.
Deterministic verification for AI-generated analysis: run a spec, inspect or diff a workbook