What LayerMap MCP server does
LayerMap MCP server exposes a local code map to MCP-compatible coding agents. It answers structural questions about a repository, including which functions or methods call a symbol, what a symbol calls, where it is declared, and where it is used. Caller traces can continue up to eight levels, reaching HTTP routes, handlers, jobs, and commands that start execution.
The server supports TypeScript, JavaScript, Go, Python, and Java. Resolution comes from the relevant compiler or type checker rather than name matching alone. This allows the map to account for calls through interfaces, base classes, templates, and decorators where the language tooling can resolve them.
How it works
The project is mapped locally and brought up to date when an MCP request runs. Results identify declarations, methods or functions, source locations, call sites, and route registrations when those relationships are available. Route output can include the HTTP method and full path, including prefixes added by a subrouter. Framework-specific examples in the README include Java, Python, and TypeScript route annotations.
A change-oriented check examines uncommitted edits and reports routes, jobs, and commands reached by changed functions. It also lists parts of the change that the map cannot see and existing tests related to the affected code. When a diff spans multiple packages or modules, the check groups them with their associated tests.
Setup and configuration
Installations are provided through the supported agent's plugin or package mechanism. Claude Code can add the LayerMap marketplace and install its plugin. Codex has equivalent marketplace and plugin commands. Pi installs the npm package, while DeepSeek Harness uses npx layermap setup dsh; that setup applies LayerMap to dsh profiles and can be reversed with npx layermap remove dsh.
Start a new agent session inside a Git repository. On first launch, npx downloads the pinned npm package. Claude Code asks for approval before each map-tool invocation in a project; the README documents npx layermap allow claude to allow the plugin's read-only tools across projects.
Tools and capabilities
LayerMap MCP server provides read-only capabilities for:
- Tracing callers upward toward routes, handlers, jobs, and commands.
- Tracing callees downward through the call graph.
- Listing modules, declarations, and symbol usages.
- Reporting the impact of uncommitted changes.
- Identifying existing tests related to changed code.
- Resolving language-specific relationships with compiler or type-checker tooling.
Limitations and notes
The supported language set is limited to TypeScript, JavaScript, Go, Python, and Java. The map is intended for code navigation and impact analysis, not semantic search, renaming, refactoring, or cross-repository search. The README notes that other tools may fit those needs better.
Benchmark results in the project documentation come from small samples created by the authors, so they should not be treated as a guarantee for every repository or task. Impact analysis can also take more time and tokens because agents may explore more code. Small local tasks that do not need impact analysis may receive no benefit from using the map.
The server runs on the user's machine and the README states that it sends nothing. Its tools are read-only; the documented change check examines edits rather than modifying source files.