MCP Server
The MCP server exposes 25+ tools over HTTP at /mcp (port 8888), a JSON-RPC endpoint consumable by any MCP client (OpenCode, Claude, and others).
Tool Roles
MCP dispatch is authorization-aware (fail-closed). A Standard role gets the bank-scoped memory tools only and cannot even discover the operational tools it cannot call. Admin unlocks config/directive mutation, invariant extraction, and the global AST/code tools.
Tools
| Tool | Description |
|---|---|
zoid_recall | Four-way memory recall across conversational, experiential, and code lanes |
zoid_retain_fact | Retain a single fact with explicit memory type, source, tags |
zoid_retain_batch | Batch retain multiple items in one call |
zoid_retain_document | Ingest a text document as a HardFact |
zoid_ingest_document | Chunk + embed a document grouped under one document_id |
zoid_retain_conversation | Retain user/assistant turn pairs as ConversationalContext |
zoid_invariant_check | Check memory items against registered invariants |
zoid_invariant_extract | Extract invariants from CLAUDE.md / AGENTS.md |
zoid_memory_query | Structured memory search by text, type, tags, source |
zoid_memory_get | Get a single memory item by ID |
zoid_memory_delete | Soft-delete a memory item |
zoid_memory_update_tags | Replace tags on a memory item |
zoid_ast_index | Index source code via tree-sitter (L0/L1/L2 cards) |
zoid_ast_search | Search code symbols by name, kind, file, or LOD |
zoid_ast_card | Get full code card for a symbol ID |
zoid_ast_slice | Task-shaped subgraph retrieval |
zoid_ast_code_window | Gated raw source fetch (requires reason + line count) |
zoid_code_lookup | Rerank code cards by relevance with optional blast radius |
zoid_blast_radius | Find symbols transitively affected by a change |
zoid_config_get | Return current BankConfig |
zoid_config_set | Update BankConfig fields (admin) |
zoid_directive_list | List directives by priority |
zoid_directive_create | Create a directive (admin) |
zoid_directive_delete | Delete a directive (admin) |
zoid_mental_model_list | List mental model definitions |
zoid_mental_model_synthesize | Synthesize a mental model by definition ID |
Safety
- Path confinement — file reads (invariant extract, code window) resolve within
ZOIDMATTER_WORKSPACE_ROOTand fail closed if unset. - Request caps —
top_k, blast-radius depth, and result counts are clamped to prevent work amplification. - Retain gate — all ingest tools run the invariant mission before storing; an MCP caller can never override an invariant.