CRAG-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CRAG_SMALL_LLM | No | The small LLM model to use for semantic analysis (e.g., gemma4:31b-cloud) | |
| CRAG_WORKSPACE | No | The workspace path for the server (default: current directory) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| configureC | Configure workspace and LLM. |
| preprocess_configA | Load preprocessing config for conditional compilation. Call this when analyzing C/C++ projects with #ifdef blocks, Linux kernel with Kconfig, or Makefile-based builds. Supports:
|
| query_graphA | Search code graph. Automatically indexes relevant files. If preprocess_config() was called on the workspace, filters by active defines. Otherwise returns all functions (no filtering). Parses source files into the graph with AST (no LLM). Use summarize_function() on individual results for deep analysis. |
| read_function_bodyB | Read the full source code of a function. |
| summarize_functionA | Deep-analyze a single function with LLM (summary + call extraction). Call this after query_graph() to enrich specific functions. Results (summary, keywords, call edges) are stored in the graph and become available to get_callers(), get_callees(), get_call_path(). |
| get_callersC | Find functions that call the given function. |
| get_calleesB | Find functions called by the given function. |
| get_call_pathA | Find call path between two functions using BFS. Requires call edges in the graph (populated by summarize_function()). |
| graph_statsC | Get graph statistics for a workspace. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
The tools are mostly distinct in purpose. `configure` and `preprocess_config` both relate to setup but target different aspects (general workspace vs. preprocessing for conditional compilation). Other tools like `read_function_body`, `query_graph`, and the call graph tools have clearly separate roles. A minor overlap exists but descriptions help disambiguate.
Tool names are inconsistent: some follow verb_noun (read_function_body, query_graph, summarize_function, get_callers), while `configure` is a bare verb, `preprocess_config` uses verb_noun but with a different verb style, and `graph_stats` is noun_noun with no verb. This mixed pattern reduces predictability.
9 tools is appropriate for a code analysis server covering configuration, code reading, graph indexing, function summarization, and call queries (callers, callees, paths). The scope feels well-balanced without being too heavy or too thin.
The tool set covers the main workflows for call graph analysis: setup, source retrieval, graph search, deep analysis, and call relationship queries. Missing features like variable cross-references or type queries are beyond the stated domain, so the set is reasonably complete for its purpose.