# Project Context Map

> Project Context Map is an open-source MCP server for developer tools. Indexes a repo's import graph and git hotspots so coding agents read fewer files. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, VS Code, API, Linux, macOS, Windows, Self-hosted
- **Repository:** https://github.com/tamojit-123/project-context-map-mcp
- **MCP Registry name:** io.github.tamojit-123/project-context-map-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Project Context Map runs as a local MCP server that builds a structured memory of a codebase: which modules import which, where recent commits concentrate, and what the main entrypoints are. An agent can ask it for the relevant files first and then open only a handful, instead of walking directories and reading dozens of unrelated files.

The index is written to a .project.md summary, a machine-readable .project-map.json and a lighter .project-map.md. Dependency edges are extracted from ES and CommonJS imports and basic Python imports, and git hooks can refresh the map after commits, merges and pushes.

It suits developers working in medium or large JavaScript, TypeScript or Python repositories who use Claude Code, Cursor or VS Code agents daily and want to cut prompt token usage. Import extraction is limited to those languages and common patterns, so mixed or unusual stacks will get a thinner map.

## Features

- **Import topology graph:** Maps imports, exports and reverse usedBy edges so agents can see what depends on a file before editing it.
- **Git hotspot ranking:** Uses recent git history to surface frequently changed files and boost them when ranking tasks.
- **Sparse file reading:** Reads only indexed files inside the project root and rejects paths that escape it through symlinks.
- **Change log writing:** Writes in-root file changes and appends an entry to the project's Change Log.
- **Git auto-refresh hooks:** Installs post-commit, post-merge and post-push hooks that keep the map current.
- **Claude Code skill setup:** Generates an MCP config and a Claude Code skill file with a single command.

## Good for

- Giving a coding agent a map of a large repository before it starts a change
- Finding every caller of a module before refactoring it
- Limiting token spend on repeated agent sessions in the same codebase
- Identifying frequently changed files that need extra care during review

## Install

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

```sh
claude mcp add project-context-map-mcp -- npx -y project-context-map-mcp
```

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": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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 project-context-map-mcp -- npx -y project-context-map-mcp
```

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

```toml
[mcp_servers.project-context-map-mcp]
command = "npx"
args = ["-y", "project-context-map-mcp"]
```

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

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user project-context-map-mcp npx -- -y project-context-map-mcp

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

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

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": {
    "project-context-map-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "project-context-map-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 10 tools changes data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `read_project_context` (name suggests: reads): Returns the .project.md content for the repository
- `query_topology` (name suggests: reads): Matches a natural-language query against the index and returns paths with dependency and usedBy topology
- `read_files_sparse` (name suggests: reads): Reads file content only for indexed, in-root paths
- `write_and_log` (name suggests: changes): Writes in-root file changes and appends an entry to the Change Log
- `get_project_summary` (name suggests: reads): Returns project summary, tech stack, entrypoints, top modules and hotspots
- `refresh_project_map`: Regenerates the project map files
- `get_module_context` (name suggests: reads): Returns files, recent commits and likely impact area for a module
- `find_relevant_files` (name suggests: reads): Ranks relevant files for a task with a confidence score and avoidReading modules
- `get_recent_git_changes` (name suggests: reads): Summarizes git commits and file hotspots over the last N days
- `explain_file_role` (name suggests: reads): Explains a file's inferred role, module and recent commits

## FAQ

### How do I add Project Context Map to my MCP client?

Add a mcpServers entry that runs npx -y project-context-map-mcp serve --project-root . in your .mcp.json or client MCP settings. No global install or API key is required.

### Which languages does topology extraction cover?

It focuses on JavaScript, TypeScript, CommonJS and basic Python import patterns.

### What does Project Context Map need to run?

Node.js 20 or newer and an MCP-compatible client such as Claude Code, Cursor, Claude Desktop or VS Code.

### What license is Project Context Map released under?

It is released under the MIT license.

### Is Project Context Map free?

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

### How do I add Project Context Map to Claude Code?

Run this command in your terminal: claude mcp add project-context-map-mcp -- npx -y project-context-map-mcp

### What are the best alternatives to Project Context Map?

The closest alternatives to Project Context Map are Prelude, Cartograph, Cgraphy, Repovine and projectmind.

## Where this comes from

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

## Alternatives

- [Prelude](https://ai-powered.com/mcp/prelude): Prelude is an open-source MCP server for developer tools.
- [Cartograph](https://ai-powered.com/mcp/cartograph-2): Cartograph is an open-source MCP server for developer tools.
- [Cgraphy](https://ai-powered.com/mcp/cgraphy): Cgraphy is an open-source MCP server for developer tools.
- [Repovine](https://ai-powered.com/mcp/repovine): Repovine is an open-source MCP server for developer tools.
- [projectmind](https://ai-powered.com/mcp/projectmind): projectmind is an open-source MCP server for developer tools.
- [Mapnostics](https://ai-powered.com/mcp/mapnostics): Mapnostics is a freemium MCP server for developer tools.
- [Project Context Connector](https://ai-powered.com/mcp/project-context-connector): Project Context Connector is an open-source MCP server for developer tools.
- [TempoGraph](https://ai-powered.com/mcp/tempograph): TempoGraph is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/project-context-map
