MCP Tools Reference
@brain-protocol/mcp — 38 tools via Model Context Protocol.
Compatible with Claude Desktop, Cursor, Claude Code, Windsurf, and any MCP client.
npx @brain-protocol/mcp --setup claude-desktop
# or: claude-code, cursor, windsurf, snakTool Groups
Knowledge Management
query_knowledgebothFull-text search with category, author, tag, and brain_id filters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | yes | Search query |
| category | string | no | Filter by category |
| author | string | no | Filter by author |
| tags | string | no | Comma-separated tags |
| limit | number | no | Max results (default 10) |
| offset | number | no | Pagination offset |
| brain_id | string | no | Filter by brain UUID |
archive_knowledgebothStore a new knowledge entry with confidence scoring and tags.
| Parameter | Type | Required | Description |
|---|---|---|---|
| content | string | yes | Knowledge content |
| content_type | string | no | markdown, code, decision, pattern, documentation, git_commit, json |
| category | string | no | Category |
| author | string | no | Author name |
| tags | string[] | no | Tags array |
| confidence | number | no | Confidence 0-1 |
| brain_id | string | no | Target brain UUID |
| is_public | boolean | no | Public visibility |
update_knowledgebothPartial update of an existing entry (content, tags, confidence).
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Entry UUID to update |
| content | string | no | New content |
| content_type | string | no | New content type |
| category | string | no | New category |
| tags | string[] | no | New tags |
| confidence | number | no | New confidence |
delete_knowledgebothRemove an entry by ID (soft-archive with lifecycle_state).
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Entry UUID to delete |
get_contextbothFull cognitive pipeline — FoA workspace with query expansion, spreading activation, analogical reasoning, and retrieval proof.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | yes | Natural language query |
| budget | number | no | Token budget for context assembly (default 4000) |
| brain_id | string | no | Filter by brain UUID |
Knowledge Graph
search_with_contextbothGraph-enriched hybrid search — returns results with connected graph neighbors for richer context.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | yes | Search query |
| limit | number | no | Max results (default 5, max 20) |
| graph_depth | number | no | Graph traversal depth for context (default 1, max 2) |
| brain_id | string | no | Filter by brain UUID |
create_edgebothCreate a typed relationship between two knowledge entries.
| Parameter | Type | Required | Description |
|---|---|---|---|
| source_id | string | yes | Source entry UUID |
| target_id | string | yes | Target entry UUID |
| edge_type | string | yes | derives_from, validates, extends, implements, conflicts_with, supersedes, tested_by, documented_by, optimizes, related_to |
| confidence | number | no | Edge confidence 0-1 |
get_graphbothTraverse the knowledge graph from any entry via recursive CTE.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Starting entry UUID |
| depth | number | no | Max depth (default 3, max 5) |
suggest_connectionsbothFind semantically similar entries to link — powered by embedding similarity.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Entry UUID to find connections for |
| limit | number | no | Max suggestions (default 5, max 20) |
| brain_id | string | no | Scope search to brain UUID |
get_provenance_chainbothTrace the full provenance chain of an entry — all ancestors via derives_from, validates, extends edges.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Starting entry UUID |
| depth | number | no | Max depth (default 5, max 10) |
OpenMemory
add_memoriesbothStore a memory with automatic client app tagging (Mem0-compatible).
| Parameter | Type | Required | Description |
|---|---|---|---|
| messages | array | yes | Array of {role, content} messages |
| user_id | string | no | User identifier |
| agent_id | string | no | Agent identifier |
| app_id | string | no | App identifier |
| metadata | object | no | Additional metadata |
search_memorybothSemantic + graph search across all memories, filtered by client_app or user_id (Mem0-compatible).
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | yes | Search query |
| user_id | string | no | Filter by user |
| agent_id | string | no | Filter by agent |
| app_id | string | no | Filter by app |
| limit | number | no | Max results (default 10) |
list_memoriesbothList recent memories sorted by creation time, newest first (Mem0-compatible).
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | no | Filter by user |
| agent_id | string | no | Filter by agent |
| app_id | string | no | Filter by app |
| limit | number | no | Max results (default 10) |
get_memory_statusbothStatus, capabilities, memory count, and did:starknet identity.
| Parameter | Type | Required | Description |
|---|---|---|---|
| wallet_address | string | no | Starknet wallet address for did:starknet identity |
| chain_id | string | no | Starknet chain ID (default: SN_MAIN) |
| brain_id | string | no | Scope memory count to brain UUID |
delete_all_memoriesbothDelete all memories for a user/agent (Mem0-compatible). Requires confirm=true.
| Parameter | Type | Required | Description |
|---|---|---|---|
| confirm | boolean | yes | Must be true to confirm deletion |
| user_id | string | no | Delete only this user's memories |
| agent_id | string | no | Delete only this agent's memories |
Decision Intelligence
record_decisionbothRecord a structured decision with context, options considered, and rationale.
| Parameter | Type | Required | Description |
|---|---|---|---|
| decision | string | yes | The decision made |
| context | string | yes | Context/situation |
| options | string[] | yes | Options considered (min 2) |
| chosen | string | yes | Option chosen |
| rationale | string | yes | Why this option |
| chain_id | string | no | Previous decision UUID (creates derives_from edge) |
| confidence | number | no | Confidence (default 0.85) |
| tags | string[] | no | Tags |
get_decision_chainbothTraverse the decision graph from a starting decision.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Starting decision UUID |
| depth | number | no | Max depth (default 3, max 5) |
get_memory_guidancebothGet relevant past decisions and high-confidence patterns before acting (Retrieval-Augmented Execution).
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_description | string | yes | Task the agent is about to perform |
| limit | number | no | Max results (default 10) |
| brain_id | string | no | Filter by brain UUID |
Development (Cloud)
suggest_patternscloudAnalyze code and suggest applicable design patterns from the knowledge base.
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | yes | Code to analyze |
| file_type | string | no | typescript, cairo, python, etc. |
detect_antipatternscloudAnalyze code for anti-patterns and potential issues.
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | yes | Code to analyze |
| file_type | string | no | File type |
architectural_advicecloudGet architectural recommendations for code based on project context.
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | yes | Code to analyze |
| context | string | no | Project context (e.g., starknet defi) |
Verification & Proof
provecloudAnchor a knowledge entry on Starknet L3 with a Poseidon hash.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Entry UUID to anchor |
verifycloudVerify a knowledge entry's on-chain proof.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Entry UUID to verify |
archive_giza_proofbothArchive a Giza zkML proof result as a verifiable knowledge entry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| proof_id | string | yes | Giza proof identifier |
| model_id | string | yes | Giza model identifier |
| input_hash | string | yes | Hash of inference input |
| output_value | any | yes | Inference output value |
| verified | boolean | yes | Proof verified |
| timestamp | string | yes | ISO timestamp |
| proof_tx | string | no | Starknet tx hash |
| description | string | no | Human-readable description |
query_giza_proofsbothQuery archived Giza zkML proofs with filters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | no | Filter by model |
| verified | boolean | no | Filter by verification |
| limit | number | no | Max results |
link_proof_to_entrybothLink a Giza proof entry to another knowledge entry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| proof_entry_id | string | yes | Archived proof UUID |
| target_entry_id | string | yes | Target entry UUID |
| edge_type | string | no | validates (default), derives_from, related_to |
get_proof_chainbothGet the full proof chain for an entry — retrieval proofs, anchoring history, and verification status.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Entry UUID to get proof chain for |
Sync
resolve_conflictbothResolve a sync conflict between local and cloud versions of an entry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| conflict_id | string | yes | Conflict ID to resolve |
| resolution | string | yes | keep_local, keep_cloud, or keep_both |
Cognition (V4.1)
run_proactive_cognitioncloudTrigger foresight inference + dialectical synthesis (budget-capped LLM, admin only).
| Parameter | Type | Required | Description |
|---|---|---|---|
| force | boolean | no | Override budget cap (default false) |
get_proactive_statusbothMonitor proactive cognition — last runs, foresight edges, dialectical syntheses, LLM budget.
No parameters
get_dialectical_synthesesbothList dialectical synthesis entries with promotion rate and survival metrics.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | no | Max results (default 10) |
| status | string | no | Filter by lifecycle status (review, active, promoted) |
list_contradictionsbothList contradictions between knowledge entries with status and type filters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | no | Filter: pending, resolved, dismissed |
| type | string | no | Filter: factual, opinion, hypothesis |
| limit | number | no | Max results (default 20) |
get_contradictionbothFull contradiction detail — both entries, evidence passages, resolution history.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Contradiction UUID |
resolve_contradictionbothResolve a contradiction with a verdict (CONTRADICTORY, COMPLEMENTARY, REDUNDANT, ORTHOGONAL).
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Contradiction UUID |
| verdict | string | yes | CONTRADICTORY, COMPLEMENTARY, REDUNDANT, or ORTHOGONAL |
| rationale | string | yes | Explanation for the verdict |
get_spreading_activationbothRun spreading activation from seed entries through the knowledge graph (Collins & Loftus 1975).
| Parameter | Type | Required | Description |
|---|---|---|---|
| seed_ids | string[] | yes | Seed entry UUIDs (1-5) |
| max_hops | number | no | Max propagation hops (default 3, max 5) |
| min_activation | number | no | Minimum activation threshold (default 0.1) |
| decay | number | no | Decay factor per hop (default 0.5) |
find_analoguesbothFind structural analogues — entries in different domains with similar graph topology (Gentner 1983).
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Source entry UUID |
| limit | number | no | Max analogues (default 5) |
| min_similarity | number | no | Minimum structural similarity (default 0.3) |
submit_feedbackbothRecord explicit feedback on a knowledge entry — upvote, downvote, citation, or correction.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Entry UUID |
| signal | string | yes | upvote, downvote, citation, or correction |
| context | string | no | Additional context for the feedback |
| correction_content | string | no | Corrected content (when signal=correction) |
get_feedback_summarybothFeedback counts, net signal, and recent events for an entry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| entry_id | string | yes | Entry UUID |