userfrm avatar

Rpg Encoder

userfrm/rpg-encoder

Gives Claude a semantic understanding of your codebase instead of forcing it to fumble through grep and cat calls. Uses tree-sitter to parse 15 languages into a graph of functions, classes, and dependencies, then lifts each entity into verb-object features like "validate JWT tokens" or "serialize config to disk." The semantic_snapshot tool compresses your whole repo into ~25K tokens so the LLM knows the architecture up front. When code changes, the graph auto-syncs before queries. You can lift features in-session with your agent subscription or run auto_lift to delegate to a cheap external API like Haiku. Search by intent with search_node, trace dependencies with explore_rpg and impact_radius, or ask plan_change to map out refactors. Built in Rust, ships as an npm binary, works with Claude Code, Cursor, or any MCP client.

GitHub stars
28
tools
27
transport
STDIO
last updated
Feb 24, 2026

Tools

27 tools

Public tool metadata for what this MCP can expose to an agent.

build_rpgIndex the codebase (run once, instant)

Index the codebase (run once, instant)

No parameter schema in public metadata yet.

update_rpgIncremental update from git changes

Incremental update from git changes

No parameter schema in public metadata yet.

reload_rpgReload graph from disk after external changes

Reload graph from disk after external changes

No parameter schema in public metadata yet.

rpg_infoGraph statistics, hierarchy overview, per-area lifting coverage

Graph statistics, hierarchy overview, per-area lifting coverage

No parameter schema in public metadata yet.

semantic_snapshotWhole-repo semantic understanding in one call (~25K tokens for 1000 entities)

Whole-repo semantic understanding in one call (~25K tokens for 1000 entities)

No parameter schema in public metadata yet.

search_nodeSearch entities by intent or keywords (hybrid embedding + lexical scoring)

Search entities by intent or keywords (hybrid embedding + lexical scoring)

No parameter schema in public metadata yet.

fetch_nodeGet entity metadata, source code, dependencies, and hierarchy context

Get entity metadata, source code, dependencies, and hierarchy context

No parameter schema in public metadata yet.

explore_rpgTraverse dependency graph (upstream, downstream, or both)

Traverse dependency graph (upstream, downstream, or both)

No parameter schema in public metadata yet.

context_packSingle-call search + fetch + explore with token budget

Single-call search + fetch + explore with token budget

No parameter schema in public metadata yet.

impact_radiusBFS reachability analysis — "what depends on X?"

BFS reachability analysis — "what depends on X?"

No parameter schema in public metadata yet.

plan_changeChange planning — find relevant entities, modification order, blast radius

Change planning — find relevant entities, modification order, blast radius

No parameter schema in public metadata yet.

find_pathsK-shortest dependency paths between two entities

K-shortest dependency paths between two entities

No parameter schema in public metadata yet.

slice_betweenExtract minimal connecting subgraph between entities

Extract minimal connecting subgraph between entities

No parameter schema in public metadata yet.

analyze_healthCode health: coupling, instability, god objects, clone detection

Code health: coupling, instability, god objects, clone detection

No parameter schema in public metadata yet.

detect_cyclesFind circular dependencies and architectural cycles

Find circular dependencies and architectural cycles

No parameter schema in public metadata yet.

reconstruct_planDependency-safe reconstruction execution plan

Dependency-safe reconstruction execution plan

No parameter schema in public metadata yet.

auto_liftOne-call autonomous lifting via cheap LLM API (Haiku, GPT-4o-mini, OpenRouter, Gemini)

One-call autonomous lifting via cheap LLM API (Haiku, GPT-4o-mini, OpenRouter, Gemini)

No parameter schema in public metadata yet.

lifting_statusDashboard — coverage, per-area progress, NEXT STEP

Dashboard — coverage, per-area progress, NEXT STEP

No parameter schema in public metadata yet.

get_entities_for_liftingGet entity source code for your agent to analyze

Get entity source code for your agent to analyze

No parameter schema in public metadata yet.

submit_lift_resultsSubmit the agent's semantic features back to the graph

Submit the agent's semantic features back to the graph

No parameter schema in public metadata yet.

finalize_liftingAggregate file-level features, rebuild hierarchy metadata

Aggregate file-level features, rebuild hierarchy metadata

No parameter schema in public metadata yet.

get_files_for_synthesisGet file-level entity features for holistic synthesis

Get file-level entity features for holistic synthesis

No parameter schema in public metadata yet.

submit_file_synthesesSubmit holistic file-level summaries

Submit holistic file-level summaries

No parameter schema in public metadata yet.

build_semantic_hierarchyGet domain discovery + hierarchy assignment prompts

Get domain discovery + hierarchy assignment prompts

No parameter schema in public metadata yet.

submit_hierarchyApply hierarchy assignments to the graph

Apply hierarchy assignments to the graph

No parameter schema in public metadata yet.

get_routing_candidatesGet entities needing semantic routing (drifted or newly lifted)

Get entities needing semantic routing (drifted or newly lifted)

No parameter schema in public metadata yet.

submit_routing_decisionsSubmit routing decisions (hierarchy path or "keep")

Submit routing decisions (hierarchy path or "keep")

No parameter schema in public metadata yet.

Sponsors

Readme

rpg-encoder

Give your AI agent a brain for your codebase.

CI MIT License Rust 1.85+ npm MCP Stars



View the full README on GitHub

Details

Repository
github.com/userfrm/rpg-encoder
Package
rpg-encoder
Transport
STDIO
Registry
MCP registry, active