# rpg-encoder MCP server

> Builds a semantic code graph using tree-sitter to provide AI agents with deep, whole-repository understanding through a single tool call.

- Repository: https://github.com/userFRM/rpg-encoder
- Page: https://hostedmcp.org/servers/userfrm/rpg-encoder
- Transport: stdio
- Stars: 33
- License: MIT
- Latest version: 0.6.7

## Install

### Claude Code

```sh
claude mcp add rpg-encoder -- npx -y rpg-encoder
```

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

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

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

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

### VS Code CLI

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

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

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

### Codex

```sh
codex mcp add rpg-encoder -- npx -y rpg-encoder
```

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

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

### Gemini CLI

```sh
gemini mcp add -s user rpg-encoder npx -- -y rpg-encoder
```

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

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

## Tools (27)

- `build_rpg`
- `update_rpg`
- `reload_rpg`
- `rpg_info`
- `semantic_snapshot`
- `search_node`
- `fetch_node`
- `explore_rpg`
- `context_pack`
- `impact_radius`
- `plan_change`
- `find_paths`
- `slice_between`
- `analyze_health`
- `detect_cycles`
- `reconstruct_plan`
- `auto_lift`
- `lifting_status`
- `get_entities_for_lifting`
- `submit_lift_results`
- `finalize_lifting`
- `get_files_for_synthesis`
- `submit_file_syntheses`
- `build_semantic_hierarchy`
- `submit_hierarchy`
- `get_routing_candidates`
- `submit_routing_decisions`

## FAQ

### How does rpg-encoder help AI coding agents?

It replaces inefficient file searches like grep and cat with a semantic graph, allowing agents to understand function intent and repository structure via a single snapshot.

### How can I run the lifting process without using my agent's tokens?

You can use the CLI to run autonomous lifting with a cheap external LLM provider like Anthropic or OpenAI using an API key.

### Does the graph stay up to date with my code changes?

Yes, the MCP server automatically re-syncs the graph whenever your working tree changes, such as when files are committed, staged, or unstaged.
