Skip to main content

MCP tools

Agent Brain exposes one MCP tool named brain. It uses a required command field and an optional input object. This unified shape is the current public contract; older examples that call brain_recall or brain_remember directly are stale and should be migrated.

Request shape

{
  "name": "brain",
  "arguments": {
    "command": "recall",
    "input": {
      "query": "deployment approval policy",
      "limit": 5
    }
  }
}

Commands

CommandPurpose
rememberStore durable memory with type, importance, project, and tags.
remember_executionStore a structured Harness or Terminal execution outcome.
execution_insightsAggregate recurring routing, verification, policy, or materialization friction.
recallRetrieve relevant memories for a natural-language query.
searchBrowse memories with pagination and filters.
forgetArchive a memory by ID.
get_by_idFetch one memory by UUID.
resolve_memoryResolve a deferred brain://memory/<id> reference.
statusReturn health, memory, cache, and connected-agent status.
shareShare a memory with selected agents.
cache_checkCheck for a semantically similar cached response.
project_contextRetrieve project-scoped context and active agents.
auditFind conflicts, redundancy, and stale memories.
audit_applyApply approved audit findings.
exportExport a .brainpack archive.
importRestore a .brainpack archive, optionally as a dry run.
import_foreignImport Claude, Codex, Gemini, or other supported memory files.

Common inputs

remember

{
  "command": "remember",
  "input": {
    "content": "Deployments require staging approval before production.",
    "type": "decision",
    "importance": 0.9,
    "project": "example-project",
    "tags": ["release", "policy"]
  }
}

recall

{
  "command": "recall",
  "input": {
    "query": "What is our production approval policy?",
    "limit": 5,
    "filter": { "project_id": "example-project" }
  }
}

search

Use query, optional filter, page, and page_size for browse-style access. Filters can include memory type, project, source agent, date range, minimum importance, tags, and archived status.

export and import

Use a passphrase for encrypted .brainpack archives. Use dry_run: true before an import that will write records. Keep archive files and passphrases private.

Compatibility notes

  • Discover the brain tool and its description at connection time.
  • Treat command output fields as additive and IDs as opaque.
  • The MCP endpoint is local by default; do not expose it publicly without an authentication and network boundary.
  • For HTTP clients, use the REST API reference.