sqlite-graph-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| --root | No | The workspace to index. Defaults to the process's 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.
Local code & spec graph over SQLite. Index a workspace once with graph_index, then answer structural questions with graph_find (text search), graph_walk (follow imports/defines/links), graph_plan (chain find → walk → filter → minus and get path:line citations), and graph_orphans (unreferenced files, unexported symbols). No embeddings: every result is backed by a file and line.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| graph_indexA | Scan the workspace for .ts/.tsx/.js/.jsx/.md files and package.json manifests, and build the SQLite graph at .sqlite-graph/index.db (nodes: file, symbol, heading, package; edges: imports, exports, defines, links_to, depends_on). Safe to re-run: it rebuilds atomically. |
| graph_findB | Operator 1 (find): search files, symbols, markdown headings and packages by text. Uses SQLite FTS5 prefix ranking plus substring fallback, so "index" matches "GraphIndexer". |
| graph_walkA | Operator 2 (walk): traverse edges from a set of nodes with a recursive CTE (cycle-safe, depth capped). Direction out = dependencies/definitions, in = dependents/references. Each node returns its traversal depth and a path:line citation. |
| graph_planA | Operator 5 (answer): chain find → walk → filter → minus in one call and get structured evidence (nodes, touched edges, path:line citations, per-step trace). Accepts a pipeline string such as |
| graph_orphansB | Operator 4 (minus) applied: files with no inbound imports/links (dead code, stale docs) and symbols that are never exported (dead-code candidates). Test and entry files are excluded unless asked for. |
| graph_filterA | Operator 3 (filter): narrow an explicit node set by kind, path glob/prefix/suffix, name, or tag (tags include code, doc, test, entry, manifest, exported). Combine with graph_find output ids. |
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 6 tools
Each tool maps to a distinct operator: index (build), find (text search), filter (narrow node set), walk (traverse edges), orphans (dead-code minus), plan (composed pipeline). The only real overlap is graph_plan versus manually chaining find/walk/filter, and find versus filter could be briefly confused by an agent, but the descriptions clearly delineate text search from explicit-set narrowing.
All six tools use a uniform graph_<verb-or-operator> pattern (graph_index, graph_find, graph_filter, graph_walk, graph_orphans, graph_plan) in consistent snake_case. The naming even encodes the relational-operator metaphor, making the set predictable.
Six tools is a tight, well-scoped surface for a code-graph indexer, with no filler. Each tool corresponds to a genuinely distinct operation (build, search, filter, traverse, dead-code, compose) and the composition tool justifies the small count without bloating it.
The set covers the full query lifecycle: build the graph, search, narrow, traverse dependencies/dependents, detect orphans, and compose multi-step evidence pipelines with citations. Minor gaps exist—no tool to fetch full node details/file contents, no index stats or schema/health inspection, and no incremental update or teardown—but these are workable around a full rebuild.