propose_symbol through MCP cannot clobber a human-verified name
any more than an agent calling the library directly can.
mcp package is absent, warden mcp prints a clear error and exits. No other command is
affected.Installation
mcp>=1.2 (the official MCP Python SDK). To install WARDEN with every optional
dependency at once:
Starting the server
warden.db in the current directory. To point it at a specific
project database:
Wiring into an MCP client
Most MCP clients accept a server block in a JSON configuration file. The exact key name varies by client. The pattern is the same: point at thewarden binary, pass mcp as the subcommand,
and optionally pass --db:
"warden", which is how it appears in
the client’s tool namespace.
Exposed tools
All tools are safe to call concurrently. Reads carry no side effects. Writes are economy-gated (see how the economy works).agent_backends()
agent_backends()
run_agent_pass with backend: "auto".Inputs: none.Returns: array of objects, one per backend.list_versions()
list_versions()
version_id
values needed by every other tool.Inputs: none.Returns: array of objects, one per version.coverage(version_id)
coverage(version_id)
list_functions(version_id, include_imports)
list_functions(version_id, include_imports)
name == null or confidence < threshold.Inputs:get_function_facts(version_id, func_index)
get_function_facts(version_id, func_index)
FunctionFacts object for one defined function. Use this when an external
MCP client wants to produce its own proposal while staying constrained to evidence from the
binary and KB.Inputs:get_symbol(stable_id)
get_symbol(stable_id)
null if no annotation exists yet.Inputs:search_symbols(query, limit)
search_symbols(query, limit)
list_functions
payload. The match is case-insensitive and results are sorted by name. This is a read; it has no
side effects.Inputs:get_diff(from_version_id, to_version_id)
get_diff(from_version_id, to_version_id)
carry=False and store=False, so this stays a pure read with no side
effects.Inputs:export_kb_text(version_id)
export_kb_text(version_id)
# WARDEN KB export comment. It is git-diffable and stable across runs.analyze_version(version_id)
analyze_version(version_id)
warden analyze runs. The recovered thread model and struct layouts are written to the KB, so
this tool performs economy-gated writes and is not a pure read. It needs no API key and no
network.Inputs:analyze_version is idempotent and never
overwrites a higher-confidence or locked entry.run_agent_pass(version_id, backend, only_unconfident, rounds)
run_agent_pass(version_id, backend, only_unconfident, rounds)
warden agent runs. This lets an MCP
client trigger WARDEN’s built-in offline, OpenAI/Codex, or Anthropic backend instead of
reimplementing the loop.Inputs:OPENAI_API_KEY for the
OpenAI/Codex backend or ANTHROPIC_API_KEY for the Anthropic backend before the MCP client
starts the server.propose_symbol(stable_id, name, summary, confidence)
propose_symbol(stable_id, name, summary, confidence)
provenance: "agent" and actor: "agent:mcp" in the evidence trail. These values
are injected by the server and cannot be supplied by the caller.Inputs:The provenance/confidence economy
propose_symbol goes through exactly the same economy gate as every other write path in
WARDEN. The CLI, the library, and the agent pipeline all converge on KnowledgeBase.upsert_symbol.
There is no separate bypass for MCP.
The authority ordering from highest to lowest is:
propose_symbol must satisfy:
Unnamed slots are always accepted
A locked human annotation blocks every agent write
written: false, regardless of confidence.Any human annotation (unlocked) blocks every agent write
An oracle annotation blocks an agent write unless the incoming confidence exceeds the existing score
An existing agent annotation is overwritten only if the incoming confidence is strictly higher
Library usage
If you want to embed the server inside a larger Python process rather than launching it as a subprocess, usebuild_server directly:
build_server raises RuntimeError with an actionable message if the mcp package is not
installed, and FileNotFoundError if the project database does not exist.