Model Context Protocol (MCP) API
The DAMS MCP server (dams mcp, stdio) exposes code search, the SQLite cache,
and Graphify path retrieval directly to LLM agents — so they use structured tools instead
of raw filesystem scans.
Starting the server
dams mcp
# registers in client IDE configs (Cline, Claude Code, Cursor, Continue) via:
dams configure-agents .
Tools
| Tool | Description |
|---|---|
search | Hybrid semantic + regex code search (Chunkhound cAST chunks) |
search_structural | GritQL structural pattern search / match |
ripple | Reverse call graph: what depends on a symbol |
graph_query | Graphify BFS subgraph query (token-efficient) |
read_cache | Read entries from the SQLite active-code cache |
query_graph | Graph-first lookup (paired with graphify-out/graph.json) |
Example: query_graph
{
"tool": "graph_query",
"arguments": { "query": "how does auth flow work", "depth": 2 }
}
// returns a ~2k-token subgraph (vs ~123k naive dump)
MCP Interception Proxy
Beyond its own tools, DAMS ships a protocol-level MCP Interception Proxy
that wraps any underlying MCP server. When shims are active, native tool calls
(grep_search, view_file, list_dir) are intercepted and
routed to the DAMS context dispatcher, returning rich Graphify/Chunkhound context instead
of bare tool output.
Agent steering invariant
For every configured agent, DAMS injects these rules:
- Query-First — if
graphify-out/graph.jsonexists, rungraphify query(orquery_graph) before grepping. - Context-Aware Scoping — use
graphify path/explainfor relationships and focused symbols. - AST Update Routine — after editing files, run
graphify update .(AST-only, zero token cost).