$git clone https://github.com/GlitterKill/sdl-mcpCards-first code context for AI coding agents.
| 1 | <div align="center"> |
| 2 | <img src="./docs/readme-assets/readme-hero-v9.webp" alt="SDL-MCP context budget layer hero with themed logo, symbol graph lens, and feature callouts" width="100%"> |
| 3 | |
| 4 | # Symbol Delta Ledger |
| 5 | |
| 6 | Cards-first code context for AI coding agents. |
| 7 | |
| 8 | [Get started](./docs/getting-started.md) · [Documentation](./docs/README.md) · [MCP tools](./docs/mcp-tools-reference.md) · [npm](https://www.npmjs.com/package/sdl-mcp) |
| 9 | |
| 10 | <br/> |
| 11 | |
| 12 |  |
| 13 |  |
| 14 | <br/> |
| 15 | [](https://roastmycode.ai/roast/latest/GlitterKill/sdl-mcp) |
| 16 | </div> |
| 17 | |
| 18 | ## Work from the symbols that matter |
| 19 | |
| 20 | SDL-MCP indexes a repository into a symbol graph and gives coding agents a controlled path from compact metadata to source code. Instead of starting with full files, an agent can search symbols, inspect cards, build a task-scoped slice, and request a bounded code window only when it needs one. |
| 21 | |
| 22 | The result is a smaller, more deliberate context surface for debugging, reviews, implementation work, and repository exploration. SDL-MCP runs locally and supports the Model Context Protocol over stdio or HTTP. |
| 23 | |
| 24 | ## Start in a few minutes |
| 25 | |
| 26 | SDL-MCP requires Node.js 24 or later. For an interactive first install, run the wrapper package from the repository you want to index: |
| 27 | |
| 28 | ```bash |
| 29 | npx create-sdl-mcp |
| 30 | ``` |
| 31 | |
| 32 | For a standard global install, initialize the repository, verify it, then start the stdio server: |
| 33 | |
| 34 | ```bash |
| 35 | npm install -g sdl-mcp |
| 36 | cd <repository> |
| 37 | sdl-mcp init |
| 38 | sdl-mcp doctor |
| 39 | sdl-mcp serve --stdio |
| 40 | ``` |
| 41 | |
| 42 | Use `sdl-mcp init -y --auto-index` for non-interactive setup. The [Getting Started guide](./docs/getting-started.md) covers the setup wizard, supported clients, HTTP transport, and configuration examples. |
| 43 | |
| 44 | ## A controlled retrieval loop |
| 45 | |
| 46 |  |
| 47 | |
| 48 | 1. Index the repository into symbols, relationships, and compact metadata. |
| 49 | 2. Start with symbol search, task-shaped context, or graph slicing. |
| 50 | 3. Escalate through progressively richer views only when the task requires more detail. |
| 51 | |
| 52 | The Iris Gate Ladder makes the escalation explicit. Cards, skeletons, hot paths, and policy-gated source windows let an agent ask for the least code that can answer its question. |
| 53 | |
| 54 |  |
| 55 | |
| 56 | ## Choose the tool surface that fits the client |
| 57 | |
| 58 | The generated [tool inventory](./docs/generated/tool-inventory.md) is the source of truth for registered tools and mode counts. |
| 59 | |
| 60 | | Mode | Registered surface | |
| 61 | | --- | --- | |
| 62 | | Flat | 37 tools: 2 universal tools and 35 flat tools | |
| 63 | | Gateway | 6 tools: 2 universal tools and 4 gateway namespaces | |
| 64 | | Gateway with legacy | 41 tools: 2 universal, 4 gateway, and 35 flat tools | |
| 65 | | Code Mode exclusive | 6 tools: `sdl.action.search`, `sdl.context`, `sdl.file`, `sdl.manual`, `sdl.retrieve`, and `sdl.workflow` | |
| 66 | |
| 67 | Code Mode provides a compact task-oriented surface. Gateway mode groups the regular actions into `sdl.agent`, `sdl.code`, `sdl.query`, and `sdl.repo`. The [MCP Tools Reference](./docs/mcp-tools-reference.md) explains requests and responses for the installed surface. |
| 68 | |
| 69 | ## Build context from repository structure |
| 70 | |
| 71 | ### Symbol cards |
| 72 | |
| 73 | Each indexed symbol has a compact card with its identity, signature, summary, relationships, and other retrieval metadata. Cards give an agent a place to begin without opening a full source file. |
| 74 | |
| 75 |  |
| 76 | |
| 77 | ### Graph slicing |
| 78 | |
| 79 | Graph slicing follows repository relationships rather than directory boundaries. Give SDL-MCP a task or a starting symbol and it retu |