# ai-context

Gives an AI assistant a map of your codebase, dependency drift findings, and library docs matched to project versions. Useful when an agent needs to work with the structure and dependencies already in your repo.

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

## What it does

ai-context runs as a local MCP server through the `@vibgrate/cli` package. An assistant can query a project map with call relationships, import paths, and affected code areas. It can also retrieve drift findings and documentation for the library versions used by the project.

The map is refreshed on the next tool request after files change; it does not rely on a separate watcher or background process. Run `vg install` to configure MCP for a selected assistant and add a skill for querying the map. Node.js 22 or later is required. When local docs have limited coverage, the server can fall back to a hosted catalog. The `--local` flag disables that fallback, so missing local pages will not be fetched from the catalog.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add ai-context -- npx -y @vibgrate/cli
```

### Codex

**Platform CLI**
```bash
codex mcp add ai-context -- npx -y @vibgrate/cli
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ai-context": {
            "command": "npx",
            "args": [
                "-y",
                "@vibgrate/cli"
            ]
        }
    }
}
```

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add ai-context npx -y @vibgrate/cli
```

## When to use it
- trace function calls and import paths across a codebase
- rank dependency upgrades using drift findings
- identify code areas affected by a change
- retrieve library docs for versions used in a project

## Example prompts
- Show which parts of the project could be affected by a change to `AuthService`.
- Find docs for the version of this library used in the repo.
- Map the relationships between functions and imports in this codebase.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
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
