Membrain
Enables the AI clerk to use NVIDIA NIM for organizing memories, summarizing, and detecting duplicates when configured as the AI provider.
Enables the optional AI clerk to use a local Ollama instance for organizing memories into topics, drafting titles, summarizing selections, and flagging duplicates.
Enables the AI clerk to use OpenAI's cloud models for organizing memories, summarizing, and detecting duplicates when no local Ollama is available.
Click on "Install 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., "@Membrainremember that my favorite editor is neovim"
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.
Membrain
One memory, every AI.
A self-hosted memory ledger you run on your own machine. Your agents share it over MCP.
You write to the ledger from a paper-and-ink web UI. Your agents write to it over MCP: Claude Code, Claude Desktop, Cursor, anything that speaks the protocol. What one remembers, all of them know.
Everything lives in one SQLite file on your disk. No accounts, no cloud, no telemetry. Works fully offline.
Install
Global install is the default — it gives you the membrain command everywhere:
npm install -g membrain-mcp
membrainThat one word brings everything up at once: the web ledger starts on http://127.0.0.1:7777 and
opens in your browser, the MCP server is live at /mcp from the same moment, and the REST API is
up at /api/memories. Keep the terminal open — that process is the server; Ctrl+C stops it and
your memories stay in data/memory.db.
The first run downloads a small local embedding model (about 80 MB) into ./data; after that
everything works offline.
Prefer not to install globally? One-shot from any folder:
npx membrain-mcpRelated MCP server: Cortex
How it fits together
%%{init: {'theme':'base','themeVariables':{
'primaryColor':'#fdfcf7','primaryTextColor':'#1c1917','primaryBorderColor':'#1e3a8a',
'lineColor':'#57534e','fontFamily':'Georgia, serif','fontSize':'14px',
'clusterBkg':'#f4f1e8','clusterBorder':'#b8b09a','edgeLabelBackground':'#fdfcf7'
}}}%%
flowchart LR
subgraph agents ["Your agents"]
CC["Claude Code"]
CD["Claude Desktop"]
CU["Cursor · any MCP client"]
end
YOU(["You · browser"])
CC -- "HTTP /mcp" --> MCP
CU -- "HTTP /mcp" --> MCP
CD -- "stdio" --> MCP
YOU -- "web ledger + REST" --> REST
subgraph membrain ["membrain · one process"]
MCP["MCP server<br/>8 tools"]
REST["REST + web UI"]
CORE["core<br/>chunk · embed · hybrid search"]
LLM["the clerk<br/>Ollama or cloud key"]
MCP --> CORE
REST --> CORE
CORE -.-> LLM
end
CORE --> DB[("memory.db<br/>SQLite + sqlite-vec + FTS5")]
classDef agent fill:#fdfcf7,stroke:#1e3a8a,stroke-width:1.5px,color:#1c1917
classDef human fill:#fdfcf7,stroke:#0f766e,stroke-width:1.5px,color:#1c1917
classDef store fill:#1c1917,stroke:#1c1917,color:#f4f1e8
class CC,CD,CU agent
class YOU human
class DB storeCommand
membrain [options]
--port <n> port, default 7777
--data <dir> data directory, default ./data (holds memory.db + models)
--no-open don't open the browser on start
--stdio run as an MCP stdio server (for clients that spawn the process)
--readonly-skills block writes to agent skill files
--host <ip> bind a non-localhost interface; requires --i-understand-no-authThe whole store is data/memory.db. Copy it and that's a backup. Delete it and it's gone.
Connect your agents
Claude Code, one line:
claude mcp add --transport http membrain http://127.0.0.1:7777/mcpCursor (.cursor/mcp.json) or any Streamable HTTP client:
{ "mcpServers": { "membrain": { "url": "http://127.0.0.1:7777/mcp" } } }Claude Desktop (stdio, spawns its own process against the same data dir):
{
"mcpServers": {
"membrain": {
"command": "membrain",
"args": ["--stdio", "--data", "/path/to/your/data"]
}
}
}Then try it: tell one agent "remember that my favorite editor is neovim", open the ledger, and watch the entry appear stamped with that agent's name. Ask a different agent tomorrow; it knows.
MCP tools
Tool | Does |
| one-call digest of what's known, for session starts |
| store a durable fact |
| store several facts in one call |
| hybrid semantic + keyword search, recency-boosted |
| fetch one memory in full |
| edit a memory |
| remove a memory |
| recent memories |
The ledger
The web UI is a paper-and-ink ledger with a night mode. What it does:
Memories — hybrid search (sqlite-vec + FTS5 with reciprocal rank fusion), ledger, card, and topic views, filters by tag and by writer, multi-select, right-click context menu, and a drawer for reading and editing each entry.
The clerk — a local Ollama (or a cloud model, see below) organizes the store into topics with live progress, drafts titles one entry at a time, summarizes any selection, and flags duplicate entries so you can strike them in one click.
Proposal queue — every change the AI wants to make to a live memory is staged for your review first. Nothing is applied silently.
Reviewed imports — drop a PDF, Markdown, or text file; it's distilled into candidate entries you edit and selectively file. Ollama down? The raw text imports anyway.
Map — an interactive constellation of the people, projects, and tools in your store.
Skills — edit your agents' SKILL.md files (in
~/.claude/skillsand~/.agents/skills) with a markdown preview.Agent import — pull the memory your agents already keep on disk into the ledger, tracked by content hash so nothing imports twice.
Backups — a snapshot on every boot (keeps five), one-click snapshot downloads, portable JSON export and import.
Settings — all of it configurable in the UI, including the AI provider.
The AI
By default the clerk uses a local Ollama if one is running. No GPU, or no Ollama? Open Settings and paste an API key for OpenAI, Anthropic (Claude), OpenRouter, NVIDIA NIM, or any OpenAI-compatible endpoint. There's a test button.
The AI is optional. Memory itself — saving, searching, the MCP tools — runs entirely on the local embedding model and needs nothing.
Security
There is no auth, by design. The default bind is 127.0.0.1 and the docs assume it stays there.
Anyone who can reach the port can read and write your memory, so never expose it on a public
interface. Binding anything else requires an explicit --host <ip> --i-understand-no-auth, and
should only ever point at a private network you trust (Tailscale, WireGuard).
Docker
docker build -t membrain .
docker run -p 127.0.0.1:7777:7777 -v membrain-data:/app/data membrainKeep the port binding on 127.0.0.1. The container boundary is not an auth layer.
Development
npm install
npm run dev # server via tsx
npm test # vitest, 50 tests, no network
npm run build # dist/server + dist/uiArchitecture and working rules live in CLAUDE.md; the product spec in docs/membrain-prd.md;
agent connection details in docs/connect-agents.md.
Built by DevLune
Crafted in the dark. Shipped to the world.
devlune.in · @dev.lune · sidharth@devlune.in
MIT © DevLune
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.11Apache 2.0
- Alicense-qualityDmaintenanceLocal-first AI memory layer with hybrid retrieval and brain-inspired namespaces. Enables agents to save, search, and manage memories directly via MCP tools.1MIT
- Alicense-qualityBmaintenanceZero-knowledge, self-hostable MCP server providing encrypted durable memory for AI agents, with tools to save, recall, search, list, and delete memories.42MIT
- Alicense-qualityBmaintenanceA lightweight, local-first MCP memory server for LLM agents that enables storing, searching, and retrieving agent memories with zero external dependencies.1MIT
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Persistent memory for AI agents. Search, store, and recall across sessions.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SIDDHU123M/membrain-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server