# LayerMap MCP server

> Provides coding agents with precise call graphs and impact analysis by resolving code relationships using actual language compilers.

- Repository: https://github.com/coffeecoproject/layermap
- Page: https://hostedmcp.org/servers/coffeecoproject/layermap
- Transport: stdio
- Stars: 9
- License: Apache-2.0
- Latest version: 0.1.43

## Install

### Claude Code

```sh
claude mcp add layermap -- npx -y layermap
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "layermap": {
      "command": "npx",
      "args": [
        "-y",
        "layermap"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "layermap": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "layermap"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"layermap","type":"stdio","command":"npx","args":["-y","layermap"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "layermap": {
      "command": "npx",
      "args": [
        "-y",
        "layermap"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add layermap -- npx -y layermap
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.layermap]
command = "npx"
args = ["-y", "layermap"]
```

### Gemini CLI

```sh
gemini mcp add -s user layermap npx -- -y layermap
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "layermap": {
      "command": "npx",
      "args": [
        "-y",
        "layermap"
      ]
    }
  }
}
```

## FAQ

### How does LayerMap resolve function calls?

It uses each language's own compiler or type checker to resolve calls through interfaces, base classes, templates, and decorators, rather than guessing from names.

### What kind of information can LayerMap provide in a single call?

It can trace callers up to 8 levels deep to HTTP routes, handlers, jobs, and commands, as well as identify callees, modules, and symbol usages.
