A debugging session touching 20 files can consume 40,000+ tokens on context gathering alone.SDL-MCP fixes this by indexing your codebase into a searchable symbol graph and serving precisely the right amount of context through a controlled escalation path. Agents understand your code better while consuming a fraction of the tokens.
How it works
- Index once — SDL-MCP parses every symbol in your repo and stores it as a compact metadata record (a “Symbol Card”) in a graph database.
- Query efficiently — Agents use MCP tools to search, slice, and retrieve exactly the context they need.
- Escalate only when necessary — A four-rung ladder controls how much code the agent sees, from a 100-token card to full source (with justification required).
The Iris Gate Ladder
The core innovation. Named after the adjustable aperture that controls light flow in optics, the Iris Gate Ladder lets agents dial their context aperture from a pinhole to wide-open:| Rung | What the agent sees | Token cost | Typical use |
|---|---|---|---|
| 1 — Symbol Card | Name, signature, summary, dependencies, metrics | ~100 | ”What does this function do?“ |
| 2 — Skeleton IR | Signatures + control flow, bodies elided | ~300 | ”What’s the shape of this class?“ |
| 3 — Hot-Path Excerpt | Lines matching specific identifiers + context | ~600 | ”Where is this.cache initialized?“ |
| 4 — Raw Code Window | Full source (policy-gated, justification required) | ~2,000 | ”I need to rewrite this error handler” |
| Scenario | Reading the file | Using the Ladder | Savings |
|---|---|---|---|
”What does parseConfig accept?” | ~2,000 tok | ~100 tok | 20x |
”Show me the shape of AuthService” | ~4,000 tok | ~300 tok | 13x |
”Where is this.cache set?” | ~2,000 tok | ~500 tok | 4x |
Tech stack
| Component | Technology |
|---|---|
| Runtime | Node.js 24+ / TypeScript 5.9+ (strict ESM) |
| Graph database | LadybugDB (embedded, single-file) |
| Indexer (default) | Rust via napi-rs (multi-threaded) |
| Indexer (fallback) | tree-sitter + tree-sitter-typescript |
| MCP SDK | @modelcontextprotocol/sdk |
| Validation | Zod schemas for all payloads |
| Transports | stdio (agents) · HTTP (dev/network) |
Compatible clients
SDL-MCP works with any MCP-compatible client:| Client | Transport | Setup command |
|---|---|---|
| Claude Code | stdio | sdl-mcp init --client claude-code |
| Claude Desktop | stdio | sdl-mcp init --client claude-code |
| Cursor | stdio | Standard MCP server config |
| Windsurf | stdio | Standard MCP server config |
| Codex CLI | stdio | sdl-mcp init --client codex |
| Gemini CLI | stdio | sdl-mcp init --client gemini |
| OpenCode | stdio | sdl-mcp init --client opencode |
| Any MCP client | stdio / HTTP | sdl-mcp serve --stdio or --http |
sdl-mcp-vscode) provides live buffer integration for real-time indexing of unsaved edits.
Explore SDL-MCP
Quickstart
Install SDL-MCP, index your repo, and connect your first coding agent in under 5 minutes.
Client setup
Detailed configuration for Claude Code, Cursor, Windsurf, Gemini CLI, OpenCode, and more.
Core concepts
Understand the Iris Gate Ladder, Symbol Cards, Graph Slicing, and Delta analysis.
MCP tools reference
Full reference for all 35 MCP tools with parameters and response shapes.