Skip to content

feat: add Brain Protocol MCP — persistent memory for Snak agents#1

Open
seritalien wants to merge 1 commit intoKasarLabs:mainfrom
seritalien:feat/brain-protocol-mcp
Open

feat: add Brain Protocol MCP — persistent memory for Snak agents#1
seritalien wants to merge 1 commit intoKasarLabs:mainfrom
seritalien:feat/brain-protocol-mcp

Conversation

@seritalien
Copy link
Copy Markdown

@seritalien seritalien commented Feb 15, 2026

Summary

Add Brain Protocol as an MCP server integration, providing persistent, searchable, graph-connected memory for Snak AI agents.

  • 23 tools including knowledge CRUD, graph traversal, export/import, Starknet proof anchoring, agent intelligence (pattern suggestion, anti-pattern detection, architectural advice), Giza zkML proofs, and usage metering
  • Zero config: `npx @brain-protocol/mcp` — starts with local SQLite, no setup needed
  • Cloud mode: optional sync to Brain Protocol API with on-chain verification via Starknet, with built-in retry + circuit breaker
  • Decision intelligence: suggest patterns, detect anti-patterns, and get architectural advice based on accumulated knowledge

Tools (23)

Category Tools
Knowledge CRUD `archive_knowledge`, `query_knowledge`, `update_knowledge`, `delete_knowledge`
Graph `create_edge`, `traverse_graph`, `get_graph_overview`
Data `export_knowledge`, `import_knowledge`
Starknet `anchor_to_l3`, `prove_knowledge`
Agents `get_agent_stats`, `log_agent_task`
Decision Intelligence `suggest_patterns`, `detect_antipatterns`, `architectural_advice`
Giza zkML `archive_giza_proof`, `query_giza_proofs`, `link_proof_to_entry`
Metering `get_usage`
System `get_brain_status`, `list_categories`, `get_entry_detail`

Files added

File Purpose
`examples/brain_mcp.json` Local mode config (zero dependencies)
`examples/brain_cloud_mcp.json` Cloud mode with API key
`examples/brain_example.ts` Full example: archive, query, stats
`README.md` Added Brain Protocol section to examples list

Why this matters

Brain Protocol closes the Trust Triangle for Starknet AI:

  • Snak (Execution) — the agent acts
  • Brain Protocol (Memory) — the agent remembers with cryptographic proof
  • Giza (Verification) — the agent proves its inference

Links

Test plan

  • Verify `brain_mcp.json` is valid JSON
  • Verify `brain_cloud_mcp.json` is valid JSON
  • Run `npx @brain-protocol/mcp --check` confirms server starts
  • Run `brain_example.ts` successfully connects and archives knowledge

Add Brain Protocol as an MCP server for persistent, searchable,
graph-connected agent memory with optional Starknet proof anchoring.

- brain_mcp.json: local mode config (zero dependencies, SQLite)
- brain_cloud_mcp.json: cloud mode with API key auth
- brain_example.ts: full example with archive, query, and stats
- README: add Brain Protocol section to examples list

Package: https://www.npmjs.com/package/@brain-protocol/mcp
Repo: https://github.com/seritalien/brain-protocol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant