dokkaiv0.1.0
MCP Server

The seven tools

Search, literal grep, graph navigation and entity/file lookup — the same retrieval /chat uses, exposed as MCP tools.

ToolParametersReturns
list_projectsIngested projects with chunk / node / edge counts and generated_at.
searchquery, project?, k=8Ranked hits — qualified_name, entity type, absolute path:lines, score, truncated description.
grep_projectpattern, project?, k=10Literal keyword search — BM25 over stored code text (tokenized, not regex) for a known identifier.
get_entityqualified_name, project?One entity's relations (calls/called_by/inherits/implements/overrides/methods), summary and full source.
neighborsqualified_name, direction=both, depth=1, limit=30Graph neighborhood as a node list + edge list, BFS up to depth hops.
contextquery, project?, k=8One-shot seed + graph-expanded context bundle, ready as LLM context, capped at 10,000 chars.
get_filepath, start_line?, end_line?Raw file content, optionally a 1-indexed inclusive line range; capped at 2,000 lines / 100 KB.
Typical sizes: search ≈ 2.7k chars at k=8; context ≤ 10k chars (≈2.5k tokens); grep_project ≈ 800 chars at k=10.

Measured token budget

scripts/mcp_harness.py drives a local Ollama model through the tool loop for a fixed question and reports the total payload against a budget. Measured on a medium backend with qwen2.5-coder:3b:

QuestionTool callsPayloadBudgetResult
“how does a request move through the system?”context ×1≈2,478 tokens5,000PASS
a generalization questionsearch ×1≈639 tokens5,000PASS