Myco Brain
Shared, source-backed memory for AI agents on your own Postgres, with client boundaries
Myco Brain is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted
- Runs
- Locally
- What it can do
- Can change data (1 tool)
- Version
- 1.3.0
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add myco-brain -- npx -y @mycobrain/mcp-serverAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"myco-brain": {
"command": "npx",
"args": [
"-y",
"@mycobrain/mcp-server"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"myco-brain": {
"command": "npx",
"args": [
"-y",
"@mycobrain/mcp-server"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"myco-brain": {
"command": "npx",
"args": [
"-y",
"@mycobrain/mcp-server"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"myco-brain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mycobrain/mcp-server"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add myco-brain -- npx -y @mycobrain/mcp-serverOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.myco-brain]
command = "npx"
args = ["-y", "@mycobrain/mcp-server"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"myco-brain": {
"command": "npx",
"args": [
"-y",
"@mycobrain/mcp-server"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }Or run: gemini mcp add -s user myco-brain npx -- -y @mycobrain/mcp-server
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "myco-brain": { "command": "npx", "args": [ "-y", "@mycobrain/mcp-server" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Myco Brain
Myco Brain starts from a complaint about agent memory: letting a model maintain its own notes tends to produce duplicates and untraceable summaries. Here the model proposes and fixed rules decide what becomes a fact. Every fact records its source, and a changed fact supersedes the old one while the history stays viewable.
It targets people handling several clients, such as agencies. Clients are split into houses enforced in the database, and a contractor's agent can be bound to one client only, with a separate credential per tool so one can be revoked alone. In Claude Code and Codex, hooks recall relevant facts at session start and before prompts; Cursor, Windsurf and Claude Desktop get an MCP server with brain_memory_context and brain_memory_write.
An optional Docker document engine ingests documents, repos and chat exports, builds a knowledge graph and answers with cited sources through 13 MCP tools. Storage is your own Postgres with pgvector and Node.js 20 or later is required. Embeddings run locally with Ollama when available.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 3 tools changes data; 2 names don't say.
From the server's own tool labels and tool names; not verified by us.
- brain_memory_context
- Recalls relevant facts for a task.
- brain_memory_writeName suggests: changes
- Records a fact the agent learned.
- brain_why
- Shows the sources behind a fact.
What it does
- Source-backed facts
- Each fact records where it came from, traceable with brain_why.
- Superseding history
- Changed facts replace old ones while keeping a history.
- Client houses
- Database-enforced separation between clients.
- Per-tool credentials
- See which tool wrote a fact and revoke one tool.
- Automatic recall
- Hooks in Claude Code and Codex recall facts at session start.
- Optional document engine
- Ingest repos and documents with a knowledge graph.
Good for
- Give agents shared memory across sessions and tools
- Keep each agency client's facts isolated
- Trace an answer back to the document it came from
- Import chat history so an assistant knows you from day one
Pricing
Open source
Free, Apache-2.0; runs on your own Postgres
Myco Brain FAQ
Where is memory stored?
In your own Postgres with pgvector, local or any connection string such as Supabase, Neon or RDS.
Does Myco Brain need API keys?
No. The README says the worker uses your signed-in Claude or Codex CLI, and local Ollama can supply embeddings.
Is anything merged automatically?
The optional Dream feature is off by default, and nothing changes until you approve a proposal.
What licence?
Apache-2.0, per the README.
Is Myco Brain free?
Yes. Myco Brain is open source, so you can use and self-host it for free.
How do I add Myco Brain to Claude Code?
Run this command in your terminal: claude mcp add myco-brain -- npx -y @mycobrain/mcp-server
What are the best alternatives to Myco Brain?
The closest alternatives to Myco Brain 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.



