- src/mcp: streamable-HTTP client (rmcp v3.12) negotiating Initialize +
LATEST_WITH_INITIALIZE; namespaced mcp__{connector}__{tool} surface, write
badges from ToolAnnotations, persisted discovery (tools_json) so the agent
tool declarations stay byte-stable for KV-cache reuse.
- store: mcp_connectors catalog + tools_json column (idempotent migration) and
set_mcp_tools; per-session per-tool allowlist (SessionSettings.mcp_enabled).
- agent: execute_mcp routes namespaced calls, gated on the session allowlist
before any network call; Bearer token comes from the DB catalog, never echoed.
- api/sessions: build the MCP surface into Ambient + the agent tool declarations
on both the turn and prewarm paths (identical rebuild keeps the prefix stable).
- api/mcp + GUI: connector CRUD, tool-discovery picker, per-session enable.
- examples/mcp_probe: read-only CLI discovery spike.
Live-verified: 22 gmail tools discovered, gmail_labels returned 25 labels, and a
full model-driven GUI turn (7 enabled tools) with a 9197-token RESUME cache hit.
proofs/auto_ckpt.lean: core-only Lean 4 model of the auto-ckpt / GEN 0 RESUME rule, kernel PASS (no sorryAx). Proves restore soundness (s <= lcp => first s tokens match, bit-identical recompute), branch invalidation (divergence at p => lcp <= p), and GEN 0 -> RESUME L. Backs the invariants in review/osservazioni-auto-ckpt.md.
examples/prefix_measure.rs: measures the real static prefix from live SQLite sessions via build_prefix_ids (no engine): ~1135 tokens/session, 575 tool_declare, ~589 shared cross-session. README Status documents both + the agreed next engine-side --auto-ckpt step. Suite 162 passed + 3 ignored, clippy/fmt clean.