能力标签
🔌
MCP工具

Nano脑

基于 Go · 让 AI 助手直接操作你的系统与工具
英文名:nano-brain
⭐ 5 Stars 🍴 1 Forks 💻 Go 📄 未公布协议 🏷 AI 8.0分
8.0AI 综合评分
ai-agentsai-memorygolanghybrid-search
✦ AI Skill Hub 推荐

AI Skill Hub 强烈推荐:Nano脑 是一款优质的MCP工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。

📚 深度解析

Nano脑 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 Nano脑,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。Nano脑 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 Nano脑 评为 AI 评分 8.0 分,属于同类工具中的优质选择。

📋 工具概览

Nano脑 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 5
开发语言
Go
支持平台
Windows / macOS / Linux(跨平台)
维护状态
轻量级项目,按需更新
开源协议
未公布
AI 综合评分
8.0 分
工具类型
MCP工具
Forks
1

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

Nano脑 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/nano-step/nano-brain

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "nano-": {
      "command": "npx",
      "args": ["-y", "nano-brain"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 Nano脑 执行以下任务...
Claude: [自动调用 Nano脑 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "nano_": {
      "command": "npx",
      "args": ["-y", "nano-brain"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 82/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

nano-brain

Persistent memory and code intelligence for AI coding agents.

Go 1.23 License: MIT GitHub

Key Features

  • Hybrid search — BM25 full-text + pgvector HNSW cosine similarity + RRF fusion + recency decay
  • 9 MCP tools — query, search, vsearch, get, write, tags, status, update, wake_up
  • Session harvesting — auto-ingest OpenCode and Claude Code sessions
  • File watcher — fsnotify-based directory monitoring with debounce
  • Content-addressed storage — SHA-256 deduplication
  • Heading-aware markdown chunking
  • Multi-workspace isolation with per-workspace data
  • Config hot-reloadPOST /api/reload-config
  • V1 migration — import from SQLite (pure Go, no CGO)
  • Benchmarking suite — generate, run, compare, stress
  • Search telemetry — local-only, 90-day retention, non-blocking

Prerequisites

  • Go 1.23+ (building from source) OR pre-built binary
  • PostgreSQL 17 with pgvector 0.8.2 extension
  • Embedding provider: Ollama (default, local) or Voyage AI

Team knowledge base (no per-member setup)

Deploy one nano-brain server for the whole team. Every developer's AI agent connects to the same PostgreSQL instance — decisions, architecture notes, code intelligence, and session learnings are instantly shared across the team. New team members get full project context from day one without any setup on their machine.

Dev A (office)   ──┐
Dev B (remote)   ──┼──► nano-brain on team server ──► shared PostgreSQL
Dev C (new hire) ──┘

Role-based access: admins get full read/write, developers get read/write scoped to their workspace, stakeholders or reviewers get read-only access.

Path 1 — Local machine (Ollama + Docker, ~5 min)

The fastest way to get started on a single machine.

Prerequisites: Docker, Ollama, Node.js 18+

```bash

1. Install nano-brain

npm install -g @nano-step/nano-brain

2. Install and start nano-brain (with auth + public binding)

npm install -g @nano-step/nano-brain nano-brain serve -d --host=0.0.0.0

Path 3 — Build from source

```bash

Build

CGO_ENABLED=0 go build -o nano-brain ./cmd/nano-brain

Via npx (no global install)

npx @nano-step/nano-brain@latest doctor
npx @nano-step/nano-brain@latest serve -d
Also available as npx nano-brain@latest. Do NOT run from the nano-brain source directory — npm will resolve the local package instead of the registry.

Authentication (VPS / remote deployment)

When binding to a non-loopback address, enable auth to protect your memory:

server:
  host: 0.0.0.0
  port: 3100
  auth:
    enabled: true
    realm: nano-brain
    users:
      - username: admin
        password_hash: "$2a$10$..."   # from: nano-brain auth hash <password>
    tokens:
      - "nbt_..."                     # from: nano-brain auth token
    bypass_paths:
      - /health

Generate credentials:

```bash

/path/to/container-config.yml uses host.docker.internal for DB/Ollama

docker run -d \ -e NANO_BRAIN_CONFIG=/etc/nano-brain/config.yml \ -v /path/to/container-config.yml:/etc/nano-brain/config.yml:ro \ -p 3100:3100 \ nano-brain:latest ```

Use Cases

Multi-machine developer (primary use case)

You work on your office PC, home machine, and personal laptop — each with a different Claude Code or OpenCode session. Without shared memory, your AI agent forgets everything between machines.

Deploy nano-brain on a VPS (or any always-on server) with a PostgreSQL instance. Every session you run on any machine gets harvested and indexed there. When you switch machines, your agent picks up exactly where you left off — decisions, context, code knowledge, all there.

Office PC ──┐
             ├──► nano-brain on VPS ──► shared PostgreSQL
Home Mac ───┘

Quick Start

Let your AI agent set this up for you. See SETUP_AGENT.md — a step-by-step guide your agent can follow to install, configure, and verify nano-brain, checking for missing dependencies and asking before installing anything.

---

Configuration

Config file: ~/.nano-brain/config.yml

server:
  host: localhost
  port: 3100

database:
  url: postgres://nanobrain:nanobrain@localhost:5432/nanobrain_dev

embedding:
  provider: ollama              # ollama or voyage
  url: http://localhost:11434
  model: nomic-embed-text
  dimension: 0                  # auto-detect from provider
  concurrency: 3

search:
  rrf_k: 60
  recency_weight: 0.3
  recency_half_life_days: 180
  limit: 20

harvester:
  opencode:
    db_root: ""                 # e.g., ~/.ai-sandbox/opencode-dbs (multi-DB, highest priority)
    db_path: ""                 # e.g., ~/.local/share/opencode/opencode.db (single DB)
    session_dir: ""             # e.g., ~/.local/share/opencode/storage (legacy JSON)
  claudecode:
    enabled: false
    session_dir: ""

watcher:
  debounce_ms: 2000
  reindex_interval: 300
  # Per-collection exclude_patterns and allowed_extensions are also supported
  # via the workspaces map. See "Ignore patterns" section below for the
  # global and workspace-local .nano-brainignore files.

storage:
  max_file_size: 314572800      # 300MB
  max_size: 10737418240         # 10GB

telemetry:
  retention_days: 90

logging:
  level: info
  file: ""                      # empty = stdout only

summarization:
  enabled: false                # set to true to generate LLM summaries of harvested sessions
  provider_url: ""              # OpenAI-compatible endpoint, e.g. https://ai-proxy.example.com/v1
  api_key: ""                   # or set NANO_BRAIN_SUMMARIZE_API_KEY env var
  model: "nano-brain"           # model name passed to the provider
  max_tokens: 8000              # max tokens per LLM completion
  concurrency: 3                # parallel map-phase LLM calls

Environment Variables

VariableDescription
NANO_BRAIN_CONFIGPath to YAML config file (12-factor; useful in Docker/k8s). Precedence: --config flag > NANO_BRAIN_CONFIG > ~/.nano-brain/config.yml. Leading/trailing whitespace is stripped. If the env-pointed file does not exist, a WARNING: is printed to stderr and defaults are used (operator can spot typos).
DATABASE_URLPostgreSQL connection string
VOYAGE_API_KEYVoyage AI API key
OPENCODE_DB_ROOTOpenCode per-project DB root directory (multi-DB mode)
OPENCODE_DB_PATHOpenCode single SQLite database path
OPENCODE_STORAGE_DIROpenCode session directory (legacy)
NANO_BRAIN_SUMMARIZE_API_KEYAPI key for the summarization LLM provider
NANO_BRAIN_AUTH_ENABLEDEnable Basic Auth + Bearer Token (true/false)
NANO_BRAIN_AUTH_TOKENSComma-separated bearer tokens
NANO_BRAIN_*Override any config field (e.g., NANO_BRAIN_SERVER_PORT=3100)

Docker example — run the server in a container against a host PostgreSQL:

```bash

MCP Configuration

{
  "mcp": {
    "nano-brain": {
      "type": "remote",
      "url": "http://localhost:3100/mcp"
    }
  }
}

REST API

Public Endpoints

MethodPathDescription
GET/healthHealth check
GET/api/statusServer status with version, uptime, workspace stats
POST/api/v1/initRegister workspace
GET/api/v1/workspacesList all workspaces (with doc counts)
POST/api/v1/workspaces/resolveResolve path → workspace hash + registered status (read-only)
DELETE/api/v1/workspaces/:hashPermanently delete a workspace + cascade docs/chunks/embeddings
GET/api/v1/wake-upWorkspace briefing
POST/api/harvestTrigger session harvesting
POST/api/reload-configHot-reload configuration

Workspace-Scoped Endpoints

Workspace is passed in the JSON body for POST, query param for GET.

MethodPathDescription
POST/api/v1/writeWrite/update document
POST/api/v1/embedTrigger embedding
POST/api/v1/searchBM25 keyword search
POST/api/v1/vsearchVector similarity search
POST/api/v1/queryHybrid search (BM25 + vector + RRF + recency)
POST/api/v1/collectionsAdd collection
GET/api/v1/collectionsList collections
PUT/api/v1/collections/:nameRename collection
DELETE/api/v1/collections/:nameRemove collection
GET/api/v1/tagsList tags with counts
POST/api/v1/getGet single document by source_path or id
POST/api/v1/multi-getBatch fetch documents by paths or ids
POST/api/v1/reindexQueue reindex (202)
POST/api/v1/updateQueue update (202)
POST/api/v1/summarizeTrigger LLM summarization of harvested sessions
POST/api/v1/wake-upWorkspace briefing with session_dir

MCP Endpoints

MethodPathDescription
GET/POST/mcpStreamable HTTP (MCP 2025-03-26)
GET/POST/sseSSE transport (legacy)

CLI Commands

CommandDescription
nano-brain (no args)Start HTTP server (default: port 3100)
nano-brain init --root=<path>Register workspace
nano-brain workspaces listList registered workspaces with doc counts
nano-brain workspaces current [--path=<p>] [--export\|--json\|--check]Resolve current/path workspace hash. --export prints export NANO_BRAIN_WORKSPACE=<hash> for eval; --check exits 2 if not registered
nano-brain workspaces remove --workspace=<hash> [--dry-run\|--force]Permanently delete a workspace + all its documents/chunks/embeddings
nano-brain writeWrite document via CLI
nano-brain query [--scope=all] [--tags=t1,t2]Hybrid search (BM25 + vector + RRF + recency)
nano-brain search [--scope=all] [--tags=t1,t2]BM25 keyword search
nano-brain vsearch [--scope=all] [--tags=t1,t2]Vector similarity search
nano-brain wake-up --workspace=<hash>Workspace briefing (collections, stats, recent memories)
nano-brain get <source_path\|uuid> --workspace=<hash>Fetch a single document by source_path or UUID
nano-brain tags --workspace=<hash>List all tags with document counts
nano-brain multi-get --workspace=<hash> --paths=p1,p2Fetch multiple documents in one round-trip
nano-brain collection add\|remove\|listManage collections
nano-brain harvestTrigger session harvesting
nano-brain backfill-summaries [--dry-run] [--workspace=] [--since=]Export existing DB summaries to disk (.md files for Obsidian etc.)
nano-brain cleanup-stale-raw [--dry-run]Delete pre-#192 raw OpenCode session docs superseded by summaries
nano-brain cleanup-orphan-workspaces [--dry-run]Delete documents/chunks under workspace_hash values not registered in workspaces. Run BEFORE migration 00011 (issue #238).
nano-brain bench generate\|run\|compare\|stressBenchmarking suite
nano-brain db:migrateRun pending goose migrations
nano-brain db:migrate --from-v1 <path>Import V1 SQLite data
nano-brain logs [-n 50] [-f]Tail log file
nano-brain docker start\|stop\|statusDocker compose management
nano-brain status [--json]Server status
nano-brain auth hash <password>Generate bcrypt password hash for config
nano-brain auth tokenGenerate random bearer token (nbt_-prefixed)
nano-brain doctor [--json]Check prerequisites (config, PostgreSQL, pgvector, Ollama, model)

Search Pipeline

Query --> BM25 (ts_rank_cd) ---+
                               +--> RRF Fusion (k=60) --> Recency Decay --> Results
Query --> Vector (HNSW cos) ---+
  • BM25: websearch_to_tsquery + ts_rank_cd on PostgreSQL tsvector
  • Vector: pgvector HNSW index with cosine distance
  • RRF: Reciprocal Rank Fusion (k=60), scores normalized to [0,1]
  • Recency: exponential half-life decay (default 180 days, weight 0.3)
🎯 aiskill88 AI 点评 A 级 2026-06-04

高质量的开源MCP工具,提供持久内存和代码智能服务

⚡ 核心功能

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 未明确开源协议,商用场景需谨慎评估
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

🔗 相关工具推荐

🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

MCP工具是用于AI编码代理的持久内存和代码智能服务器
💡 AI Skill Hub 点评

总体来看,Nano脑 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

⬇️ 获取与下载
⚠️ 该工具未声明开源协议,不提供直接下载。请访问原项目了解使用条款。
📚 深入学习 Nano脑
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 nano-brain
Topics ai-agentsai-memorygolanghybrid-search
GitHub https://github.com/nano-step/nano-brain
语言 Go
🔗 原始来源
🐙 GitHub 仓库  https://github.com/nano-step/nano-brain

收录时间:2026-06-04 · 更新时间:2026-06-04 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。