Claude Code Setup
With the quickstart confirmed working, wiring Shaktiman into Claude Code takes three steps. After this, every Shaktiman MCP tool becomes available to your agent automatically.
The steps below use absolute paths. Replace /absolute/path/to/... with your own.
You can get the absolute path of your built shaktimand binary with:
realpath ./shaktimand # Linux
# or
echo "$(pwd)/shaktimand" # any POSIX shell
1. Create .mcp.json in your project root
{
"mcpServers": {
"shaktiman": {
"command": "/absolute/path/to/shaktimand",
"args": ["/absolute/path/to/your/project"],
"env": {
"SHAKTIMAN_LOG_LEVEL": "WARN"
}
}
}
}
commandis the absolute path to theshaktimandbinary.argsis a single-element array containing the absolute path to the project root you want indexed.env.SHAKTIMAN_LOG_LEVELcontrols structured-log verbosity. Use"DEBUG"while wiring things up, then drop back to"WARN"or remove the key.
2. Smoke-test the daemon before restarting Claude Code
Before you restart Claude Code, confirm shaktimand can start with the exact
arguments Claude Code will pass. This catches path typos and permission issues in
seconds, instead of after a full Claude Code restart:
/absolute/path/to/shaktimand /absolute/path/to/your/project < /dev/null
You should see startup log lines (lock acquisition, watcher starting) and the
process should exit cleanly when stdin closes. If it errors, fix the .mcp.json
path or permissions before moving on — Claude Code will hit the same error
silently on restart.
3. Restart Claude Code
Open a new Claude Code session in the project. On first launch, shaktimand starts,
acquires the project lock, and begins cold-indexing in the background. The first
session may experience "index warming" briefly; queries work at Level 1 (keyword +
structural) while the index fills.
4. Confirm the tools are registered
In Claude Code, run:
/mcp
You should see shaktiman listed as a connected MCP server. The seven tools
(summary, search, context, symbols, dependencies, diff,
enrichment_status) are now available to the agent.
5. Run your first tool call
Ask the agent to orient itself:
"Give me a one-line summary of this codebase."
The agent will call mcp__shaktiman__summary. You'll see something like:
Files: 4213 | Chunks: 58104 | Symbols: 41220
Languages: typescript (3210), go (901), python (102)
Embeddings: 0%
That's the confirmation.
Embeddings: 0%The daemon-launched indexer honors embedding.enabled, which defaults to true —
but Ollama also needs to be installed and running with an embedding model pulled
(ollama pull nomic-embed-text). If Ollama isn't reachable, the circuit breaker
opens and you'll see Embeddings: 0%; keyword + structural search still work.
If you ran the quickstart without --embed, your CLI-populated
index has no embeddings either, and you'll see 0% here until the daemon
catches up. See Embeddings for the full picture.
From here on, Claude Code will reach for Shaktiman whenever it helps — ranked search, budget-fitted context, dependency traversal, and so on.
What if it didn't work?
shaktimandfailed to start → check.shaktiman/shaktimand.login your project.- Tools don't appear under
/mcp→ verify thecommandpath in.mcp.jsonpoints at a real executable (ls -l /absolute/path/to/shaktimand). - Searches return nothing → the index may still be warming. Ask the agent to call
enrichment_statusor see Troubleshooting → Indexing stuck.
Next
- Reference → MCP Tools — parameters and semantics for every tool the agent can call.
- Integrations → Claude Code — advanced setup (custom
CLAUDE.md, subagent delegation hint). - Configuration — per-project tuning.