Prerequisites
- Node.js 24+ and npm
- A local repository you want to index
Installation
Choose how you want to run SDL-MCP:- Global install (recommended)
- npx (no install)
- From source
Install once, then use
sdl-mcp anywhere:5-minute setup
Set config location
SDL-MCP stores its config and database in a global directory. Set the location before you begin, then open a new terminal:
SDL_CONFIG_HOME tells SDL-MCP where to create sdlmcp.config.json. You can also use --config <path> on any command to point at a specific file.Initialize and index
Run the one-line setup command. It creates your config, detects languages, indexes your codebase, and runs health checks:What this does:
- Creates
sdlmcp.config.jsonwith sensible defaults - Detects the languages in your repo
- Indexes all symbols into the graph database
- Runs
doctorchecks to validate the setup
Start the MCP server
Start SDL-MCP in stdio mode so coding agents can connect:If your environment has issues with file watching (e.g., Docker, WSL, or network drives), use
--no-watch:Connect your agent
Point your MCP client at the SDL-MCP process. See Client setup for per-client config snippets.Your agent now has access to all 35 SDL-MCP tools.
First config example
Theinit command generates this config automatically. Here is what it looks like:
sdlmcp.config.json
Optional: tool enforcement
Without enforcement, an agent can have SDL-MCP connected and still waste tokens on native read and shell tools. Tool enforcement makes agents use SDL-MCP exclusively. Generate an SDL-first setup for your client:Optional: HTTP transport (multi-agent)
By default,sdl-mcp serve --stdio runs a single MCP session — one agent, one connection. Streamable HTTP mode exposes the same MCP tools over HTTP, enabling multiple agents to connect concurrently.
| Stdio | Streamable HTTP | |
|---|---|---|
| Connections | 1 agent | Up to 8 concurrent agents (configurable) |
| Setup | Zero config — agent spawns the process | Start server first, then point agents at the URL |
| Session isolation | N/A (single session) | Each connection gets its own MCP session |
| Reconnect support | None | Built-in event store for resumable sessions |
| Graph UI + REST API | Not available | Available at /ui/graph and /api/* |
| Best for | Single-agent workflows, simple setups | Multi-agent teams, shared dev servers, CI pipelines |
Authorization: Bearer <token> in every request. See Client setup for HTTP config snippets per client.
Verify the setup
After connecting your agent, verify it can call the four core tools:sdl.repo.register— register your codebasesdl.index.refresh— trigger indexingsdl.symbol.search— search for a symbol by namesdl.symbol.getCard— retrieve a Symbol Card
Next steps
Client setup
Config snippets for Claude Code, Cursor, Windsurf, Gemini CLI, OpenCode, and more.
Agent workflows
Copy the recommended AGENTS.md instructions to maximize token savings.
Configuration reference
Every config option with defaults and guidance.
MCP tools reference
Parameters and response shapes for all 35 MCP tools.