Skip to main content
← Back to Docs

MCP Tools Reference

@brain-protocol/mcp 38 tools via Model Context Protocol.

Compatible with Claude Desktop, Cursor, Claude Code, Windsurf, and any MCP client.

Quick Setup
npx @brain-protocol/mcp --setup claude-desktop
# or: claude-code, cursor, windsurf, snak
bothLocal SQLite + Cloud
cloudCloud mode only

Knowledge Management

query_knowledgeboth

Full-text search with category, author, tag, and brain_id filters.

ParameterTypeRequiredDescription
qstringyesSearch query
categorystringnoFilter by category
authorstringnoFilter by author
tagsstringnoComma-separated tags
limitnumbernoMax results (default 10)
offsetnumbernoPagination offset
brain_idstringnoFilter by brain UUID
archive_knowledgeboth

Store a new knowledge entry with confidence scoring and tags.

ParameterTypeRequiredDescription
contentstringyesKnowledge content
content_typestringnomarkdown, code, decision, pattern, documentation, git_commit, json
categorystringnoCategory
authorstringnoAuthor name
tagsstring[]noTags array
confidencenumbernoConfidence 0-1
brain_idstringnoTarget brain UUID
is_publicbooleannoPublic visibility
update_knowledgeboth

Partial update of an existing entry (content, tags, confidence).

ParameterTypeRequiredDescription
idstringyesEntry UUID to update
contentstringnoNew content
content_typestringnoNew content type
categorystringnoNew category
tagsstring[]noNew tags
confidencenumbernoNew confidence
delete_knowledgeboth

Remove an entry by ID (soft-archive with lifecycle_state).

ParameterTypeRequiredDescription
idstringyesEntry UUID to delete
get_contextboth

Full cognitive pipeline — FoA workspace with query expansion, spreading activation, analogical reasoning, and retrieval proof.

ParameterTypeRequiredDescription
querystringyesNatural language query
budgetnumbernoToken budget for context assembly (default 4000)
brain_idstringnoFilter by brain UUID

Knowledge Graph

search_with_contextboth

Graph-enriched hybrid search — returns results with connected graph neighbors for richer context.

ParameterTypeRequiredDescription
qstringyesSearch query
limitnumbernoMax results (default 5, max 20)
graph_depthnumbernoGraph traversal depth for context (default 1, max 2)
brain_idstringnoFilter by brain UUID
create_edgeboth

Create a typed relationship between two knowledge entries.

ParameterTypeRequiredDescription
source_idstringyesSource entry UUID
target_idstringyesTarget entry UUID
edge_typestringyesderives_from, validates, extends, implements, conflicts_with, supersedes, tested_by, documented_by, optimizes, related_to
confidencenumbernoEdge confidence 0-1
get_graphboth

Traverse the knowledge graph from any entry via recursive CTE.

ParameterTypeRequiredDescription
entry_idstringyesStarting entry UUID
depthnumbernoMax depth (default 3, max 5)
suggest_connectionsboth

Find semantically similar entries to link — powered by embedding similarity.

ParameterTypeRequiredDescription
entry_idstringyesEntry UUID to find connections for
limitnumbernoMax suggestions (default 5, max 20)
brain_idstringnoScope search to brain UUID
get_provenance_chainboth

Trace the full provenance chain of an entry — all ancestors via derives_from, validates, extends edges.

ParameterTypeRequiredDescription
entry_idstringyesStarting entry UUID
depthnumbernoMax depth (default 5, max 10)

OpenMemory

add_memoriesboth

Store a memory with automatic client app tagging (Mem0-compatible).

ParameterTypeRequiredDescription
messagesarrayyesArray of {role, content} messages
user_idstringnoUser identifier
agent_idstringnoAgent identifier
app_idstringnoApp identifier
metadataobjectnoAdditional metadata
search_memoryboth

Semantic + graph search across all memories, filtered by client_app or user_id (Mem0-compatible).

ParameterTypeRequiredDescription
querystringyesSearch query
user_idstringnoFilter by user
agent_idstringnoFilter by agent
app_idstringnoFilter by app
limitnumbernoMax results (default 10)
list_memoriesboth

List recent memories sorted by creation time, newest first (Mem0-compatible).

ParameterTypeRequiredDescription
user_idstringnoFilter by user
agent_idstringnoFilter by agent
app_idstringnoFilter by app
limitnumbernoMax results (default 10)
get_memory_statusboth

Status, capabilities, memory count, and did:starknet identity.

ParameterTypeRequiredDescription
wallet_addressstringnoStarknet wallet address for did:starknet identity
chain_idstringnoStarknet chain ID (default: SN_MAIN)
brain_idstringnoScope memory count to brain UUID
delete_all_memoriesboth

Delete all memories for a user/agent (Mem0-compatible). Requires confirm=true.

ParameterTypeRequiredDescription
confirmbooleanyesMust be true to confirm deletion
user_idstringnoDelete only this user's memories
agent_idstringnoDelete only this agent's memories

Decision Intelligence

record_decisionboth

Record a structured decision with context, options considered, and rationale.

ParameterTypeRequiredDescription
decisionstringyesThe decision made
contextstringyesContext/situation
optionsstring[]yesOptions considered (min 2)
chosenstringyesOption chosen
rationalestringyesWhy this option
chain_idstringnoPrevious decision UUID (creates derives_from edge)
confidencenumbernoConfidence (default 0.85)
tagsstring[]noTags
get_decision_chainboth

Traverse the decision graph from a starting decision.

ParameterTypeRequiredDescription
entry_idstringyesStarting decision UUID
depthnumbernoMax depth (default 3, max 5)
get_memory_guidanceboth

Get relevant past decisions and high-confidence patterns before acting (Retrieval-Augmented Execution).

ParameterTypeRequiredDescription
task_descriptionstringyesTask the agent is about to perform
limitnumbernoMax results (default 10)
brain_idstringnoFilter by brain UUID

Development (Cloud)

suggest_patternscloud

Analyze code and suggest applicable design patterns from the knowledge base.

ParameterTypeRequiredDescription
codestringyesCode to analyze
file_typestringnotypescript, cairo, python, etc.
detect_antipatternscloud

Analyze code for anti-patterns and potential issues.

ParameterTypeRequiredDescription
codestringyesCode to analyze
file_typestringnoFile type
architectural_advicecloud

Get architectural recommendations for code based on project context.

ParameterTypeRequiredDescription
codestringyesCode to analyze
contextstringnoProject context (e.g., starknet defi)

Verification & Proof

provecloud

Anchor a knowledge entry on Starknet L3 with a Poseidon hash.

ParameterTypeRequiredDescription
entry_idstringyesEntry UUID to anchor
verifycloud

Verify a knowledge entry's on-chain proof.

ParameterTypeRequiredDescription
entry_idstringyesEntry UUID to verify
archive_giza_proofboth

Archive a Giza zkML proof result as a verifiable knowledge entry.

ParameterTypeRequiredDescription
proof_idstringyesGiza proof identifier
model_idstringyesGiza model identifier
input_hashstringyesHash of inference input
output_valueanyyesInference output value
verifiedbooleanyesProof verified
timestampstringyesISO timestamp
proof_txstringnoStarknet tx hash
descriptionstringnoHuman-readable description
query_giza_proofsboth

Query archived Giza zkML proofs with filters.

ParameterTypeRequiredDescription
model_idstringnoFilter by model
verifiedbooleannoFilter by verification
limitnumbernoMax results
link_proof_to_entryboth

Link a Giza proof entry to another knowledge entry.

ParameterTypeRequiredDescription
proof_entry_idstringyesArchived proof UUID
target_entry_idstringyesTarget entry UUID
edge_typestringnovalidates (default), derives_from, related_to
get_proof_chainboth

Get the full proof chain for an entry — retrieval proofs, anchoring history, and verification status.

ParameterTypeRequiredDescription
entry_idstringyesEntry UUID to get proof chain for

Sync

resolve_conflictboth

Resolve a sync conflict between local and cloud versions of an entry.

ParameterTypeRequiredDescription
conflict_idstringyesConflict ID to resolve
resolutionstringyeskeep_local, keep_cloud, or keep_both

Cognition (V4.1)

run_proactive_cognitioncloud

Trigger foresight inference + dialectical synthesis (budget-capped LLM, admin only).

ParameterTypeRequiredDescription
forcebooleannoOverride budget cap (default false)
get_proactive_statusboth

Monitor proactive cognition — last runs, foresight edges, dialectical syntheses, LLM budget.

No parameters

get_dialectical_synthesesboth

List dialectical synthesis entries with promotion rate and survival metrics.

ParameterTypeRequiredDescription
limitnumbernoMax results (default 10)
statusstringnoFilter by lifecycle status (review, active, promoted)
list_contradictionsboth

List contradictions between knowledge entries with status and type filters.

ParameterTypeRequiredDescription
statusstringnoFilter: pending, resolved, dismissed
typestringnoFilter: factual, opinion, hypothesis
limitnumbernoMax results (default 20)
get_contradictionboth

Full contradiction detail — both entries, evidence passages, resolution history.

ParameterTypeRequiredDescription
idstringyesContradiction UUID
resolve_contradictionboth

Resolve a contradiction with a verdict (CONTRADICTORY, COMPLEMENTARY, REDUNDANT, ORTHOGONAL).

ParameterTypeRequiredDescription
idstringyesContradiction UUID
verdictstringyesCONTRADICTORY, COMPLEMENTARY, REDUNDANT, or ORTHOGONAL
rationalestringyesExplanation for the verdict
get_spreading_activationboth

Run spreading activation from seed entries through the knowledge graph (Collins & Loftus 1975).

ParameterTypeRequiredDescription
seed_idsstring[]yesSeed entry UUIDs (1-5)
max_hopsnumbernoMax propagation hops (default 3, max 5)
min_activationnumbernoMinimum activation threshold (default 0.1)
decaynumbernoDecay factor per hop (default 0.5)
find_analoguesboth

Find structural analogues — entries in different domains with similar graph topology (Gentner 1983).

ParameterTypeRequiredDescription
entry_idstringyesSource entry UUID
limitnumbernoMax analogues (default 5)
min_similaritynumbernoMinimum structural similarity (default 0.3)
submit_feedbackboth

Record explicit feedback on a knowledge entry — upvote, downvote, citation, or correction.

ParameterTypeRequiredDescription
entry_idstringyesEntry UUID
signalstringyesupvote, downvote, citation, or correction
contextstringnoAdditional context for the feedback
correction_contentstringnoCorrected content (when signal=correction)
get_feedback_summaryboth

Feedback counts, net signal, and recent events for an entry.

ParameterTypeRequiredDescription
entry_idstringyesEntry UUID

Summary

38
Total tools
32
Both modes
6
Cloud only
8
Categories
ESC
Navigation
Admin
Docs
↑↓NavigateSelectescClose
MCP Tools Reference — Brain Protocol | Brain Protocol