能力标签
🔌
MCP工具

非线性内存OS

基于 TypeScript · 让 AI 助手直接操作你的系统与工具
英文名:nlm-memory
⭐ 6 Stars 💻 TypeScript 📄 Apache-2.0 🏷 AI 7.5分
7.5AI 综合评分
aiaiderclaude-codecodexcursortypescript
✦ AI Skill Hub 推荐

非线性内存OS 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

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

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

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

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

📋 工具概览

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

GitHub Stars
⭐ 6
开发语言
TypeScript
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
7.5 分
工具类型
MCP工具
Forks

📖 中文文档

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

非线性内存OS 是一款遵循 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/pbmagnet4/nlm-memory

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

# 配置文件位置
# 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 对话中直接使用
# 示例:
用户: 请帮我用 非线性内存OS 执行以下任务...
Claude: [自动调用 非线性内存OS MCP 工具处理请求]

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

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

简介

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="assets/banner-dark.svg" /> <source media="(prefers-color-scheme: light)" srcset="assets/banner-light.svg" /> <img alt="nlm-memory — Local-first non-linear memory OS" src="assets/banner-light.svg" width="720" /> </picture> </p>

<p align="center"> <a href="https://www.npmjs.com/package/nlm-memory"><img src="https://img.shields.io/npm/v/nlm-memory?color=CB3837&label=npm&logo=npm" alt="npm version" /></a> <a href="https://github.com/pbmagnet4/nlm-memory/actions/workflows/ci.yml"><img src="https://github.com/pbmagnet4/nlm-memory/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI status" /></a> <a href="https://github.com/pbmagnet4/nlm-memory/blob/main/LICENSE"><img src="https://img.shields.io/github/license/pbmagnet4/nlm-memory?color=blue" alt="License: Apache 2.0" /></a> <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/nlm-memory?color=brightgreen" alt="Node 20+" /></a> <img src="https://img.shields.io/badge/tests-726%20passing-success" alt="726 tests passing" /> <img src="https://img.shields.io/badge/MCP-9%20runtimes-8A2BE2" alt="MCP across 9 runtimes" /> <img src="https://img.shields.io/badge/hooks-3%20runtimes-7B2CBF" alt="Hooks on 3 runtimes" /> <img src="https://img.shields.io/badge/telemetry-none-informational" alt="Zero telemetry" /> </p>

<p align="center"> <a href="#install">Install</a> &middot; <a href="#quick-start">Quick Start</a> &middot; <a href="#runtimes">Runtimes</a> &middot; <a href="#how-recall-works">How recall works</a> &middot; <a href="#agent-self-improvement-signals">Signals</a> &middot; <a href="#mcp-tools">MCP</a> &middot; <a href="#rest-api">REST API</a> &middot; <a href="#daily-digest">Digest</a> &middot; <a href="#configuration">Config</a> &middot; <a href="#security">Security</a> &middot; <a href="#vs-alternatives">vs Alternatives</a> </p>

---

nlm-memory is a local-first memory layer for AI coding agents. It indexes every session from Claude Code, Codex, OpenCode, Cursor, Windsurf, Hermes, Aider, and pi into a single searchable store on your machine. Three properties no other memory layer ships together:

  1. Cross-runtime reach. One index, every adapter.
  2. Editable timeline. Sessions can be superseded by newer ones; entities can be retired. Patch history retroactively — no other tool lets you do this. See docs/supersedence.md.
  3. 97.2% R@5 baseline. On a 14-month corpus, keyword recall surfaces the right session in the top 5 on 97.2% of evaluator queries. No fine-tuning. The labels were generated by DeepSeek V4 — the retrieval algorithm is the same code path you'll run, but expect a lower number with a smaller local classifier. See docs/methodology-recall-baseline.md.

Everything stays on your machine by default. No telemetry, no account. The classifier defaults to local (Ollama); if you opt into a cloud classifier (DeepSeek, OpenAI, Anthropic, OpenRouter, or any OpenAI-compatible endpoint), session transcripts are sent to that provider — see Security for the exact data-flow.

---

What's inside the UI

Open http://localhost:3940/ui after the daemon starts.

PageWhat it shows
**Live**Sessions being written in real time, recent reads, recent decisions
**Pulse**System health — coherence, runtimes, stale entities, recent sessions
**River**Full session timeline with density controls + superseded-lane visualization
**Thread**Per-entity conversation history with runtime filters and ←/→ navigation
**Search**Keyword, semantic, or hybrid recall with match snippets and field-origin tags
**Recall**Adoption telemetry — useful_hit_rate, source breakdown, query log
**Settings**Sources, providers, classifier, data backup/restore

---

Install

npm install -g nlm-memory
nlm setup

nlm setup is the interactive first-run wizard. It picks your classifier + model, wires the runtimes you actually use, generates an NLM_MCP_TOKEN, hardens permissions on ~/.nlm/, and installs the daemon supervisor for your platform. For headless environments (servers, CI, agents), use nlm start directly after initial setup — it boots the daemon without interactive prompts.

PlatformDaemonNotes
**macOS**LaunchAgent at ~/Library/LaunchAgents/com.github.pbmagnet4.nlm-memory.plistAuto-starts on login
**Linux**systemd user unit at ~/.config/systemd/user/nlm.serviceHeadless servers: loginctl enable-linger $USER so the daemon survives logout
**Windows**Manual nlm start for nowHook + MCP install paths are platform-aware; supervisor lands next release

Stop or remove: nlm uninstall.

---

Quick Start

After nlm setup finishes, open http://localhost:3940/ui — the daemon is running. (If you changed NLM_PORT, substitute your port in all examples below.) A 30-second sanity check:

nlm recall "what was that pgvector decision"   # one-shot search from the shell
nlm digest                                      # yesterday's activity at a glance
nlm --version

---

Configuration and privacy

VarDefaultWhat
NLM_SIGNALS_ENABLED1 (on)Set to 0 to disable signal ingest entirely
NLM_SIGNAL_RETENTION_DAYS90Raw signals older than this are pruned

Signals are local-only. They are stamped with a per-install ID from ~/.nlm/install-id and never leave the machine.

Configuration

Environment variables

VarDefaultWhat
NLM_PORT3940Daemon bind port (loopback only)
NLM_DB_PATH~/.nlm/canonical.sqliteSQLite canonical store location
NLM_HOOK_MODElivelive injects pointer block; shadow logs without injecting
NLM_HOOK_LOG~/.nlm/hook-log.jsonlHook fire log; powers digest's liveness alert
NLM_USEFUL_HIT_LOG~/.nlm/useful-hit-log.jsonlCitation/useful-hit ledger
NLM_QUERY_LOG~/.nlm/query-log.jsonlRecall query telemetry
NLM_CITATION_LOG~/.nlm/citation-log.jsonlStop-hook citation events
NLM_MISS_LOG~/.nlm/miss-log.jsonlStop-hook miss events — sessions the agent explicitly fetched via get_session/cite_session that the hook never surfaced. Reviewed via nlm misses.
NLM_MISS_LOG_ENABLEDtrueSet to 0 to disable miss-log emission entirely.
NLM_MCP_TOKENauto-generated256-bit bearer for /api/* (non-browser) and /mcp
NLM_MCP_CONFIG~/.mcp.jsonPath the connect/disconnect commands modify
NLM_CLASSIFIERollamaollama (local, default), deepseek, openai, anthropic, openrouter, or openai-compatible
NLM_CLASSIFIER_MODELqwen3:4b-instruct-2507-q4_K_MModel id for the chosen provider. See [classifier bench](reports/classifier-comparison/2026-06-02-deepseek-v4-vs-qwen3.md) for why this is the recommended local default.
NLM_OLLAMA_URLhttp://localhost:11434Override Ollama endpoint
NLM_ADAPTERSallComma-separated allowlist of adapters to enable
DEEPSEEK_API_KEYRequired only when classifier=deepseek
NLM_DISABLE_UPDATE_CHECKSet to 1 to disable the daily npm-registry update check
NLM_RECALL_DECAY_HALF_LIFE_DAYS180Half-life of the recency multiplier applied to recall scores. Older sessions score lower; defaults to 6 months. Set to 0 to disable recency weighting entirely.
NLM_RECALL_DECAY_FLOOR0.25Lower bound on the recency multiplier — even ancient sessions retain at least 25% of their raw score so a perfect-match old session can still surface.
NLM_RECALL_REWRITE_DEFAULTtrueDefault value for the MCP recall_sessions rewrite parameter. When true, the service runs an LLM rewrite on vague natural-language queries before search. The HTTP hook caller bypasses rewrite regardless (hot-path protection).
NLM_RECALL_REWRITE_TIMEOUT_MS5000Per-call timeout for the rewrite LLM. Separate from the classifier timeout.
NLM_FACT_CORROBORATION_BOOST_CAP2.0Maximum multiplicative boost applied to fact recall scores based on how many sessions corroborate the same (subject, predicate, value). Log-scale: 1 corroboration is 1.0×, 10 is 2.0× (capped). Set to 1.0 to disable the boost — the count is still returned on each hit.
NLM_HOOK_INJECT_FACTStrueWhether to attach high-confidence facts about top-hit entities to the pointer block injected by the hook. Set to 0 to disable globally.
NLM_HOOK_FACT_LIMIT5Maximum number of facts in the "Known facts" section of the pointer block.
NLM_HOOK_FACT_MIN_CORROBORATION2Minimum number of sessions that must have asserted a fact before it qualifies for hook injection. Set to 1 to include single-source facts.
NLM_HOOK_FACT_MIN_CONFIDENCE0.7Minimum classifier confidence for a fact to qualify for hook injection.
TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_IDRequired for nlm digest --telegram

Config file

~/.nlm/.env — autoloaded by every CLI command. Mode 0600, owned by you, never readable by other users. The setup wizard writes the initial keys; you can edit it directly.

Reference producer

The pi quality-gate extension (in the pi-sandbox repo) is a ~10-line integration that emits nlm.signal per gate step and again on retry exhaustion. It is the canonical example of the session-embedded transport.

---

REST API

Daemon binds 127.0.0.1:3940 (override with NLM_PORT). Selected endpoints:

MethodPathAuthPurpose
GET/api/healthHost-onlyLiveness probe; returns {version, status, service}
GET/api/recallBearer/OriginHybrid recall — ?q=, ?mode=keyword\|semantic\|hybrid, ?limit=, ?include_superseded=true (default off; opt-in to surface overturned sessions down-ranked, badged with superseded_by). Each result carries status + superseded_by.
GET/api/recall/statsBearer/Origin7-day stats: total, hit_rate, useful_hit_rate, top queries
GET/api/recall/recentBearer/OriginLast N recall events for live tail/telemetry
GET/api/recall/cite-statsBearer/OriginCitation rate over ?days=
GET/api/session/:idBearer/OriginFull session body + supersedence links
GET/api/recall/factsBearer/OriginStructured fact search; includes hint field when empty
GET/api/facts/historyBearer/OriginVersion chain for one fact
GET/api/datasetBearer/OriginFull session list for the UI dataset view
GET/api/live/recent-writesBearer/OriginLive tail of ingested sessions
GET/api/data/backupBearer/OriginStreaming SQLite snapshot download
POST/api/data/restoreBearer/OriginStage a snapshot for apply-on-restart
POST/api/citation/explicitBearer/OriginLog an explicit session citation (the route backing the cite_session MCP tool; payload {id, conversation_id?, reason?})
POST/api/hook/pre-compactBearer/OriginHook endpoint; flushes the surfaced-IDs memo
ALL/mcpBearer requiredStreamable-HTTP MCP transport for container agents

/api/* is gated by three layers: 127.0.0.1 Host check (defeats DNS rebinding), Origin check when the browser sends one (defeats cross-origin drive-by), Bearer fallback when Origin is absent (server-to-server clients).

---

Pipeline

What happens when an AI runtime writes a session and you later recall it:

ingest:  runtime transcript (jsonl/sqlite)
   -> adapter parses runtime-specific format
   -> classifier (Ollama local by default; DeepSeek / OpenAI / Anthropic / OpenRouter / OpenAI-compatible if you opt in) extracts label + entities + decisions + open questions
   -> embedder (nomic-embed-text via Ollama) computes 768-dim vector
   -> SQLite canonical store + FTS5 keyword index + sqlite-vec ANN index

recall: prompt / query
   -> tokenize + match scoring (label x3, entity-exact x4, decision x2, summary x1, phrase-bonus +5)
   -> hybrid: BM25-style keyword + vector cosine, fused by score
   -> select-top-N gate (per-fire cap 3, per-conversation cap 10)
   -> pointer block prepended to model context (hooks) or returned as tool result (MCP)

---

vs Alternatives

**nlm-memory**mem0Letta / MemGPTBuilt-in (CLAUDE.md)
**Unit of memory**Whole session + extracted markersAtomic factsGraph nodes + edgesStatic file
**Cross-runtime**9 adapters, one corpusPer-app SDK integrationPer-app SDK integrationPer-runtime config
**Editable timeline**Sessions can be superseded, retired, abortedAppend-only fact logGraph editsManual file edits
**R@5 baseline**97.2% on 14mo corpuspublished variespublished variesn/a
**External deps**SQLite + Ollama (local)Postgres or QdrantPostgresnone
**Hosted offering**none — local onlyyesyesn/a
**Account required**noneyes (cloud tier)yesnone
**Telemetry**noneyesyesnone
**License**Apache 2.0Apache 2.0Apache 2.0

The defining property is the editable timeline. mem0 and Letta append; NLM lets you reach back and mark a session as superseded by a newer one, retire one as no-longer-relevant, or flag one as aborted-mid-flight. The next recall surfaces the corrected version, not the stale one. A claim from 6 months ago can be patched today.

---

🎯 aiskill88 AI 点评 A 级 2026-06-12

高质量的MCP工具,为AI运算提供了便捷的内存管理

⚡ 核心功能

👥 适合人群

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

🎯 使用场景

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

⚖️ 优点与不足

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

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

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

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

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

❓ 常见问题 FAQ

MCP工具是为AI运算提供本地优先的非线性内存
💡 AI Skill Hub 点评

经综合评估,非线性内存OS 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ Apache-2.0 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 非线性内存OS
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 nlm-memory
Topics aiaiderclaude-codecodexcursortypescript
GitHub https://github.com/pbmagnet4/nlm-memory
License Apache-2.0
语言 TypeScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/pbmagnet4/nlm-memory 🌐 官方网站  https://www.npmjs.com/package/nlm-memory

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