local-brain-mcp
Local Brain MCP is a local-first MCP server that gives AI coding agents persistent shared memory of git history and engineering decisions, with zero cloud dependencies.
Search memory semantically: Use
brain_recallto find relevant lessons, bug fixes, architecture decisions, and conventions using natural-language queries with ranking, filtering, and token caps.Store new knowledge: Use
brain_learnto save durable lessons, decisions, conventions, and root causes with categories, confidence, importance, and supersession tracking.Validate memories: Use
brain_validateto confirm a memory was helpful, incrementing its validation count and boosting retrieval confidence.Inspect system state: Use
brain_statusto view memory statistics, agent breakdown, validation health, and database storage info.Trace file history: Use
brain_traceto see all memories associated with a specific file across all agents, in chronological order.Remove or deprecate memories: Use
brain_forgetto delete or deprecate memories by ID, file path, or query.Clean up stale data: Use
brain_pruneto purge stale or deprecated memories after major refactors, optionally running git-diff invalidation.Manage via CLI: Run commands like
init,ingest,query,learn,status,doctor, and more directly from the terminal.Share memory across agents: Claude Code, Cursor, Copilot, Windsurf, Zed, and others can share the same durable project memory while keeping data 100% local and offline.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-brain-mcpwhat recurring bugs have we fixed in the auth module?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Shared, local-first memory for AI coding agents.
Local Brain is a Model Context Protocol (MCP) server that indexes your repository's Git history and engineering decisions into an embedded SQLite vector database. Every recall runs in ~3 ms (p50, local benchmark). No network calls. No cloud dependencies.
Claude Code ─┐
Cursor ─┼── Local Brain ── Shared Project Memory
Antigravity ─┤
Copilot ─┘
Windsurf ───┘
Zed ─┘When multiple coding assistants collaborate on the same repository, they share, validate, and evolve the same durable engineering memory — 100% offline, zero cloud egress, zero external database dependencies.
Problem
Standard AI memory tools have fundamental limitations:
Network latency: 150-800ms per recall when memory lives on a remote server
Privacy: Source code sent to foreign servers
Context bloat: Every session floods the context window
Agent isolation: Claude and Cursor operate in silos, each starting from zero
Memory decay: Outdated context from refactored code is never invalidated
Noise: WIP commits and typos pollute the knowledge base
Related MCP server: Heimdall MCP Server
Solution
Local Brain MCP addresses each limitation:
Problem | How Local Brain MCP solves it |
150-800ms network latency per recall | ~3 ms p50 (5.7 ms p95, local 1k-memory benchmark) |
Source code sent to foreign servers | 100% on-device, zero egress, total privacy |
Context bloat on every session | Hard 250-token budget cap per recall |
Agent isolation (Claude vs Cursor silos) | Shared multi-agent memory with provenance |
Outdated context from refactored code | Git-diff invalidation marks old memories STALE |
Conflicting or outdated guidelines | Contradiction detection with 0.60x ranking penalty |
WIP/typo commits pollute memory | Quality filter keeps only high-signal lessons |
Monorepo noise across packages | Path-scoped queries, per-package namespacing |
Duplicate memories waste tokens | Smart deduplication and merge on ingest |
Decisions lost over time | Full memory lineage and trace across agents |
Installation
Requires Node.js >= 22.0.0.
# Install globally from npm
npm install -g local-brain-mcp
# Verify
local-brain --versionThen continue with Quick Start below (local-brain init -> ingest -> status).
Quick Start
# 1. Navigate to your Git repository
cd /path/to/your-project
# 2. Auto-detect installed AI editors and link MCP configuration
local-brain init
# 3. Ingest your Git history into the local brain database
local-brain ingest
# 4. Check multi-agent memory statistics
local-brain status
# 5. Start collaborating with Claude Code, Cursor, Antigravity, Copilot, Windsurf, or ZedCLI Experience
╭────────────────────────────────────────────────────╮
│ │
│ ╭────────────╮ │
│ │ ● ● │ │
│ │ >_ │ │
│ │ ● ● ● │ │
│ ╰────────────╯ │
│ │
│ Local Brain MCP │
│ Shared Memory for AI Coding Agents │
│ │
╰────────────────────────────────────────────────────╯
✓ Local Brain initialized successfully
PROJECT retail-gem-quest
MEMORY STORE .git/brain.db
STATUS ● ACTIVE
VERSION 1.3.1
MEMORIES 0
LESSONS 0
AGENTS 0
Ready for AI memory.MCP Tools Reference (7 Tools)
All tools carry complete MCP annotations (readOnlyHint, destructiveHint, idempotentHint) for full protocol compliance.
1. brain_recall
Semantically search your codebase memory across all agents with multi-factor ranking and strict token capping.
Annotations:
readOnly: true,idempotent: trueFormula: Semantic similarity (45%) + File scope (20%) + Recency decay (10%) + Confidence (10%) + Importance (5%) + Cross-agent validation (5%) + Quality score (5%) x Status multiplier x Contradiction penalty.
Parameters:
Parameter | Type | Required | Description |
|
| Yes | Natural language search query (e.g. |
|
| No | Repo-relative file path to focus search scope (e.g. |
|
| No | Maximum memories to return (1-10, default: |
|
| No | Filter by category: |
|
| No | Minimum confidence threshold ( |
|
| No | Include stale and deprecated memories (default: |
|
| No | Optional: restrict to memories created by a specific agent (e.g. |
2. brain_learn
Store a durable lesson, architecture decision, bug root-cause, or team convention with automatic quality filtering, multi-agent attribution, and contradiction checks.
Annotations:
readOnly: false,idempotent: false
Parameters:
Parameter | Type | Required | Description |
|
| Yes | Actionable engineering rule or decision. |
|
| No |
|
|
| No | Primary file this lesson applies to. |
|
| No | Array of related file paths. |
|
| No | Confidence score |
|
| No | Importance multiplier |
|
| No |
|
|
| No | Creating agent identifier (auto-detected if omitted). |
|
| No | ID of older memory replaced by this lesson. |
3. brain_validate
Confirm that an existing memory was helpful and correct during the current coding session. Increments validation count, records the validating agent, and boosts retrieval confidence.
Annotations:
readOnly: false,idempotent: false
Parameters:
Parameter | Type | Required | Description |
|
| Yes | Memory ID to validate. |
|
| No | Validating agent identifier (auto-detected if omitted). |
4. brain_status
Returns brain health, storage diagnostics, multi-agent breakdown, and validation metrics.
Annotations:
readOnly: true,idempotent: true
5. brain_trace
Show complete chronological memory history and agent attribution for a specific file.
Annotations:
readOnly: true,idempotent: true
6. brain_forget
Deprecate or permanently purge specific memories by ID, path, or text query.
Annotations:
readOnly: false,destructive: true,idempotent: true
7. brain_prune
Clean up stale or deprecated memories from the brain after major refactors.
Annotations:
readOnly: false,destructive: true
CLI Commands
local-brain init # Auto-detect AI editors and install MCP configs
local-brain ingest [--commits 500] # Ingest repository git history
local-brain query "<text>" # Test semantic recall directly in terminal
local-brain learn "<lesson>" # Store a manual lesson with optional --agent flag
local-brain validate <id> # Validate and reinforce a memory ID
local-brain memories [--agent <ag>] # List stored memories with filters
local-brain trace <filePath> # Show chronological history for a file
local-brain status # Diagnostics and multi-agent breakdown
local-brain doctor # System and editor configuration checker
local-brain prune [--status stale] # Remove stale or deprecated records
local-brain forget [--id <id>] # Delete or deprecate memories
local-brain --no-color # Disable color output (global option)Multi-Agent Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Claude Code │ │ Cursor │ │ Antigravity │ │ Copilot │
└───────┬──────┘ └───────┬──────┘ └───────┬──────┘ └───────┬──────┘
│ │ │ │
└──────────────────┼──────────────────┼──────────────────┘
▼
┌─────────────────────────┐
│ Local Brain MCP │
│ (stdio / WAL SQLite) │
└────────────┬────────────┘
▼
┌───────────────────────────────────┐
│ Shared Memory DB │
│ • Multi-factor deterministic rank│
│ • Cross-agent validation boost │
│ • Contradiction detection & penalty │
│ • Project & agent provenance │
└───────────────────────────────────┘For detailed multi-agent documentation, see docs/multi-agent.md and docs/architecture.md.
Memory is local. Vercel does not host the local memory database. Each project's memory is scoped to its repository root under .git/brain.db (or ~/.config/local-brain/brain.db when no repository root applies).
Agent identity is provenance. Agents do not automatically share context unless Local Brain tools (brain_learn, brain_recall, brain_validate) are invoked via MCP.
Supported agents: Claude Code, Cursor, Antigravity, GitHub Copilot, Windsurf, Zed. local-brain init auto-detects all six and writes their MCP configuration. Agents not found on the system are skipped.
Node Version Requirements
Local Brain MCP requires Node.js >= 22.0.0 (matching the better-sqlite3 engine requirement). CI tests Node 22.x and 24.x.
Testing & Evaluation
npm run test # Run complete test suite (unit, integration, multi-agent, concurrency)
npm run typecheck # Validate TypeScript types without emit
npm run benchmark # Measure retrieval latency and SQLite WAL throughput
npm run eval # Evaluate MRR@5 and Precision@3 against benchmark datasetTroubleshooting
Stuck? See docs/troubleshooting.md for installation,
editor integration, recall, and git-hook fixes — or run with DEBUG=local-brain:*
for namespaced debug output.
Contributing
Local Brain MCP is published under the permissive MIT License. Contributions, issue reports, and integrations are welcome. See CONTRIBUTING.md for the dev setup and PR guidelines.
License
MIT © cosmiccoder200x-sys
Available Tools
7 toolsbrain_forgetADestructiveIdempotent
Remove or deprecate specific memories from Local Brain. Can target a memory by ID, file path, or search query. By default deprecates the memory to maintain audit trail; pass hard_delete: true to purge.
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Exact memory ID to forget. | |
| query | No | Forget memories matching this text/topic. | |
| file_path | No | Forget all memories associated with this file path. | |
| memory_id | No | Alias for id. | |
| hard_delete | No | If true, permanently deletes records from SQLite. Default is false (marks deprecated). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite annotations already marking destructiveHint=true, the description adds crucial nuance: it defaults to deprecation to preserve an audit trail, and only purges records when hard_delete=true. This meaningfully explains what gets changed or destroyed and under what condition.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no filler. The core action and target scope are front-loaded, followed by targeting modes and the key behavioral caveat about hard_delete. Every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive tool with 5 parameters and no output schema, the description covers the essential operational details: what it removes, how to target memories, the default non-destructive behavior, and how to override it. The audit-trail rationale also helps the agent anticipate consequences. No critical invocation information is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds value by grouping the parameters into three targeting modes (ID, file_path, query), implying they are alternative ways to select memories, and by clarifying the default soft-delete behavior versus hard_delete=true. This exceeds the schema's per-parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verbs ('Remove or deprecate') with a clear resource ('specific memories from Local Brain') and immediately explains the targeting options (ID, file path, search query). This distinguishes it from sibling tools like brain_prune by emphasizing targeted, individual-memory operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly communicates when to use this tool: to forget specific memories by ID, path, or query. It doesn't explicitly contrast with brain_prune or list exclusions, so it stops short of a full when-to-use/when-not-to-use guide, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_learnA
Store a new durable lesson, architecture decision, bug root-cause, or team convention. Includes automatic multi-agent attribution, quality evaluation, deduplication, contradiction detection, and supersession tracking. Examples: "Never use RS256 in dev", "JWT refresh token expires in 7d; rotate on each use".
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Optional: agent name creating this memory (e.g. "claude-code", "cursor", "antigravity"). Auto-detected if omitted. | |
| files | No | Optional: array of related files. | |
| lesson | Yes | The lesson, rule, or decision to remember. Be specific and actionable. | |
| category | No | Category for this memory. | manual |
| file_path | No | Optional: the primary file this lesson applies to. | |
| confidence | No | Confidence rating from 0.0 to 1.0 (default: 1.0). | |
| importance | No | Importance multiplier from 0.1 to 2.0 (default: 1.0). | |
| supersedes_id | No | Optional: ID of an older memory that is superseded/replaced by this new lesson. | |
| importance_level | No | Optional: importance level (default: automatically detected from content). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (which only show non-read-only, non-idempotent, non-destructive), the description discloses automatic behaviors: 'multi-agent attribution, quality evaluation, deduplication, contradiction detection, and supersession tracking.' This tells the agent that the store is not a simple write and that the system will process, reconcile, and potentially supersede existing memories. This is exactly the kind of behavioral context the description should add.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured: one sentence defines the tool's scope, one sentence lists its automatic behaviors, and two examples illustrate ideal input. Every sentence earns its place, and the most important information comes first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 9 parameters but only 1 required, full schema coverage, and no output schema, the description covers the core write intent and automatic post-processing behaviors well. It doesn't describe return values or failure modes, but the absence of an output schema lowers the burden. The main gap is not explaining how this relates to sibling tools like brain_validate or brain_trace, but the description is otherwise sufficient for correct use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers all parameters at 100% with descriptions, so the baseline is 3. The description adds value by showing examples of high-quality lesson strings ('Never use RS256 in dev', 'JWT refresh token expires in 7d; rotate on each use') and advising 'Be specific and actionable,' which clarifies the expected semantic quality of the required lesson parameter. This pushes it above baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description immediately states a specific action and resource: 'Store a new durable lesson, architecture decision, bug root-cause, or team convention.' It clearly enumerates the kinds of content accepted and gives concrete examples, making the tool's role unmistakable and naturally distinct from siblings like brain_recall, brain_prune, and brain_forget.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: use this tool when you want to persist a lesson or decision. It lists valid content categories and gives examples of good lessons, which helps the agent judge appropriateness. It does not explicitly name alternatives or state when not to use the tool, so it falls slightly short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_pruneADestructive
Clean up stale or deprecated memories from the brain. Run this after major refactors to prevent outdated context from polluting recalls. Optionally runs the full git-diff invalidation pass to detect modified/deleted files.
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Which memories to remove. | stale |
| run_invalidation | No | If true, run the full git-based stale detection pass first. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the mutating nature by saying 'clean up' and 'remove,' matching the destructiveHint annotation. It also adds useful context beyond the annotations by explaining the optional git-diff invalidation pass that detects modified/deleted files.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: it states the core purpose in the first sentence and provides the key usage trigger in the second. Every sentence earns its place with no redundant detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 optional parameters, no output schema) and the destructiveHint annotation, the description is complete enough for an agent to invoke it correctly. It covers what is removed, when to run it, and the optional invalidation behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters. The description adds modest context by elaborating on the invalidation pass as git-diff based, but it does not substantially expand parameter meaning beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb ('clean up'), resource ('memories'), and scope ('stale or deprecated'). It does not explicitly differentiate from sibling brain_forget, but the stale/deprecated framing and git invalidation context make the role reasonably distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit timing guidance: 'Run this after major refactors.' It explains the benefit of preventing outdated context from polluting recalls, but it does not explicitly state when to prefer brain_forget or other alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_recallARead-onlyIdempotent
Semantically search your local codebase memory across all agents. Returns the most relevant lessons, bug fixes, architecture decisions, and conventions from your git history and AI sessions — filtered to current file and package scope. Results are ranked deterministically with validation boost and contradiction penalties, token-capped to stay within 250 tokens.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | What to search for. Plain English, e.g. "JWT auth bug" or "database connection pooling". | |
| category | No | Optional: filter by memory category. | |
| file_path | No | Optional: current file path (repo-relative). Narrows search to relevant file and package scope. | |
| max_items | No | Maximum memories to return (default: 5, max: 10). | |
| agent_filter | No | Optional: filter memories created by a specific agent (e.g. "claude-code", "cursor", "antigravity"). | |
| min_confidence | No | Optional: minimum confidence threshold (0.0 to 1.0, default: 0.0). | |
| include_deprecated | No | Optional: include stale and deprecated memories (default: false). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide read-only, idempotent, and non-destructive hints, so the description correctly avoids repeating them. It adds meaningful behavioral detail beyond those hints: deterministic ranking, validation boost and contradiction penalties, token-capped output, and file/package scoping.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: the first sentence states the core purpose, and the second sentence adds ranking and output constraints. There is no filler, repetition of schema details, or redundant annotation restatement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with full schema coverage and strong safety annotations, the description covers purpose, memory sources, scoping, ranking behavior, and output size limit. It does not describe the exact return shape, but the absence of an output schema is partially mitigated by the explicit statement of what is returned and the token cap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so every parameter already has a meaningful description, default, or enum. The description's mention of 'current file and package scope' reinforces the file_path parameter, but it does not add significant new semantics beyond what the schema already documents.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies an action ('semantically search') and a resource ('local codebase memory'), and it specifies the kinds of content returned: lessons, bug fixes, architecture decisions, and conventions. It distinguishes itself from write/delete siblings like brain_learn and brain_forget, but it does not explicitly contrast with potentially similar siblings like brain_trace or brain_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context for when the tool applies: retrieving relevant memories across agents, from git history and AI sessions, scoped to the current file/package. It does not explicitly name alternatives or provide when-not-to-use conditions, but the retrieval intent is clear enough to guide selection among the memory-management siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_statusARead-onlyIdempotent
Get system diagnostics, memory statistics, multi-agent breakdown, and validation health. Returns total memory count, breakdown by agent, validation counts, contradiction flags, and database storage path.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so safety is clear. The description adds value by disclosing exactly what information is returned, including database storage path, contradicting none of the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that front-loads the core purpose ('Get system diagnostics...') and then efficiently lists the specific return categories. Every element earns its place, with no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, parameterless, read-only status tool with no output schema, the description adequately covers what the agent needs to know: the diagnostic scope and each returned data category. The annotations cover side-effect safety, so nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema properties are empty, so schema description coverage is effectively 100%. Per the rubric, a zero-parameter tool receives a baseline of 4; the description appropriately adds no parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Get') and a clear resource ('system diagnostics, memory statistics, multi-agent breakdown, and validation health'). It also enumerates concrete return contents, making the tool's purpose unmistakable and distinct from the action-oriented sibling names like brain_prune, brain_learn, and brain_validate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: whenever an agent needs system-level diagnostics or memory/validation health. However, it does not explicitly contrast this with brain_validate, which could plausibly overlap with 'validation counts' and 'contradiction flags.' No exclusions or alternative routing are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_traceARead-onlyIdempotent
Show all memory entries associated with a specific file across all agents. Returns the full fix history, architecture decisions, past bugs, and agent attribution for that file in chronological order. Includes confidence and status flags.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Repo-relative file path to trace (e.g. "src/auth/jwt.ts"). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate a read-only, idempotent, non-destructive operation. The description adds meaningful behavioral context: it returns results in chronological order and includes confidence and status flags, and it emphasizes that results span all agents. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no fluff. The primary action and scope appear first, followed by a clear summary of what is returned and in what order. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter read tool with full schema coverage and no output schema, the description covers the key return contents, ordering, and scope. Minor gaps like pagination or a note on how far back the history reaches are not critical for this simple operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema fully documents the only parameter, file_path, including an example format. The description does not need to add much, and it does not add new semantic detail beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb ('Show'), a specific resource ('memory entries associated with a specific file'), and a scope ('across all agents'). It conveys what the tool does and what distinguishes it, though it does not explicitly name a sibling alternative to differentiate from.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: when you need the full memory/history for a particular file, including fixes, architecture decisions, bugs, and agent attribution. It does not explicitly state when not to use it or which sibling tool to prefer instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_validateA
Validate that an existing memory was helpful and correct in the current session. Increments the memory validation count, records the validating agent, and boosts confidence.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The memory ID to validate. | |
| agent | No | Optional: validating agent identifier. Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations show this is a mutating, non-idempotent operation, and the description properly discloses the side effects: incrementing the validation count, recording the validating agent, and boosting confidence. This goes beyond the annotations and gives an agent a clear picture of the mutation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no filler. It front-loads the primary action and then lists the side effects succinctly, making efficient use of the space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter mutation with no output schema, the description covers the main behavior and side effects sufficiently. It leaves out explicit alternative routing and edge-case behavior, but those are minor given the tool's low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes both parameters fully (id and optional agent), with 100% schema description coverage. The description adds light context by mapping 'records the validating agent' to the agent parameter, but it does not substantially enrich parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the action ('Validate'), the resource ('an existing memory'), and the context ('current session'). It also lists concrete effects, making the tool's role distinct among siblings, though it does not explicitly name any sibling to differentiate from.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for confirming that a memory was helpful, but it provides no explicit guidance on when to use this tool versus brain_recall, brain_learn, brain_forget, or other siblings. No alternatives or exclusion conditions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.3.1- Changed
brain_forget1 field changed- added
Input schema / properties / memory_idAdded value: +{ + "description": "Alias for id.", + "type": "number" +}
- Changed
brain_learn2 fields changed- added
Input schema / properties / agentAdded value: +{ + "description": "Optional: agent name creating this memory (e.g. \"claude-code\", \"cursor\", \"antigravity\"). Auto-detected if omitted.", + "type": "string" +} - added
Input schema / properties / importance_levelAdded value: +{ + "description": "Optional: importance level (default: automatically detected from content).", + "enum": [ + "low", + "medium", + "high", + "critical" + ], + "type": "string" +}
- Changed
brain_recall1 field changed- added
Input schema / properties / agent_filterAdded value: +{ + "description": "Optional: filter memories created by a specific agent (e.g. \"claude-code\", \"cursor\", \"antigravity\").", + "type": "string" +}
- Added
brain_validate
6 tool updates
v1.1.0- First observed
brain_forget - First observed
brain_learn - First observed
brain_prune - First observed
brain_recall - First observed
brain_status - First observed
brain_trace
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes: learn, recall, validate, status, and trace are easy to tell apart. However, brain_prune and brain_forget both involve removing memories, and brain_recall and brain_trace both retrieve memories, so an agent could occasionally hesitate between them.
All tool names follow the same brain_ prefix plus a lowercase verb pattern, such as brain_learn, brain_recall, and brain_forget. The naming is highly consistent and predictable.
Seven tools is a well-scoped size for a local memory management server. Each tool covers a meaningful operation without bloat, and the count feels appropriate for the domain.
The tool set covers the core memory lifecycle: create (brain_learn), read (brain_recall, brain_trace, brain_status), validate (brain_validate), and delete/deprecate (brain_forget, brain_prune). There is no direct way to edit an existing memory's content, but forgetting and relearning can work around that gap.
Maintenance
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Your company's brain for AI agents. Cited, permission-aware knowledge across every system.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceProvides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.MIT- AlicenseNot gradedqualityDmaintenanceProvides AI coding assistants with persistent, context-rich memory of a codebase, including documentation and git history, enabling recall across sessions.104Apache 2.0
- AlicenseAqualityBmaintenanceProvides persistent memory and a codebase knowledge graph for AI coding assistants, enabling shared context across multiple tools like Claude, Cursor, and ChatGPT, with significant token reduction.518 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives AI coding assistants persistent project memory and semantic code search, running fully locally with no API keys required.MIT