MCP Tools

August 7, 2026 · View on GitHub

52 standalone tools register unconditionally; 3 more register only when an upstream MCP server is configured (55 total with both present).

# source: tests_py/test_main.py::test_standalone_baseline_is_52_tools
#   verified 2026-07-12 by a live DB-less `tools/list` stdio round-trip
#   against `bare-container-contract` + `wiki_migrate`, commit 4be298a3;
#   bumped to 51 by `check_setup` (issue #115), to 52 by `ingest_document`
#   (offline .docx / Confluence export ingest, issue #192).

Tier 1 — Core Memory & Profiling (22 tools)

ToolPurposeTarget Latency
query_methodologyReturns cognitive profile + hot memories for current domain<50ms
detect_domainLightweight domain classification<20ms
rebuild_profilesFull rescan of session data<10s
list_domainsOverview of all domains<10ms
record_session_endIncremental profile update + session critique<200ms
explore_featuresInterpretability exploration (features, attribution, persona, crosscoder)<100ms
rememberStore a memory through the 4-signal predictive coding gate<100ms
recallRetrieve memories via 6-signal WRRF fusion<200ms
consolidateRun maintenance: decay, compression, CLS, sleep compute<5s
checkpointSave/restore working state for hippocampal replay<100ms
narrativeGenerate project narrative from stored memories<500ms
memory_statsMemory system diagnostics<50ms
import_sessionsImport conversation history into memory storevaries
forgetHard/soft delete with is_protected guard; hard delete is cross-substrate (row + derived wiki claims + unreferenced raw artifact)<50ms
validate_memoryValidate memories against filesystem state<500ms
rate_memoryUseful/not-useful feedback → metamemory confidence<50ms
seed_project5-stage codebase bootstrapvaries
anchorMark memory as compaction-resistant (heat=1.0)<50ms
backfill_memoriesAuto-import prior Claude Code conversationsvaries
unified_searchUnified retrieval across memories, wiki, and code graph<200ms
get_telemetryRetrieval and memory-system telemetry metrics<50ms
check_setupVerify local install, backend-aware (SQLite: store open + FS; PostgreSQL: PG driver, DATABASE_URL, connection, extensions, FS) — facade over mcp_server.doctor<500ms

Tier 2 — Navigation & Exploration (7 tools)

ToolPurposeTarget Latency
recall_hierarchicalFractal L0/L1/L2 weighted recall<200ms
drill_downNavigate into fractal cluster (L2 → L1 → memories)<100ms
navigate_memorySuccessor Representation co-access BFS traversal<200ms
get_causal_chainTrace entity relationships through knowledge graph<200ms
detect_gapsIdentify isolated entities, sparse domains, temporal drift<500ms
recall_skillsRecall learned procedural skills by situation<200ms
whyResolve ⟦rcpt:id⟧ injection receipts into presence-in-context evidence (blame path, decision 4255039)<100ms

Tier 3 — Automation & Intelligence (10 tools)

ToolPurposeTarget Latency
sync_instructionsPush top memory insights into CLAUDE.md<500ms
create_triggerProspective memory triggers (keyword/time/file/domain)<100ms
add_ruleAdd neuro-symbolic hard/soft/tag rules<100ms
get_rulesList active rules by scope/type<50ms
get_project_storyPeriod-based autobiographical narrative<500ms
assess_coverageKnowledge coverage score (0-100) + recommendations<500ms
codebase_analyzeNative AST codebase analysis (tree-sitter, 7 languages)varies
curate_wikiAuto-curate wiki pages from memory clustersvaries
curate_distillReturn understanding-level distillation dossiers (error->success, co-access, entity family) for the LLM to author lesson memories from (M-D8)~200-500ms
ingest_documentIngest a .docx or Confluence storage-format XHTML export into the memory/wiki store, with provenance + idempotent re-ingest (issue #192). File-based, no upstream neededvaries

Tier 4 — Wiki (10 tools)

ToolPurposeTarget Latency
wiki_writeCreate a first-class wiki page (ADR, spec, note)<100ms
wiki_readRead a wiki page<50ms
wiki_listList wiki pages by scope/kind<50ms
wiki_linkCreate a typed link between wiki pages<50ms
wiki_adrCreate an Architecture Decision Record<100ms
wiki_renameRename a wiki page and update backlinks<100ms
wiki_verifyVerify wiki page integrity and links<100ms
wiki_reindexReindex wiki pages into memory pointersvaries
wiki_purgePermanently delete a wiki page<50ms
wiki_migrateReconcile wiki.pages against FS (backfill + ghost purge)varies

Upstream-integration tools (3, conditionally registered)

These register only when their upstream MCP server is configured, bringing the total to 55: ingest_codebase + change_impact (ai-architect-mcp-codebase) and ingest_prd (ai-architect-mcp-spec). With no upstream present, exactly the 52 standalone tools above register. Driving the ai-architect pipeline end-to-end (formerly run_pipeline) is not part of this server — it lives in the ai-architect-mcp-codebase MCP.

Slash Commands

Discovered from commands/*.md at the repo root (not .claude/commands/ — this is a plugin repo, so the plugin loader picks these up directly). Each command is a single Markdown file with a name/description frontmatter pair; /preflight additionally scopes allowed-tools to keep itself read-only.

CommandWhat it doesRoles
/methodologyRetrieves the cognitive methodology profile (via query_methodology) for the current working directory and offers rebuild_profiles / list_domains follow-ups, plus hypermnesia-mcp-viz's get_methodology_graph when that companion MCP is installedAny user, any session — the general entry point into a domain's profile
/whyDeterministic blame-path: resolves ⟦rcpt:id⟧ presence-in-context markers via the why tool, reports which memories were in context (never that they caused an answer — Pearl-rung-1 evidence only)Anyone auditing why an answer looked the way it did
/preflight [symptôme]Runs python -m mcp_server.doctor (backend-aware check list) and turns the output into a dependency-ordered, copy-paste repair plan; takes an optional symptom argument to prioritize the relevant check first. Read-only — modifies no filesNew users whose install doesn't work yet; support; first-deploy DevOps (issue #119)

Convention for adding a new command: one new .md file under commands/ (frontmatter: name, description, and allowed-tools if the command should run with restricted permissions) plus one new row in the table above — the catalogue and the command ship in the same commit.

Data Flow

Memory Write Path

  1. Gate: 4-signal novelty filter (embedding distance, entity overlap, temporal proximity, structural similarity). The content-derived bypasses are granted by an allowlist of origins (deliberate, local_action — issue #365), so fetched text cannot skip the gate by looking like a decision or an error, and neither can content from a channel nobody has classified; force and a deliberate write class still bypass at any origin. Decision/error content bypasses the gate — detection is language-aware (see docs/data-flow.md § Write Gate Bypass); force=true or an important/critical tag always bypasses, in any language
  2. Curate: Active curation — merge with similar, link to related, or create new
  3. Store: PostgreSQL + pgvector with auto tsvector indexing → entity extraction → knowledge graph

Memory Read Path

  1. Route: Intent classification (temporal/causal/semantic/entity/knowledge_update/multi_hop)
  2. Enrich: Doc2Query expansion + concept synonyms
  3. Fuse: PL/pgSQL recall_memories() — WRRF fusion of vector + FTS + trigram + heat + recency (server-side)
  4. Rerank: FlashRank cross-encoder (client-side, top-3x candidates)
  5. Filter: Neuro-symbolic rules → ranked results

Cognitive Profile Pipeline

  1. Scan: Read ~/.claude/projects/ for JSONL conversations and memory .md files
  2. Group: Map projects to domains via project ID matching
  3. Extract: Per-domain pattern extraction (clustering, n-grams, tool stats, session shape)
  4. Classify: Felder-Silverman cognitive style from behavioral signals
  5. Bridge: Cross-domain connections from brain-index cross-refs and text analogies
  6. Detect gaps: Blind spots by comparing domain coverage against global averages
  7. Learn features: Sparse dictionary learning on 27D behavioral activation space
  8. Encode: Per-domain sparse feature activations + persona vectors
  9. Crosscode: Detect persistent behavioral features across domains
  10. Store: Persist as ~/.claude/methodology/profiles.json