sverklo
/* code intelligence for ai agents */

sverklo 

Your AI agent reads diffs the way a junior reviewer does — line by line, no context. Sverklo gives it senior-reviewer eyes.

Diff-aware MR review with risk scoring, missing-test detection, and dangling-reference checks. Hybrid semantic search, symbol-level impact graph, and bi-temporal memory tied to git state. Local-first MCP server — no API keys, no cloud, no data leaves your laptop.
~/your-project claude code
# install sverklo and set it up in your project $ npm install -g sverklo $ cd your-project && sverklo init .mcp.json ← project-scoped MCP server .claude/settings.local.json ← auto-allow sverklo tools CLAUDE.md ← prefer-sverklo instructions # ask Claude anything — sverklo is preferred automatically > how does the auth middleware work? ⚡ sverklo_search query="authentication middleware" ─ src/middleware/auth.ts:42 validateToken() score: 0.89 ─ src/routes/auth.ts:18 requireAuth() score: 0.84 ─ src/lib/jwt.ts:12 verifyJWT() score: 0.81 ✓ 3 results in 23ms — 847 files searched, 2,431 tokens used
# install sverklo $ npm install -g sverklo # add to .cursor/mcp.json (or Cursor Settings → MCP) $ cat .cursor/mcp.json { "mcpServers": { "sverklo": { "command": "sverklo", "args": ["mcp", "."] } } } # Cursor agent picks up sverklo on next session > where do we handle stripe webhooks? ⚡ sverklo_context task="stripe webhook handling" ─ src/api/webhooks/stripe.ts:14 handleStripeEvent() score: 0.92 ─ src/billing/events.ts:31 processCharge() score: 0.78 ✓ bundle: 4 files, 2 memories — 1,840 tokens
# install sverklo and run init — Antigravity is auto-detected $ npm install -g sverklo $ cd your-project && sverklo init ~/.gemini/antigravity/mcp_config.json ← global MCP config added sverklo (project: ~/your-project) Restart Antigravity to pick up the new MCP server. # Gemini in Antigravity uses sverklo via MCP > review my branch before I merge to main ⚡ sverklo_review_diff ref="main..HEAD" ─ 🟠 risk 52 src/api/billing.ts 2 removed symbols still referenced; 8 importers ⚡ sverklo_test_map ref="main..HEAD" ─ 5 covered · 1 uncovered (risk 78) verdict: BLOCKED — fix dangling refs in 3 files
# Sverklo speaks vanilla MCP over stdio — works with any MCP client $ npm install -g sverklo # point your MCP client at this command command: sverklo args: ["mcp", "/absolute/path/to/your-project"] # tested with Claude Code, Cursor, Antigravity, Windsurf, # VS Code (Continue), JetBrains, Codex, and any MCP-compatible host $ sverklo mcp . ✓ MCP server started — 20 tools, 5 prompts registered ✓ index ready: 847 files, 12,431 symbols
/* honest about when this helps */
SVERKLO WINS
Exploratory questions ("how does X flow work?")
Refactor blast radius (`sverklo_impact`)
Large interconnected codebases
Memory across sessions, tied to git SHAs
Project audits — god nodes, dead code
GREP WINS
Focused diff review
Exact string matching
Reading file contents
Build & test verification
Anything where you already know the symbol
THE PATTERN
Sverklo is the right tool when you don't know exactly what to search for. When you do know, grep is fine. We benchmarked both on real MRs — sverklo doesn't replace grep, it complements it.
/* diff-aware mr review */

your agent
reviews like
a senior dev.

~/your-project review main..HEAD
> /sverklo:pre-merge ⚡ sverklo_review_diff ref="main..HEAD" ─ 7 files changed (12 added, 3 removed, 4 modified) ## ⚠️ Highest-risk files ─ 🔴 risk 78 (critical) src/auth/session.ts no matching tests; security-sensitive; 14 importers ─ 🟠 risk 52 (high) src/api/billing.ts 2 removed symbols still referenced; 8 importers ⚡ sverklo_test_map ref="main..HEAD" ─ 5 covered · 2 uncovered ─ 🔴 risk 78 src/auth/session.ts ← block merge ⚡ sverklo_impact symbol="oldValidateToken" ─ 4 dangling references in 3 files — must fix verdict: BLOCKED — 1 critical, 4 dangling refs
01

risk score

Every changed file gets a 0–100 score combining untested status, security-sensitive paths, importer fan-in, caller count, dangling references, and churn. Reasons are explicit — no black box.

02

missing-test detection

sverklo_test_map walks the diff, the import graph, and filename conventions to flag changed code without matching tests — ranked by risk.

03

dangling-ref check

Every removed symbol is checked against the symbol-reference graph. If a caller still exists, the merge is blocked with file:line evidence.

04

mcp prompts

Five workflows: /sverklo:review-changes, /sverklo:pre-merge, /sverklo:onboard, /sverklo:architecture-map, /sverklo:debug-issue.

/* benchmarks — published, not claimed */
METHOD
Real merge requests across 5 OSS repos (Express, FastAPI, etc). Same Claude model, same prompt, with and without sverklo's diff-aware tools. F1 vs human-written review. Harness in benchmark/ — reproducible.
RESULTS
+29% F1 after parser improvements on P1/P2 categories. 2–4× fewer tokens per review on most repos. Mixed results on small focused diffs (built-in tools win there). Honest receipts beat marketing math.
WHY WE PUBLISH MIXED
Competitors claim "5–10× fewer tokens" with no methodology. We'd rather be the tool you trust than the one you screenshot. The benchmark harness is in the repo — clone it, run it on your codebase, decide for yourself.
/* how it works */

indexed.
ranked.
remembered.

01

hybrid search

BM25 for precision, semantic embeddings for recall, PageRank for structural importance — fused via RRF. Faster and more accurate than grep.

02

local embeddings

all-MiniLM-L6-v2 via ONNX runtime. 384-dimensional vectors generated on your machine. No API calls, no data leaves your laptop.

03

pagerank ranking

Files that are imported by many others rank higher. Your agent finds the actually-important code first, not just keyword matches.

04

persistent memory

Save decisions, patterns, and preferences with git-state linking. Stale memories flagged automatically when referenced files change.

05

incremental

File watcher updates the index on every save. Dependency graph and PageRank recompute in real time. Always fresh.

06

twenty languages

TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, PHP, Kotlin, Scala, Swift, Dart, Elixir, Lua, Zig, Haskell, Clojure, OCaml.

/* persistent memory */

your agent
finally
remembers.

session 0 · day one import
# bring your existing docs — sverklo ingests them automatically $ sverklo init .claude/mcp.json · .claude/settings.local.json · CLAUDE.md Scanning for existing project knowledge... imported 18 memories from: · CLAUDE.md (12) — conventions, tech stack · .cursorrules (3) — style preferences · docs/adr/001-prisma.md — decision, tagged adr · docs/adr/002-auth.md — decision, tagged adr · CONTRIBUTING.md (1) — review process
session 1 · tuesday remember
> we decided to use Prisma for the ORM because it gives better TypeScript types than Drizzle ⚡ sverklo_remember category="decision" content: "We chose Prisma over Drizzle for better TypeScript types" tags: ["database", "orm"] git: main@a3f29e1 confidence: 1.0 ✓ memory #42 saved
session 2 · thursday (new conversation) recall
# session start — sverklo://context auto-injected Loaded 3 memories: ORM choice, auth pattern, API conventions > add a new API endpoint for user profiles # Claude knows: Prisma for DB (from memory #42) # Claude knows: JWT validation before DB calls (from memory #43) ⚡ writes endpoint with Prisma + JWT validation — no rediscovery
·

bring your own docs

Auto-imports memories from CLAUDE.md, .cursorrules, AGENTS.md, CONTRIBUTING.md, and ADRs on init. Your existing project knowledge becomes semantically searchable instantly.

·

bi-temporal (unique to sverklo)

Every memory has valid_from_sha and valid_until_sha. Memories are never deleted, only superseded — so you can query "what we believed at commit X". Zep does this for conversations; sverklo is the only one doing it for code.

·

staleness detection

If a memory references a file that no longer exists, it's flagged as stale. No more advice based on deleted code.

·

semantic recall

Memories are embedded and searched the same way as code. Ask "what did we decide about auth?" and get the relevant memory.

·

auto-inject on session start

An MCP resource surfaces top memories to Claude before you type anything. Your decisions travel across sessions automatically.

/* mcp tools */

twenty tools
your agent
actually uses.

Each tool gets registered with the MCP server's instructions field, telling Claude to prefer them over built-in grep. Combined with a SessionStart hook, adoption is guaranteed.
sverklo_context
Umbrella "give me everything relevant to this task" bundler. One call returns overview + relevant code + memories. Use as the front door.
search
sverklo_search
Hybrid semantic + text search across the codebase. Preferred over grep.
search
sverklo_overview
Structural codebase map ranked by PageRank importance.
search
sverklo_lookup
Direct symbol lookup by name with full definitions.
search
sverklo_refs
Find all references to a function, class, or type.
search
sverklo_deps
Show file dependency graph — imports and importers with ref counts.
search
sverklo_status
Index health check. File count, chunk count, languages.
meta
sverklo_remember
Save decisions, patterns, preferences. Linked to current git state.
memory
sverklo_recall
Semantic search over saved memories. Stale detection included.
memory
sverklo_forget
Remove a memory by ID.
memory
sverklo_memories
List memories with health metrics — age, access count, staleness.
memory
sverklo_impact
Find every function/class that references a symbol. Safe refactoring across the symbol graph.
search
sverklo_promote
Promote a memory to core tier — auto-injected into every session as a project invariant.
memory
sverklo_demote
Demote a core memory back to archive. Searched on demand instead of auto-injected.
memory
sverklo_ast_grep
Structural pattern matching via ast-grep binary. Precise symbol queries without embeddings.
search
sverklo_review_diff
Diff-aware review bundler: changed files, semantic delta, dangling refs, risk score per file. Replaces 10–20 grep calls.
review
sverklo_test_map
Map a git diff to its test coverage. Flags untested changes ranked by risk score.
review
sverklo_diff_search
Semantic search constrained to files touched by a diff. For drilling into a specific MR.
review
sverklo_audit
Project audit: god-nodes, dead code, dependency cycles, fan-in/fan-out outliers.
meta
sverklo_wakeup
Session-start primer. Returns recent git activity, hot files, and core memories in one bundle.
meta
// Plus five MCP prompts: /sverklo:review-changes, /sverklo:pre-merge, /sverklo:onboard, /sverklo:architecture-map, /sverklo:debug-issue
/* vs the competition */

only one tool
has everything.

The code intelligence and memory space is fragmented. Each competitor gives up at least two of these six dimensions. Sverklo is the only one with all six.
Tool Code-native Local-first MCP drop-in Git-aware memory Symbol graph Bi-temporal
sverklo
mempalace
claude-mem CC only
Mem0 crippled SDK
Zep / Graphiti Neo4j
Augment Code cloud
Greptile cloud 3rd party
Aider repo-map
Zilliz claude-context Milvus
XRAY MCP partial
Different lanes: Most "AI memory" tools (mempalace, claude-mem, Mem0, Zep) are built to remember conversations. Sverklo is built to understand code. We index 20 languages with tree-sitter-style parsers, build a symbol-level dependency graph, and run hybrid BM25 + vector + PageRank search — then bolt a bi-temporal memory layer on top that's tied to git commits, not wall-clock time.

The wedge: Sverklo is the only tool that knows what the code looked like when you made that decision — and warns you when the code has drifted since. If you want conversation memory, use mempalace. If you want your agent to actually understand a codebase, use sverklo.
/* install */

three commands.
zero config.

01 — install
Global npm install
npm install -g sverklocopy
Requires Node 20+. Works on macOS, Linux, Windows.
02 — setup
Initialize in your project
sverklo initcopy
Creates .mcp.json, .claude/settings.local.json, CLAUDE.md. Auto-detects Antigravity. Idempotent.
03 — start coding
Open your agent
claudecopy
First run downloads the embedding model (~90MB, ~30s). After that, instant.
/* works with */