codetools / MCP server

codetools MCP server

codetools mcp serve is a stdio MCP server. Claude launches it once per session, and it exposes the codetools verbs as tools. It follows ADR-0038 (Accepted, 2026-10-13): "codetools and orchestrata expose MCP tool servers generated from their verb registries - every activity verb is a callable tool with the CLI's approval gate - registered with Claude through the deployed configuration, not by hand".

The facts below come from:

How a tool call runs

Diagram projects-codetools-mcp-1

The tools (codetools mcp list, 2026-10-23)

Tool Verb Approval Help
ast_map ast map required write CODEBASE_MAP.md (and the full skeleton) with a delta cache
ast_query ast query none run the structural Python query DSL
ast_snapshot ast snapshot none read source snapshot statistics or JSON
deploy_baseline_record deploy baseline record required append a verified audit entry from an existing verify record
deploy_install deploy install required deploy a pinned git ref into a prefix
deploy_promote deploy promote required promote a built artifact to current
deploy_render_mcp deploy render-mcp required render the release's .mcp.json fragment under the prefix
deploy_rollback deploy rollback required re-point current at the previous release
deploy_select_affected deploy select-affected none bound a changed-file set to a measured selection from a facts document on stdin (RUL-040 fail-closed JSON contract)
deploy_verify_identity deploy verify-identity none prove the running units are the deployed release
gate_cpuset gate cpuset required the container cpuset from capacity
gate_provision gate provision required converge the container
gate_readiness gate readiness none run the gate's readiness probes
gate_run gate run required run one batch of master
gate_status gate status none print the last batch
graph_blast graph blast none compute affected symbols or tests
graph_extract graph extract none extract graph nodes and edges
realize realize required generate (and optionally implement and verify) an OpenSpec change
rename_module rename module required Move one module by dotted path.
rename_plan rename plan required Execute a declarative rename plan.
rename_report rename report none Dry-run a plan and print its residue report only.
rename_symbol rename symbol required Rename one type-resolved symbol.
render render on:out render a Mermaid classDiagram to Python skeleton(s)
approve - none issue a single-use token

That is 23 verb tools plus approve. mcp serve and mcp list are not exposed as tools. Every option of every verb is described on codetools verbs.

In a Claude session the tools appear as mcp__codetools__<tool>. The deferred-tool list of this session also showed mcp__codetools__ast_query, ast_snapshot, graph_extract, graph_blast, the deploy tools and others, but no ast_map, deploy_select_affected or any rename_* tool. The session's server runs an older release that does not have those verbs (see below).

Registration

Diagram projects-codetools-mcp-2

/opt/codetools/bin is a symlink to current/.venv/bin/. The registered command therefore follows each promote, but only for servers started after it.

The call ledger

Measured problem: sessions keep the old release

A stdio server keeps the interpreter and code it started with. On 2026-10-23 at 01:56, three codetools mcp serve processes were running:

PID Started Runs from
11029 2026-10-21 22:14 /opt/codetools/releases/6b4babfeaac2e008/.venv/bin/python3
11903 2026-10-21 22:14 same
1279789 2026-10-22 15:26 same

Release 6b4babfeaac2e008 is commit 55221698, promoted on 2026-10-14 at 23:00 UTC. /opt/codetools/audit.log shows three promotes after it:

The three servers do not offer the verbs listed above. They pick up the new release only when their Claude session restarts. Options are on codetools blockers.