Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 85
  • 14 stars
  • 3.2k a week
  • MIT
  • Updated

Install Nano Brain

Built from the published package, never by AI.

claude mcp add nano-brain -- npx -y @nano-step/nano-brain

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Nano Brain in Claude Code

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 →

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.

Nano Brain Install

Add to stack

Loading.