spine
OfficialSupports Drizzle ORM schema definitions (pgTable, mysqlTable, sqliteTable) to map database structure and queries.
Allows read-only introspection of a live MySQL database to map tables, keys, indexes, and code references.
Reads Prisma schema files (schema.prisma) to map database tables, indexes, relationships, and the code that queries them.
Reads SQLAlchemy and Flask-SQLAlchemy models to map database tables, relationships, and querying code.
Allows read-only introspection of a live SQLite database to map tables, keys, indexes, and code references.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@spineWhere is request authentication enforced?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
repomap
Code graph · hybrid search · call paths · change impact · an interactive graph UI. One Rust binary. Local. No API key. MIT.
Live demo · Docs · Quickstart · Tools · Graph UI · Benchmarks · Compare
The real UI on excalidraw (687 files, indexed in under half a second): search, a symbol's code and callers, then the blast radius of a change. Try it in your browser, no install needed.
Quickstart
npx -y @sylphx/repomap setup # add repomap to Claude Code, Codex, Cursor, VS Code, Claude Desktop, Windsurf, Gemini CLI
npx -y @sylphx/repomap serve # open the graph UI for the current repoThat's it. Add --claude-hooks to also enrich Claude Code's Grep and Glob. setup detects the clients you have, writes their MCP config, and prints every change it made. Run it again and nothing changes. Then ask your agent: "Use repomap to map this repo."
{
"mcpServers": {
"repomap": { "command": "npx", "args": ["-y", "@sylphx/repomap", "mcp"] }
}
}Claude Code: claude mcp add repomap -- npx -y @sylphx/repomap mcp
Claude Desktop, one click: download repomap-<version>.mcpb from the latest release, open it, and pick your project folder.
Claude Code plugin: /plugin marketplace add SylphxAI/repomap, then /plugin install repomap@repomap
Codex (~/.codex/config.toml):
[mcp_servers.repomap]
command = "npx"
args = ["-y", "@sylphx/repomap", "mcp"]Docker (stdio, amd64/arm64):
{ "mcpServers": { "repomap": { "command": "docker", "args": ["run", "-i", "--rm", "-v", "/path/to/repo:/workspace:ro", "ghcr.io/sylphxai/repomap"] } } }The server indexes the client's workspace root (or its working directory, or REPOMAP_ROOT). Every tool also takes root.
Related MCP server: Paparats MCP
Why
Agents burn most of their context on grep, ls and reading whole files just to work out where things are. repomap gives them the map up front:
Where is it? Hybrid search that matches symbol names, the words inside functions and what the code means, with the lines that matched. Ask "where are failed requests retried" or
parseConfig.What is this? One call returns a symbol's code, callers with call-site lines, callees, subtypes and the tests that reach it.
How does A reach B? The shortest call path, each hop cited
file:line.What breaks if I change this? Direct and indirect callers, importing files, modules touched, tests to run, and a risk level. Point it at your
git diffbefore you commit.What does this repo look like? Modules found from real dependencies (not just folders), the most central files, the most used symbols, and entry points.
All of it comes from a local index: tree-sitter parsing, a resolved import and call graph, PageRank, Louvain communities, BM25 over AST chunks, and a small static code embedding model (33 MB, downloaded once from Hugging Face, then offline). Nothing leaves your machine, and no API is called.
What your agent gets
Six tools, each with an obvious job:
Tool | Ask it | Returns |
| "Give me the lay of the land" / | Modules, central files, key symbols, entry points; an outline with line numbers when focused |
|
| Ranked |
|
| Code, callers (with call sites), callees, subtypes, members, imports, importers, tests |
|
| Shortest call path, or the call tree above/below a symbol |
|
| Risk level, callers by depth, importing files, modules, tests to run |
|
| Tables, keys, indexes, and the code ( |
Answers are compact text that cites file:line, so they cost few tokens. Pass format: "json" for structured output.
> impact target=decode
# Impact (LOW risk)
Changing: function decode (src/auth/token.ts:14)
1 direct caller, 3 symbols affected in total across 3 files and 2 modules; 1 file importing the changed files; no tests reach this.
## Direct callers (will break if the contract changes)
- function verifyToken — src/auth/token.ts:8
## Indirect (depth 2)
- method SessionStore.refresh — src/auth/session.ts:5
## Indirect (depth 3)
- function handleRefresh — src/api/router.ts:6
## Importing files
- src/auth/session.tsThe same commands work in your terminal: repomap map, repomap search "…", repomap context X, repomap trace A B, repomap impact --changed, repomap db.
The graph UI
npx -y @sylphx/repomap serve # live, with code preview
npx -y @sylphx/repomap export # repomap.html: one self-contained file you can publishWebGL rendering (Sigma.js) that stays smooth with tens of thousands of files and edges
Modules coloured and clustered by their real dependencies, file size by PageRank; tests, examples and docs are muted and one click away
/ searches files, symbols and code; d shows dependencies; f fits the view
Click a module to focus it, Shift-click to hide it; toggle tests, edges and labels
exportwrites one HTML file with deep links (#path/to/file) and GitHub links pinned to your commit. It's a good fit for a README, a wiki or a design review.
Database map
npx -y @sylphx/repomap db # from migrations / Prisma / Drizzle / SQLAlchemy / Diesel
npx -y @sylphx/repomap db --url-env DATABASE_URL # live Postgres, MySQL or SQLite, read-only
npx -y @sylphx/repomap db users # one table: columns, indexes, who references it, where it is queried
npx -y @sylphx/repomap db --serve # the same graph UI, for tables and foreign keysrepomap reads your schema from the repository: SQL migrations (applied in order, with down migrations skipped), schema.prisma, Drizzle pgTable/mysqlTable/sqliteTable, SQLAlchemy and Flask-SQLAlchemy models, and Diesel table!. It can also introspect a live database. Each table is linked to the code that queries it: raw SQL (FROM users), Prisma (prisma.user.findMany), Diesel (users::table), and ORM models or tables used by files that import them.
Live connections are strictly read-only:
Postgres runs in a
READ ONLYtransaction that the server must confirm.MySQL runs in a
START TRANSACTION READ ONLYtransaction.SQLite is opened read-only with
query_only.
Only catalog metadata is read, never table rows. The connection string comes from an argument or an environment variable, and it is never stored or printed. Agents get the same data through the db MCP tool; pass url_env rather than the URL itself.
Agent-readiness score
npx -y @sylphx/repomap scoreThe score rates how well an AI agent can work in the repository, from 0 to 100. It covers eight checks:
agent instructions (AGENTS.md / CLAUDE.md and how useful they are)
discoverable build and test commands
test coverage
CI
module boundaries
file sizes
docs
types
Each check that falls short comes with a concrete fix, and the score ends with a badge line for your README. For CI, use --min 70; --update-readme README.md refreshes the badge.
Keep the badge fresh with the GitHub Action:
# .github/workflows/agent-ready.yml
on: { push: { branches: [main] } }
permissions: { contents: write, pull-requests: write }
jobs:
score:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: SylphxAI/repomap@v1
with:
update-readme: true # opens or updates one PR with the fresh badge
min-score: 0 # set e.g. 70 to fail below a barClaude Code hook
npx -y @sylphx/repomap setup --claude-hooksThis is opt-in and safe to run again; setup --remove takes it out. It installs a PreToolUse hook: whenever Claude Code runs Grep or Glob, repomap adds where the symbol is defined, who calls it and which module it belongs to. It answers in tens of milliseconds and never blocks the search.
repomap (code map) for this search:
- function `compose` defined at src/compose.ts:15 (module router); 3 callers: Hono.route (src/hono-base.ts:228), Hono.#dispatch (src/hono-base.ts:452), every (src/middleware/combine/index.ts:102)Languages
Parsed with tree-sitter for symbols, calls, imports and inheritance: TypeScript, TSX, JavaScript, Python, Go, Rust, Java, Kotlin, Swift, C, C++, C#, Ruby, PHP. Search also covers Markdown, YAML, TOML, JSON, SQL, shell, Protobuf, GraphQL, HTML/CSS, Vue, Svelte, Scala and more.
Modules are found among your core code only. Tests, examples, docs and benchmarks are grouped separately, so they never name or blur a module.
Import resolution understands relative paths, @/ aliases, npm workspace packages, Python packages and relative imports, Go modules, Rust mod/use/workspace crates, Java/PHP namespaces, C/C++ includes and Ruby require. .gitignore is respected, and so is .repomapignore.
Search that understands the question
On semble's public code-search benchmark (63 repositories, 19 languages, 1,251 questions), repomap's search scores NDCG@10 0.851. semble, a tool built only for search, also scores 0.851 on the same runner. The 137M-parameter CodeRankEmbed model scores 0.839 and plain BM25 0.673. repomap 1.2 scored 0.685.
This needs no GPU, no vector database and no API key. A 33 MB static code model runs on the CPU, next to BM25 and symbol names.
Fast
The index is built in parallel and cached per file, so after the first run only changed files are parsed again. The MCP server keeps the graph in memory and refreshes it when files change.
Measured on a 4 vCPU GitHub-hosted runner (method and full table):
Repository | Code files | Cold index | Warm index | search p50 | impact p50 |
kubernetes | 11,710 | 13.0 s | 1.9 s | 73 ms | 6 ms |
vscode | 6,126 | 9.2 s | 1.4 s | 16 ms | 8 ms |
django | 2,271 | 2.6 s | 0.4 s | 24 ms | 1 ms |
rust-analyzer | 1,512 | 2.1 s | 0.4 s | 7 ms | 2 ms |
How it compares
repomap | GitNexus | Serena | claude-context | Aider repo map | |
Licence | MIT | PolyForm Noncommercial | MIT | MIT | Apache-2.0 (inside Aider) |
Setup |
|
| Python + language servers | Vector DB + embedding API key | Part of Aider |
API key / network | None (model downloaded once) | None for the graph | None | Required (embeddings) | None |
Code graph (calls, imports, inheritance) | ✅ | ✅ | Via LSP references | — | Ranking only |
Change impact / blast radius | ✅ incl. | ✅ | — | — | — |
Call path between two symbols | ✅ | ✅ | — | — | — |
Search | ✅ names + BM25 + local embeddings | ✅ | ✅ symbols | Semantic (vectors) | — |
Interactive graph UI | ✅ local + static export | ✅ | — | — | — |
Claude Code Grep/Glob hook | ✅ opt-in | ✅ | — | — | — |
Database schema map linked to code | ✅ live (read-only) + migrations/ORMs | — | — | — | — |
Agent-readiness score + badge | ✅ + GitHub Action | — | — | — | — |
Module detection | ✅ Louvain | ✅ | — | — | — |
Edits code | — (read-only) | — | ✅ | — | ✅ |
Engine | Rust | TypeScript | Python | TypeScript | Python |
Pick Serena if you want LSP-precise refactoring edits. repomap is for understanding and navigating a codebase with zero setup, including semantic search without a vector database or an API key, and a licence you can use at work. Search quality is measured on public benchmarks in Benchmarks.
CLI
repomap setup [--client cursor,codex] [--claude-hooks] [--dry-run] [--remove]
repomap serve [dir] [--port 7878] [--no-open]
repomap export [dir] [--out repomap.html] [--json]
repomap map [dir-to-focus] [-C root] [--json]
repomap search <query> [--path src/] [--kind function] [--limit 10]
repomap context <target> [--code-lines 60]
repomap trace <from> [to] [--callers] [--depth 3]
repomap impact [targets…] [--changed] [--base main]
repomap db [table] [--url-env VAR | --url URL] [--serve | --out db.html] [--json]
repomap score [dir] [--json] [--min N] [--update-readme README.md [--insert]]
repomap index [dir] [--no-cache] [--json]
repomap mcp [--root dir]Binaries for macOS (arm64, x64), Linux glibc (x64, arm64) and Windows x64 ship as npm optional dependencies. They're also attached to each GitHub release. From source: cargo install --git https://github.com/SylphxAI/repomap repomap.
Migrating from Spine, Locus or CodeRAG
@sylphx/spine, @sylphx/locus and @sylphx/coderag are thin aliases of @sylphx/repomap, and their old tool names still work until 2.0. See the migration guide for the name mapping and how to switch.
Contributing
cargo test --workspace # engine + CLI tests
bun install && bun run build:ui # rebuild the UI bundle (ui/ -> crates/repomap/assets/)
cargo run -p repomap -- serve .Issues and PRs are welcome, and new language support is especially useful: add a grammar and a query in crates/repomap-core/src/lang.rs.
Also from Sylphx
anymd: any file (PDF, Word, PowerPoint, Excel, EPUB, HTML, images) to clean Markdown for AI agents. Rust MCP server + CLI, local.
lockdocs: exact-version library docs from your lockfile. Local, offline, no rate limits.
readme-mark: beautiful README images from one URL: banners, shields-compatible badges, icons, stats cards. It serves repomap's agent-ready badge.
Star history
MIT © Sylphx
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Codebase graphs, caller impact analysis, and recorded project context for AI coding agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceTransforms codebases into structural knowledge graphs for AI agents and developers, providing precise architectural awareness and dependency mapping.54MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI coding assistants with deep, semantic understanding of local codebases via AST-aware chunking, cross-repo symbol graphs, and architectural memory, enabling context-aware code search and dependency tracing.11MIT
- AlicenseNot gradedqualityCmaintenanceProvides semantic code search and code insights via a knowledge graph, enabling AI to understand, navigate, and modify complex projects with deep dependency and architecture analysis.MIT
- AlicenseNot gradedqualityAmaintenanceProvides a dependency graph of any local repository with tools for change impact, transitive dependents, health audits, and more, enabling AI coding agents to see structure and refactor safely.4,912 npm4MIT