# Cartograph

> Cartograph is an open-source MCP server for developer tools. Ranks the files that matter in a repo and builds task-scoped context for coding agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/anthony-maio/cartograph
- **MCP Registry name:** io.github.anthony-maio/cartograph
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Cartograph is built on the idea that an agent should not be handed a whole repository. It ranks important files, maps dependencies, and caches structured artifacts so the next tool can pick up where the last stopped. The main path has three steps: `analyze` maps the repo, `packet` prepares a concrete job such as a bug fix, and `context --static` loads task-matched files plus nearby dependencies and tests using local heuristics, with no model call or API key.

A bundled example fixes a refresh-token expiry bug, where the packet points at the auth file and its test and leaves billing and catalog code out. The README warns that static matching can miss relevant code and that neither mode proves a file contains the bug.

Beyond the MCP server it ships a CLI, a Claude Code plugin with slash commands and documentation agents, and adapters for OpenClaw and Hermes. An optional model-backed workflow supports Gemini, OpenAI, OpenRouter and Ollama.

## Features

- **File ranking:** Identifies the files that matter in a repo instead of dumping everything.
- **Dependency maps:** Surfaces dependency hubs and relationships between files.
- **Task packets:** Turns a concrete job into a reusable working artifact.
- **Static context:** Loads task-matched files, dependencies and tests without a model call.
- **Run cache:** Stores each run with a manifest and artifacts for later export.
- **Host installers:** Installs for Claude Code, OpenClaw, Hermes or an MCP config snippet.

## Good for

- Orienting an agent in an unfamiliar codebase
- Preparing context for a bug-fix task
- Handing repo findings from one agent to another
- Generating a repository wiki with a chosen model provider

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add cartograph -- npx -y @anthony-maio/cartograph
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add cartograph -- npx -y @anthony-maio/cartograph
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.cartograph]
command = "npx"
args = ["-y", "@anthony-maio/cartograph"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user cartograph npx -- -y @anthony-maio/cartograph

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "cartograph": {
      "command": "npx",
      "args": [
        "-y",
        "@anthony-maio/cartograph"
      ]
    }
  }
}
```

## FAQ

### Does Cartograph need an API key?

Not for static mode. Model-backed runs need a provider configured, except Ollama, which needs no key.

### Where does Cartograph keep its cache?

In ~/.cartograph/cache on POSIX or the user profile .cartograph\cache folder on Windows.

### Which hosts does Cartograph support?

Claude Code, OpenClaw, Hermes, or any MCP client via the stdio server.

### How do I install Cartograph?

Install the npm package @anthony-maio/cartograph globally and run cartograph mcp.

### Is Cartograph free?

Yes. Cartograph is open source, so you can use and self-host it for free.

### How do I add Cartograph to Claude Code?

Run this command in your terminal: claude mcp add cartograph -- npx -y @anthony-maio/cartograph

### What are the best alternatives to Cartograph?

The closest alternatives to Cartograph are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/cartograph-2
