# CGIS Code Graph MCP server

> Enables AI agents to query a repository's symbol graph to perform impact analysis, call tracing, and structural audits across Python, TypeScript, and Go.

- Repository: https://github.com/zaebee/codegraph-brain
- Page: https://hostedmcp.org/servers/zaebee/codegraph-brain
- Transport: stdio
- Stars: 2
- License: MIT
- Latest version: 0.39.2

## Install

### Claude Code

```sh
claude mcp add codegraph-brain -- uvx codegraph-brain
```

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

```json
{
  "mcpServers": {
    "codegraph-brain": {
      "command": "uvx",
      "args": [
        "codegraph-brain"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "codegraph-brain": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "codegraph-brain"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "codegraph-brain": {
      "command": "uvx",
      "args": [
        "codegraph-brain"
      ]
    }
  }
}
```

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

```toml
[mcp_servers.codegraph-brain]
command = "uvx"
args = ["codegraph-brain"]
```

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

```json
{
  "mcpServers": {
    "codegraph-brain": {
      "command": "uvx",
      "args": [
        "codegraph-brain"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `GUARDIAN_PROVIDER` | no | no |  |
| `GUARDIAN_SKEPTIC` | no | no |  |

## Tools (11)

- `cgis_ingest`
- `cgis_overview`
- `cgis_find_symbol`
- `cgis_analyze_impact`
- `cgis_trace_flow`
- `cgis_get_structure`
- `cgis_context`
- `cgis_metrics`
- `cgis_audit_reachability`
- `cgis_drift`
- `cgis_validate`

## FAQ

### What languages does CGIS support?

It supports Python, TypeScript/TSX, and Go (for structure and metrics), as well as JSON and YAML for data key declarations.

### Is my code sent to a server?

No, the tool runs locally with no telemetry or accounts, and the graph stays on your disk, except when using cloud models for the Guardian reviewer.

### How can I use this with Claude Code?

You can add it using the plugin marketplace command: /plugin marketplace add zaebee/codegraph-brain and then /plugin install cgis@codegraph-brain.
