Start Here: info and doctor
Before diving into specific issues, run these two commands. They catch most setup problems immediately.
sdl-mcp info shows the resolved config path, active log file, log fallback status, LadybugDB availability, and native-addon state in one place.
sdl-mcp doctor validates your runtime, config, database, grammars, and repo access — with debug-level output for detailed diagnostics.
Common Issues
Config not found
Config not found
- Run
sdl-mcp initto generate a config file in the current directory - Pass an explicit config path with
-c /path/to/config.json - Set the
SDL_CONFIG(orSDL_CONFIG_PATH) environment variable to point to your config file - Set
SDL_CONFIG_HOMEto control the default global config directory
Grammar load errors / native module failures
Grammar load errors / native module failures
.node modules on install or startup.Fixes:- Reinstall all dependencies:
npm install - If native modules are stale or were built for a different Node.js version:
npm rebuild
Repository not accessible
Repository not accessible
- Verify that
rootPathin your config exists and is readable - Use absolute paths in config rather than relative paths
- In container or CI environments, confirm that the repo directory is mounted and accessible
Slow indexing
Slow indexing
- Reduce indexed languages to only those you need in your config
- Add more
ignoreglob patterns to skip generated files,node_modules, build artifacts, etc. - Lower
maxFileBytesto skip very large files - Tune
indexing.concurrencyto match your machine’s core count - Switch to the native Rust engine for faster pass-1 extraction: set
indexing.engine: "rust"in config
Stale or outdated results
Stale or outdated results
- Run
sdl-mcp indexfrom the CLI to trigger a full re-index - Or call
sdl.index.refreshwithincremental: truefrom an MCP tool - Enable watcher mode to keep the index current automatically:
sdl-mcp index --watch
No symbols found after indexing
No symbols found after indexing
- Confirm the
rootPathin config points to the correct repository root - Verify the languages you want indexed are listed under
languagesin config - Check that your
ignorepatterns are not accidentally excluding your source files - Run
sdl-mcp doctorto check for any grammar or adapter failures - Inspect the log file for parse errors on specific file types
Missing symbols for JS files that have TS counterparts
Missing symbols for JS files that have TS counterparts
.js files are not indexed even though javascript is listed in languages.This is expected behavior. When both foo.ts and foo.js exist at the same path, the scanner excludes the .js file to avoid indexing compiled output alongside source.Fix: If the .js file is hand-written source (not compiled output), remove or rename the corresponding .ts file.Agent not using SDL-MCP tools
Agent not using SDL-MCP tools
- Ensure the agent is configured to connect to
sdl-mcp serve --stdio - Validate the generated client config by running
sdl-mcp init --client <name>(e.g.,--client claude-code) - Run
sdl-mcp infoto confirm the resolved config path, log file path, and native-addon status - If your agent enforces explicit tool approval, add SDL-MCP tools to the approved list
- Enable
SDL_CONSOLE_LOGGING=trueto mirror logs to stderr during manual debugging
MCP server connection issues (stdio vs HTTP)
MCP server connection issues (stdio vs HTTP)
- Confirm the transport flag matches your client’s expected transport type
- For HTTP, verify the host and port in the client config match the server’s listen address
- For multi-agent HTTP setups, the session limit is 8 concurrent sessions; additional connections are rejected until a slot frees up
- Check the log file for connection-level errors
File watcher issues
File watcher issues
--no-watch fallback and trigger manual refreshes until the underlying issue is resolved:- Symptom: frequent watcher errors, delayed or missing re-index events
- Cause: file handles held by antivirus or endpoint scanning tools
- Fix: exclude your repo path and SDL-MCP DB path from scanning; fall back to
--no-watch
- Symptom: watcher fails to start on large repos
- Cause: low
fs.inotify.max_user_watchesormax_user_instances - Fix: increase inotify limits via
sysctl, add strongerignorepatterns, or cap load withindexing.maxWatchedFiles
- Symptom: inconsistent or missing watch events
- Cause: non-local filesystems may not emit reliable file notifications
- Fix: run SDL-MCP on a local clone or worktree; disable watch mode and use periodic incremental indexing
Performance issues (prefetch, large repos)
Performance issues (prefetch, large repos)
- Narrow the indexed language list and add aggressive
ignorepatterns for non-source directories - Use
indexing.engine: "rust"for faster multi-threaded pass-1 extraction - Tune
indexing.concurrencyto control parallelism - For large repos, run
sdl-mcp indexduring off-hours and use incremental mode (incremental: true) for updates - Reduce
maxFileBytesto skip binary or generated large files - Use the gateway mode (
tools.gateway: true) to reducetools/listoverhead by 81%
Rust native addon unavailable (falling back to TypeScript engine)
Rust native addon unavailable (falling back to TypeScript engine)
LadybugDB lock file prevents startup
LadybugDB lock file prevents startup
- Ensure no other
sdl-mcp serveorsdl-mcp indexprocess is running - Delete the lock file inside the
.lbugdatabase directory (the directory named ingraphDatabase.path), then restart - If the database is corrupted, delete the entire
.lbugdirectory and re-runsdl-mcp indexto rebuild from source
LadybugDB concurrent access errors
LadybugDB concurrent access errors
"transaction conflict" errors when multiple agents connect.LadybugDB allows concurrent reads but serializes writes. Long-running write transactions can conflict with concurrent queries.Fixes:- Use HTTP transport (
sdl-mcp serve --http) for multi-agent setups — sessions are isolated - Avoid running
sdl-mcp indexwhile agents are actively querying; prefer indexing during quiet periods or using incremental mode - If errors persist, restart the server to clear stale transaction state
Database incompatible after upgrading SDL-MCP
Database incompatible after upgrading SDL-MCP
"not compatible with the current graph engine" at startup after an upgrade.The LadybugDB schema version changed between releases in a way that cannot be migrated automatically.Fixes:- Restart SDL-MCP once to allow any pending forward migrations to run
- If the database is still reported as incompatible, delete the
.lbugdatabase directory and re-runsdl-mcp indexto rebuild from source
ONNX Runtime not loading (semantic search unavailable)
ONNX Runtime not loading (semantic search unavailable)
Embedding model download fails on first run
Embedding model download fails on first run
nomic-embed-text-v1.5).Network restrictions or proxy settings are blocking the model download (~138 MB).Fixes:- Ensure outbound HTTPS access to the Hugging Face model hub is allowed
- Configure proxy via the
HTTPS_PROXYenvironment variable if needed - Consider using the smaller default model (
all-MiniLM-L6-v2, ~22 MB) which may already be cached
Log file missing or appearing in unexpected location
Log file missing or appearing in unexpected location
SDL_LOG_FILE or the derived default is not writable.Fixes:- Run
sdl-mcp infoand inspect thelogging.pathandlogging.fallbackUsedfields - Fix permissions on the log directory, or set
SDL_LOG_FILEto a writable path - Set
SDL_CONSOLE_LOGGING=truetemporarily to mirror logs to stderr while fixing file logging