If you do not want a global install, run commands through npx:
npx --yes sdl-mcp@latest version
npx --yes sdl-mcp@latest doctor
npx --yes sdl-mcp@latest infoIn this document, replace sdl-mcp with npx --yes sdl-mcp@latest if you use npx.
-c, --config <PATH>(explicit config file path)--log-level <debug|info|warn|error>(default:info)--log-format <json|pretty>(default:pretty)-h, --help-v, --version
Config lookup order when --config is omitted:
SDL_CONFIG(orSDL_CONFIG_PATH)- Local config in current working directory (
./config/sdlmcp.config.json) - Global config path (default user-level location; overridable via
SDL_CONFIG_HOME) - Package-local fallback (
<sdl-mcp package root>/config/sdlmcp.config.json)
Initialize configuration and optional client template.
sdl-mcp init --client codex --repo-path . --languages ts,py,go
sdl-mcp init -y --auto-index
sdl-mcp init -y --dry-runKey options:
--client <claude-code|codex|gemini|opencode>--repo-path <PATH>(default: current directory)--languages <comma-separated>(default: all supported languages)-f, --force-y, --yes(non-interactive mode with repo/language auto-detection)--auto-index(run inline incremental index and doctor checks)--dry-run(print generated config without writing files)
Validate runtime and environment.
sdl-mcp doctor --log-level infoChecks include Node version, config readability, DB writability, grammar availability, and repo path accessibility.
Show unified runtime, config, log, Ladybug, and native-addon diagnostics.
sdl-mcp info
sdl-mcp info --config ./config/sdlmcp.config.jsonThe report includes:
- resolved config path and load status
- active log file path and whether temp-file fallback is in use
- whether console log mirroring is enabled
- Ladybug availability and active DB path
- native-addon availability, source path, and fallback reason
Index configured repository data into the ledger.
sdl-mcp index --repo-id my-repo
sdl-mcp index --watchKey options:
--repo-id <ID>-w, --watch
Start the MCP server.
sdl-mcp serve --stdio
sdl-mcp serve --http --host localhost --port 3000Key options:
--stdio--http--host <HOST>(default:localhost)--port <NUMBER>(default:3000)--no-watch(disable file watchers even when enabled in config)
When running with --http, additional surfaces are available:
- Graph UI:
http://<host>:<port>/ui/graph - Graph REST:
/api/graph/:repoId/symbol/:symbolId/neighborhood,/api/graph/:repoId/blast-radius/:fromVersion/:toVersion,/api/graph/:repoId/slice/:handle - Symbol and repo helpers:
/api/symbol/:repoId/search,/api/symbol/:repoId/card/:symbolId,/api/repo/:repoId/status,/api/repo/:repoId/reindex
Export a sync artifact.
sdl-mcp export --repo-id my-repo --output .sdl-sync
sdl-mcp export --listKey options:
--repo-id <ID>--version-id <ID>--commit-sha <SHA>--branch <NAME>-o, --output <PATH>(default:.sdl-sync/)--list
Import a sync artifact.
sdl-mcp import --artifact-path .sdl-sync/my-repo.sdl-artifact.json --repo-id my-repoKey options:
--artifact-path <PATH>--repo-id <ID>-f, --force--verify(default:true)
Pull by artifact selection rules, with optional fallback.
sdl-mcp pull --repo-id my-repo --commit-sha a1b2c3d --fallback --retries 3Key options:
--repo-id <ID>--version-id <ID>--commit-sha <SHA>--fallback(default:true)--retries <NUMBER>(default:3)
Run benchmark checks in CI.
sdl-mcp benchmark:ci --repo-id my-repo --update-baselineKey options:
--repo-id <ID>--baseline-path <PATH>(default:.benchmark/baseline.json)--threshold-path <PATH>(default:config/benchmark.config.json)--out <PATH>(default:.benchmark/latest.json)--json--update-baseline--skip-indexing
Notes:
- Edge-accuracy regression checks run as part of
benchmark:ciand compare againstscripts/benchmark/edge-accuracy-baseline.json. - Benchmark repo scope can be pinned via
scripts/benchmark/phase-a-benchmark-lock.json.
Generate copy-paste context summaries from indexed data.
sdl-mcp summary "auth flow" --shortKey options:
--budget <NUMBER>--short|--medium|--long--format <markdown|json|clipboard>--scope <symbol|file|task>--repo <ID>
Show composite repository health and machine-readable badge/json output.
sdl-mcp health --json
sdl-mcp health --badgeKey options:
--repo-id <ID>--json--badge
Direct MCP tool invocation from the CLI. Supports all 30 gateway-routable SDL actions and reuses the same validation and normalization path as the MCP server.
sdl-mcp tool repo.status --repo-id my-repo
sdl-mcp tool symbol.search --repo-id my-repo --query "handleRequest"
sdl-mcp tool slice.build --repo-id my-repo --entry-symbols sym123Key options:
--format <json|pretty|compact>(default:pretty)--repo-id <ID>(passed through to the underlying tool)- All remaining arguments are forwarded as tool parameters
The CLI parser accepts the canonical action fields plus the same common aliases accepted by MCP requests, such as --repo-id, --symbol-id, --symbol-ids, --from-version, --to-version, and --slice-handle.
Any action listed in sdl.manual can be invoked this way. The output format can be switched for scripting (json) or human reading (pretty, compact).
Print version and environment.
sdl-mcp versionsdl-mcp init --client codex
sdl-mcp info
sdl-mcp doctor
sdl-mcp index
sdl-mcp serve --stdiosdl-mcp export --repo-id my-repo --commit-sha $GIT_SHA
sdl-mcp pull --repo-id my-repo --commit-sha $GIT_SHA --fallback
sdl-mcp benchmark:ci --repo-id my-repo