# LayerMap

This MCP server maps code dependencies and traces changes to HTTP routes, jobs, and commands. Use it when an agent needs impact analysis before editing.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: coffeecoproject
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/coffeecoproject/layermap
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/layermap

## What it does

LayerMap gives coding agents read-only MCP tools for exploring a codebase. A single query can show callers leading to HTTP routes, handlers, jobs, and commands, then list callees, declarations, and symbol usages. Its change check connects uncommitted edits with reached routes, jobs, commands, and related tests.

For TypeScript, JavaScript, Go, Python, and Java, links come from each language’s compiler or type checker rather than name matching. That means interface calls, base classes, templates, and decorators can be resolved as well. Caller and callee tracing reaches 8 levels in each direction. The server runs locally and does not edit the project.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add layermap -- npx -y layermap
```

### Codex

**Platform CLI**
```bash
codex mcp add layermap -- npx -y layermap
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "layermap": {
            "command": "npx",
            "args": [
                "-y",
                "layermap"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "layermap": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "layermap"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add layermap npx -y layermap
```

## When to use it
- trace a function’s callers to HTTP routes
- inspect the callees of a selected symbol
- find routes affected by an uncommitted change
- connect changed code with related tests

## Example prompts
- Show which HTTP routes are affected by changing `Storage.MarkFeedAsRead`.
- Trace callers of `internal/storage/entry.go` up to their handlers and routes.
- Check which tests are related to my uncommitted changes.

## Similar
- [Serena MCP: the IDE for your agent](https://affpapa.org/en/nevibecode/mcp/serena-mcp-the-ide-for-your-agent.md) — MCP server · ★ 30739
- [Compiler Explorer](https://affpapa.org/en/nevibecode/mcp/compiler-explorer.md) — MCP server · ★ 19155
- [Claude Code Explorer MCP](https://affpapa.org/en/nevibecode/mcp/claude-code-explorer-mcp.md) — MCP server · ★ 6236
- [Tolgee](https://affpapa.org/en/nevibecode/mcp/tolgee.md) — MCP server · ★ 4140
- [jshookmcp](https://affpapa.org/en/nevibecode/mcp/jshookmcp.md) — MCP server · ★ 2066
- [pyscn](https://affpapa.org/en/nevibecode/mcp/pyscn.md) — MCP server · ★ 1097

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
