# brain-core

> brain-core is an open-source MCP server for knowledge and memory. Local memory for a Claude Code agent: five tools over a markdown vault on your disk. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** macOS, Linux, Windows, CLI, Self-hosted
- **Repository:** https://github.com/xy-claude/brain-core
- **MCP Registry name:** io.github.xy-claude/brain-core
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-23

## About

Installing brain-core scaffolds a whole agent folder rather than just a server. It writes a CLAUDE.md with your names, five rule files, three skills, four hooks, an .mcp.json and an empty vault. The hooks include a safety block, a brief injected at session start, capture of what you said, and recall of past fixes when a command fails.

The server exposes exactly five tools. Sessions open with brain_session('start'), which returns the day's brief, state and recalls for top missions, and close with an end call that archives the day. Facts go in through brain_remember, written to the vault, then SQLite, then optionally Hindsight. When a saved fact changes, the old line stays and is marked superseded.

Recall is keyword search, not vector search: a SQLite FTS5 index ranked by bm25 and recency. A weak result is reported as weak_match so the agent can retry in other words and teach the memory the missed question. The README says it is for one person on their own computer, not a hosted or team product.

## Features

- **Five-tool surface:** Keeps the tool set small so the agent can choose between tools without confusion.
- **Markdown vault:** Stores memory as readable files in a folder you own, indexed by SQLite.
- **Session briefs:** Starts each session with yesterday's brief, decisions, changed facts and corrections.
- **Weak-match reporting:** Flags low-confidence searches so the agent retries instead of guessing.
- **Fact change tracking:** Marks a changed fact with a banner and ranks the old value below the new one.
- **Scheduled housekeeping:** Daily and weekly jobs write briefs, back up Hindsight and archive older sessions.
- **Optional vector store:** Can also query Hindsight, a self-hosted vector memory, unless switched off.

## Good for

- Let a coding agent remember project decisions between sessions
- Keep corrections you gave the agent so it stops repeating mistakes
- Recall the fix for an error that happened in an earlier session
- Run several named agents on one machine, each with its own vault
- Audit what the agent remembers by reading markdown files

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add brain-core -- uvx brain-core-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add brain-core -- uvx brain-core-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.brain-core]
command = "uvx"
args = ["brain-core-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user brain-core uvx -- brain-core-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "brain-core": {
      "command": "uvx",
      "args": [
        "brain-core-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 4 tools reads data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `brain_session`: Starts or ends a session, returning the brief or filing the day's archive
- `brain_remember`: Saves a memory to the vault, SQLite and optionally Hindsight
- `brain_recall`: Searches memory and reports weak matches
- `brain_status` (name suggests: reads): Lists questions memory could not answer recently

## FAQ

### Does my memory leave my machine?

The README says memory stays on your disk. What goes out is the LLM calls Hindsight makes (none with --lite), one daily PyPI version check, and pages you ask it to distill.

### Does brain-core use embeddings?

No. Recall uses a SQLite FTS5 keyword index ranked by bm25 and recency; Hindsight is the optional vector layer.

### Do I need an API key?

No API key is needed for installation, according to the README.

### Is brain-core meant for teams?

No. It is aimed at one person running one or more agents on their own computer.

### Is brain-core free?

Yes. brain-core is open source, so you can use and self-host it for free.

### How do I add brain-core to Claude Code?

Run this command in your terminal: claude mcp add brain-core -- uvx brain-core-mcp

### What are the best alternatives to brain-core?

The closest alternatives to brain-core are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and Myco: Agent-First Cognitive Substrate.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [Myco: Agent-First Cognitive Substrate](https://ai-powered.com/mcp/myco-agent-first-cognitive-substrate): Myco: Agent-First Cognitive Substrate is an open-source MCP server for knowledge and memory.
- [Source Library](https://ai-powered.com/mcp/source-library): Source Library is an open-source MCP server for knowledge and memory.
- [keepplain-plugin](https://ai-powered.com/mcp/keepplain-plugin): keepplain-plugin is a freemium MCP server for knowledge and memory.
- [Second Brain](https://ai-powered.com/mcp/second-brain-2): Second Brain is a freemium MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/brain-core
