Skip to main content
MCP server CX Codex

crg — Claude Code MCP server: what it does, how to install

Builds a code knowledge graph using Tree-sitter. Delivers precise structural context for reviews so agents do not load whole repositories.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env EMBEDDING_MODELS=<EMBEDDING_MODELS> --env LOCAL_EMBEDDING_MODEL=<LOCAL_EMBEDDING_MODEL> --env LOCAL_RERANK_MODEL=<LOCAL_RERANK_MODEL> --env LOCAL_EMBEDDING_DIM=<LOCAL_EMBEDDING_DIM> --env LOCAL_EMBEDDING_MODEL_FILE=<LOCAL_EMBEDDING_MODEL_FILE> --transport stdio crg -- uvx better-code-review-graph
Open on GitHub

What crg does

The server parses codebases with Tree-sitter to index relationships among functions, classes, and imports. Default semantic search runs offline through local ONNX models via fastretrieval, avoiding mandatory external embedding API keys.

This design keeps token consumption predictable during reviews. Instead of reading complete directories, the client queries call graphs and resolves qualified symbols directly over MCP.

Remember that the CLI binary is crg, but the PyPI package is named better-code-review-graph. Running it via uvx requires Python 3.13.

What it helps with

  • build call graphs for functions and class hierarchies
  • run local semantic code search without API tokens
  • reduce prompt context overhead during pull request reviews
  • trace dependency chains across imported modules

Example prompts for the agent

  • Build the call graph for the authentication handler and display callers
  • Search the codebase semantically for database connection retry logic
  • Map imported dependencies for the payment processing class

How to install crg

Platform CLI

claude mcp add --env EMBEDDING_MODELS=<EMBEDDING_MODELS> --env LOCAL_EMBEDDING_MODEL=<LOCAL_EMBEDDING_MODEL> --env LOCAL_RERANK_MODEL=<LOCAL_RERANK_MODEL> --env LOCAL_EMBEDDING_DIM=<LOCAL_EMBEDDING_DIM> --env LOCAL_EMBEDDING_MODEL_FILE=<LOCAL_EMBEDDING_MODEL_FILE> --transport stdio crg -- uvx better-code-review-graph

Replace <…> with your own values. 5 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from better-code-review-graph <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about crg

How to install crg in Claude Code?

Run claude mcp add crg -e HULL_EMBED_API_KEY=<HULL_EMBED_API_KEY> -e HULL_CHAT_API_KEY=<HULL_CHAT_API_KEY> -- uvx better-code-review-graph.

What does crg do?

It constructs a structural knowledge graph from source code using Tree-sitter. MCP clients can then fetch exact function call relationships without loading irrelevant files.

Does crg require paid API keys to operate?

Not by default. It includes an offline ONNX embedding pipeline powered by fastretrieval, while cloud embedding providers remain an optional alternative.

Similar MCP servers

All MCP servers for Code review and refactoring →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor