Nano Brain
MCP server by nano-step Verified · npm:@nano-step
nano-brain gives AI coding agents persistent memory and code intelligence over MCP. It suits developers who want agents to recall past sessions and check the impact of a change before editing. It is self-hosted, using a Go binary and PostgreSQL.
Install Nano Brain
Built from the published package, never by AI.
claude mcp add nano-brain -- npx -y @nano-step/nano-brainRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"nano-brain": {
"args": [
"-y",
"@nano-step/nano-brain"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"nano-brain": {
"args": [
"-y",
"@nano-step/nano-brain"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"nano-brain": {
"args": [
"-y",
"@nano-step/nano-brain"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add nano-brain -- npx -y @nano-step/nano-brain{
"mcpServers": {
"nano-brain": {
"args": [
"-y",
"@nano-step/nano-brain"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add nano-brain npx -y @nano-step/nano-brainGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the nano-brain block.
About
nano-brain is an MCP server that gives AI coding agents persistent memory and code intelligence. It addresses two problems: agents forget everything when a session ends, and they cannot cheaply trace dependencies or measure the blast radius of a change. It harvests and indexes OpenCode and Claude Code sessions, stores decisions the agent writes, and builds a code graph of symbols, call chains and HTTP routes. Search combines BM25 full-text, pgvector similarity, Reciprocal Rank Fusion and recency decay.
It is self-hosted as a Go binary backed by PostgreSQL and works with any MCP client, such as Claude Code, OpenCode or Cursor. Tools return structured results rather than raw file bytes. The project is built for AI agents to call directly, not for humans to read, and is released under the MIT License.
Written from the project's README and checked against it.
Tools it gives your assistant
memory_queryHybrid BM25, vector, RRF and recency search. Default first tool for broad questions.memory_searchExact keyword search for error strings, identifiers and config keys.memory_writeSaves a decision, lesson or handoff for the next session.memory_wake_upSession-start briefing with recent memories, active collections and stats.memory_symbolsFinds a function, type, interface or const by name without indexing.memory_graphOne-hop neighbors: direct callers, callees, imports and containment.memory_traceLists the downstream call chain from an entry symbol.memory_impactShows reverse blast radius before an edit: who calls or imports this.memory_flowShows an HTTP route's execution flow as Mermaid, sequence or JSON.memory_statusReports server, database and embedding-queue health.
What you need
- PostgreSQL (Docker or a remote URL)
- Go binary from GitHub Releases, or npm
- Ollama or an OpenAI-compatible embeddings provider
- Docker (optional, for PostgreSQL)
Try asking
- Wake up nano-brain and give me a briefing on this workspace.
- Use memory_impact to show who calls the login function before I edit it.
- Save this decision about the database migration with memory_write.
Good to know
- Self-hosted, so it needs a running PostgreSQL database.
- Benchmark results are the author's own tests on 60 queries across three workspaces.
- The workspace value must be a name or full hash, not "all".
Security check
C- Downloads a script from the internet and runs itIn
README.md:curl -fsSL https://raw.githubusercontent.com/nano-step/nano-brain/master/install.sh | bash - Runs a script automatically when the package is installedIn
package.json:"postinstall":
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Nano Brain
All alternatives →Connects a Zotero research library to AI assistants such as Claude and ChatGPT through the Model Context Protocol. It lets the assistant search, read, annotate and add papers, in local mode or through the web API. Built for researchers who want their references available in chat.
AgentDB is a vector memory database for AI agents. It stores embeddings, indexes and learning state in one file and exposes 41 MCP tools to clients such as Claude Code, Cursor and Cline.
Genkitx MCP is listed as a Genkit plugin for Model Context Protocol interoperability. The source is the main Genkit framework README and does not describe this plugin, so its features cannot be confirmed.
QMD is an on-device search engine for markdown notes, meeting transcripts and documentation. It combines BM25 keyword search, vector search and LLM reranking, and exposes an MCP server for AI assistants.
RuVector is a Rust native vector database that gives AI agents persistent memory and local semantic retrieval. Its npm package includes an MCP server for MCP compatible clients, and it suits developers building agent memory in Node.js, Python, or Rust.
Gives AI coding agents persistent memory, so each new session starts where the last one left off. Works with Claude Code, Codex, Cursor, OpenCode and 11 more agents.
Compare with Zotero MCP, Agentdb or Genkitx MCP
Nano Brain: common questions
What does nano-brain store?
It harvests and indexes OpenCode and Claude Code sessions and stores decisions, lessons and handoffs that agents write. It also builds a code graph of symbols, calls and routes.
Which AI clients does nano-brain work with?
The source says it works with any MCP client and names Claude Code, OpenCode and Cursor as examples.
Does nano-brain send code to a hosted service?
The source describes it as self-hosted, running as a Go binary with PostgreSQL. It uses Ollama by default for embeddings, or any OpenAI-compatible embeddings provider.
How do I install Nano Brain?
In Claude Code run claude mcp add nano-brain -- npx -y @nano-step/nano-brain. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Nano Brain the official server?
Nano Brain is published by npm:@nano-step from its verified domain in the official MCP Registry.
Is Nano Brain free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Nano Brain safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality C. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.
What are alternatives to Nano Brain?
Similar MCP servers: Zotero MCP, Agentdb, Genkitx MCP, Qmd.
Does Nano Brain work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
