开放记忆协议——为 Claude、ChatGPT 和 Cursor 提供统一的记忆存储库
Open Memory Protocol – One Memory Store for Claude, ChatGPT, Curso

原始链接: https://github.com/SMJAI/open-memory-protocol

**开放记忆协议 (OMP)** 是一项供应商中立的开源标准,旨在解决“AI 记忆孤岛”问题。目前,Claude、ChatGPT 和 Cursor 等 AI 工具各自独立运行,一旦切换平台,上下文便会丢失。 OMP 通过以下方式实现可移植、可互操作的 AI 记忆: * **标准化规范:** 对内存对象、存储格式和 REST API 的精确定义。 * **自托管基础设施:** 提供一个参考服务器,让用户掌控数据,确保隐私和所有权。 * **跨工具集成:** 利用 MCP、SDK 和浏览器扩展,OMP 允许不同的 AI 工具读写同一个记忆存储库。 通过运行本地 OMP 服务器,用户可以让 AI 助手在所有会话和设备中自动调取偏好设置、编码风格以及过往项目详情。由于基于开放标准构建,任何支持 HTTP 请求的工具都可以实现 OMP,从而打破对封闭生态系统的依赖。 OMP 是免费、社区驱动的,专为那些希望其 AI 上下文具备可移植性、隐私性和持久性的用户而设计。欲了解更多信息,请访问[官方仓库](https://github.com/smjai/omp)。

```Hacker News最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交登录Open Memory Protocol – 为 Claude、ChatGPT、Cursor 提供统一记忆存储 (github.com/smjai)由 soji_mathew 发布于 1 小时前,6 点 | 隐藏 | 过往 | 收藏 | 1 条评论帮助 brcmthrowaway 22 分钟前 | 下一条 [–] 垃圾内容警报回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索: ```
相关文章

原文

An open standard for portable, interoperable AI memory across tools, sessions, and devices.

License Spec Version Discord


Every AI tool remembers you differently — and only within its own walls.

  • Claude knows what you told it yesterday. Cursor doesn't.
  • ChatGPT learned your preferences. Your custom agent hasn't.
  • Copilot saw your code style. Your terminal AI is starting from zero.

Every time you switch tools, your AI forgets you. You repeat yourself. Context is lost. The AI that was finally starting to know you resets to a stranger.

This is the AI memory silo problem. And it has the same solution as every silo problem before it: an open protocol.


Open Memory Protocol is a vendor-neutral specification for how AI tools store, retrieve, and share memory about users and their context.

It is:

  • A specification — a precise definition of memory objects, storage format, and HTTP API
  • A reference server — self-hostable, open-source, runs in Docker in one command
  • A set of SDKs — TypeScript and Python libraries for building OMP-compatible tools
  • A set of adapters — plug-ins for Claude (MCP), OpenAI, Cursor, and more

Any AI tool that implements OMP can instantly share memory with any other OMP-compatible tool.


Requirements: Node.js 22 or newer

1. Run your memory server

Or with Docker:

docker run -p 3456:3456 -v omp-data:/data ghcr.io/smjai/omp-server

Your server is now running at http://localhost:3456. Test it:

curl http://localhost:3456/v1/health
# {"status":"ok","version":"0.1","compliance":"OMP-Core","memories_count":0}

2. Connect Claude (via MCP)

Find your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Windows (Store app): %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json

Add to it:

{
  "mcpServers": {
    "omp": {
      "command": "npx",
      "args": ["omp-mcp"],
      "env": {
        "OMP_SERVER": "http://localhost:3456",
        "OMP_API_KEY": "your-omp-key"
      }
    }
  }
}

To enable AI-powered memory extraction and compression, also set these on the server:

OMP_AI_PROVIDER=anthropic   # or "openai"
OMP_AI_API_KEY=sk-ant-...   # your Anthropic or OpenAI key

3. Make Claude use OMP automatically

Without a system prompt, you have to ask Claude to use OMP tools manually. To make it automatic, create a Project in Claude Desktop and add this system prompt:

You have access to OMP memory tools (omp_remember, omp_recall, omp_list).

At the start of every conversation, use omp_recall to search for memories 
relevant to what the user is asking about.

Whenever the user shares anything worth remembering — preferences, decisions, 
projects, facts about themselves — automatically use omp_remember to save it 
without being asked.

Never tell the user you are saving a memory. Just do it silently.

This makes OMP invisible — Claude just remembers, automatically, across every session.

4. Continue a conversation in a different AI tool

OMP memories are stored on your server, readable by any tool. To hand off a conversation from Claude to ChatGPT (or any other AI):

Step 1 — At the end of your Claude session, ask Claude to compress it:

Use omp_compress to save a summary of our conversation.

Step 2 — Fetch your memories:

curl http://localhost:3456/v1/memories

Step 3 — Paste the memory JSON into ChatGPT (or any AI) and say:

Here is my memory store from my OMP server: <paste JSON>
Continue from where I left off.

Any AI tool that can read JSON can instantly pick up where another left off. This is the core promise of OMP — your context is yours, not locked inside one tool.

Write a memory from any tool

curl -X POST http://localhost:3456/v1/memories \
  -H "Content-Type: application/json" \
  -d '{
    "content": "User prefers TypeScript over JavaScript and dislikes verbose comments",
    "type": "semantic",
    "source": { "tool": "claude" },
    "tags": ["preferences", "coding"]
  }'

Query from any other tool

curl "http://localhost:3456/v1/memories/search?q=coding+preferences"

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Claude    │     │   Cursor    │     │  Your Agent │
│  (MCP)      │     │  (SDK)      │     │  (REST API) │
└──────┬──────┘     └──────┬──────┘     └──────┬──────┘
       │                   │                   │
       └───────────────────┼───────────────────┘
                           │
                  ┌────────▼────────┐
                  │   OMP Server    │
                  │  (self-hosted)  │
                  │                 │
                  │  ┌───────────┐  │
                  │  │  SQLite   │  │
                  │  │  / Pgvec  │  │
                  │  └───────────┘  │
                  └─────────────────┘

Every tool reads and writes to a single OMP server you control. One memory store. All tools. Zero silos.


OMP defines:

  • Memory Object — the canonical schema for a memory (content, type, source, tags, timestamps, optional embedding)
  • Memory Typesepisodic (events), semantic (facts/preferences), procedural (how-to knowledge)
  • REST API — standard CRUD + semantic search endpoints
  • Authentication — bearer token, per-tool API keys
  • Export/Import — portable JSON format for moving memories between servers

Read the full specification: SPEC.md


{
  "id": "mem_01j9xk2p3q4r5s6t",
  "content": "User is building a fintech startup, prefers clean architecture, dislikes over-engineering",
  "type": "semantic",
  "source": {
    "tool": "claude",
    "session_id": "sess_abc123",
    "timestamp": "2026-06-29T12:00:00Z"
  },
  "tags": ["profile", "preferences", "engineering"],
  "created_at": "2026-06-29T12:00:00Z",
  "updated_at": "2026-06-29T12:00:00Z",
  "expires_at": null
}

Tool Status Install
Claude (MCP) ✅ Available npx omp-mcp
Browser Extension ✅ Available Load unpacked — Chrome/Edge/Brave
OpenAI Assistants 🙋 Help wanted Open issue
Cursor 🙋 Help wanted Open issue
Copilot / VS Code 🙋 Help wanted Open issue
Gemini 🙋 Help wanted Open issue
Custom (REST) ✅ Available Any HTTP client

OMP Bridge — Browser Extension

The browser extension brings OMP to the web versions of every AI tool with zero setup on their side.

What it does:

  • Shows a floating 🧠 button on Claude.ai, ChatGPT, Gemini, and Perplexity
  • Displays your OMP memories from your server
  • One click to inject your memories into any chat — the AI instantly knows your context
  • Works cross-model: inject the same memories into ChatGPT that Claude saved

Install (Chrome / Edge / Brave):

cd adapters/browser-extension
npm install && npm run build

Then open chrome://extensions → Enable Developer modeLoad unpacked → select the adapters/browser-extension folder.

Want to build one? An adapter is typically 100–200 lines — read CONTRIBUTING.md and use adapters/claude-mcp as a template.


The OMP API is plain REST — any HTTP client works out of the box. Typed SDKs are on the roadmap.

Want to build one? Python, Go, Rust, and Ruby SDKs are all needed. See CONTRIBUTING.md.

# Save a memory
curl -X POST http://localhost:3456/v1/memories \
  -H "Content-Type: application/json" \
  -d '{"content":"User prefers TypeScript","type":"semantic","source":{"tool":"myapp","timestamp":"2026-06-30T00:00:00Z"}}'

# Search memories
curl -X POST http://localhost:3456/v1/memories/search \
  -H "Content-Type: application/json" \
  -d '{"q":"TypeScript","limit":5}'

Your memories are yours. They should not be locked inside a company's database, used to train models without your consent, or lost when you switch tools.

OMP is designed on these principles:

  • Self-hosted first — you run the server, you own the data
  • Vendor neutral — no company controls the standard
  • Privacy by design — memories never leave your server unless you export them
  • Portable — import/export your full memory in one command


OMP is community-driven. We need:

  • Adapter builders — connect your favourite AI tool
  • SDK contributors — Go, Rust, Java SDKs welcome
  • Spec reviewers — read SPEC.md and open issues
  • Early adopters — try it and report what breaks

See CONTRIBUTING.md to get started.


  • GitHub Discussions — questions, ideas, feedback
  • Issues — bugs and spec clarifications

Apache 2.0 — free to use, modify, and distribute. See LICENSE.

Built by SMJAI and contributors.

联系我们 contact @ memedata.com