Codemesh MCP Server

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.

Local serverstdioMIT

What is the Codemesh MCP Server?

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.

Installation

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.

Configuration values

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.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
codemesh_answerOne-call context assembly — returns all relevant files, call chains, hotspots, suggested reads
codemesh_exploreSearch, context (multi-target), impact analysis
codemesh_traceFollow call chains with source code
codemesh_enrichWrite back what you learned for future sessions
codemesh_workflowRecord multi-file workflow paths
codemesh_statusGraph health check

How to install the Codemesh MCP Server

{
  "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.

Configuration

VariableDescriptionRequired
CODEMESH_PROJECT_ROOTDeclared in the maintainer’s client configuration.Check documentation