← Back to Docs
Quickstart Guide
From zero to your first knowledge entry in 5 minutes.
1
Install the MCP server
Brain Protocol runs as an MCP server. Install it globally or use npx.
npx @brain-protocol/mcp --setup claude-desktopSupported targets: claude-desktop,cursor,claude-code,windsurf,snak
2
Choose your mode
Local (SQLite)
Zero config. Data stored in ~/.brain-protocol/brain.db.
{
"mcpServers": {
"brain": {
"command":"npx",
"args": ["@brain-protocol/mcp"]
}
}
}Cloud (PostgreSQL)
Multi-tenant, on-chain proofs, semantic search. Sign in to get an API key.
{
"mcpServers": {
"brain": {
"command":"npx",
"args": ["@brain-protocol/mcp"],
"env": {
"BRAIN_API_URL":"https://brain.api.vauban.tech",
"BRAIN_API_KEY":"brain_your-key"
}
}
}
}3
Archive your first entry
Use the archive_knowledge MCP tool or the SDK.
MCP Tool
// In Claude Desktop, Cursor, or any MCP client:
Use the archive_knowledge tool with:
content:"Brain Protocol supports 38 MCP tools across 7 groups"
category:"documentation"
confidence: 0.95TypeScript SDK
import { BrainClient } from"@brain-protocol/sdk";
const brain = new BrainClient({
baseUrl:"https://brain.api.vauban.tech",
apiKey:"your-api-key",
});
const entry = await brain.knowledge.create({
content:"Brain Protocol supports 38 MCP tools across 7 groups",
category:"documentation",
confidence: 0.95,
});
console.log(entry.id); // UUID4
Query your knowledge
MCP Tool
Use the query_knowledge tool with:
q:"MCP tools"
limit: 5TypeScript SDK
const results = await brain.knowledge.query({
q:"MCP tools",
limit: 5,
});
// results.entries[0].content
//"Brain Protocol supports 38 MCP tools across 7 groups"5
Create relationships
Link entries with typed edges to build a knowledge graph.
const edge = await brain.edges.create({
source_id: entry1.id,
target_id: entry2.id,
edge_type:"derives_from",
confidence: 0.9,
});Edge types: derives_from, validates, extends,conflicts_with, implements, supersedes,tested_by, documented_by, optimizes,related_to
6
Prove on-chain (cloud mode)
Anchor critical knowledge with a Poseidon hash on Starknet. Returns a W3C Verifiable Credential.
const proof = await brain.knowledge.anchor(entry.id);
// proof.tx_hash — Starknet transaction
// proof.content_hash — Poseidon hash
// proof.verified_at — TimestampNext Steps
- Explore the Knowledge Explorer dashboard
- Check the SDK reference on npm for all methods
- Use
record_decisionandget_memory_guidancefor agent decision intelligence - Run
npx @brain-protocol/mcp --checkto verify your setup