RI

rsl-innovation/mem-port

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 2 forks 质量 83 趋势 18MIT

本地MCP(模型上下文协议)服务器,支持便携式长期代理记忆——一个用于AI上下文的U盘。

概览

本地MCP(模型上下文协议)服务器,支持便携式长期代理记忆——一个用于AI上下文的U盘。 每个AI副驾驶(Claude Code、Cursor、Windsurf等)都保留自己的内存,与该工具隔离。常见的变通方法——复制粘贴上下文、摘要或导出笔记,从一个代理到另一个代理——只捕捉到你创建的瞬间,冻结在那一刻。从那以后,复制品会漂移:每个代理都自行学习,没有什么能保持同步,随着时间推移,副驾驶们对真实内容的分歧也越大。MEM-port作为一个本地守护进程运行,任意数量的副驾驶都可以连接,背后有嵌入的知识图谱(实体、情节、记忆、技能、架构决策记录及其间关系),这些知识图谱能经受重启保存,可以导出为便携文件并随处移动。每个连接的副驾驶读写同一张图表,因此没有需要粘贴的内容,也没有需要漂移的内容。

概述(AI 翻译)

mem-port.com

本地MCP(模型上下文协议)服务器,支持便携式长期代理记忆——一个用于AI上下文的U盘。

每个AI副驾驶(Claude Code、Cursor、Windsurf等)都保留自己的内存,与该工具隔离。常见的变通方法——复制粘贴上下文、摘要或导出笔记,从一个代理到另一个代理——只捕捉到你创建的瞬间,冻结在那一刻。从那以后,复制品会漂移:每个代理都自行学习,没有什么能保持同步,随着时间推移,副驾驶们对真实内容的分歧也越大。MEM-port作为一个本地守护进程运行,任意数量的副驾驶都可以连接,背后有嵌入的知识图谱(实体、情节、记忆、技能、架构决策记录及其间关系),这些知识图谱能经受重启保存,可以导出为便携文件并随处移动。每个连接的副驾驶读写同一张图表,因此没有需要粘贴的内容,也没有需要漂移的内容。

与其他代理内存项目不同,内存端口不需要外部服务——不需要Postgres、Qdrant、Neo4j。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

mem-port

mem-port.com

A local MCP (Model Context Protocol) server for portable, long-term agentic memory — a thumb drive for your AI context.

Every AI copilot (Claude Code, Cursor, Windsurf, …) keeps its own memory, siloed to that tool. The usual workaround — copy-pasting context, summaries, or exported notes from one agent into another — only captures a snapshot frozen at the moment you made it. From there the copies drift: each agent keeps learning on its own, nothing keeps the copies in sync, and the longer you go the more your copilots disagree about what’s actually true. mem-port runs as a single local daemon that any number of copilots can connect to, backed by an embedded knowledge graph (entities, episodes, memories, skills, architectural decision records, and the relations between them) that survives restarts and can be exported to a portable file and moved anywhere. Every connected copilot reads and writes the same graph, so there’s nothing to paste and nothing to drift.

Unlike other memory-for-agents projects, mem-port needs no external services — no Postgres, no Qdrant, no Neo4j. It’s one process, one embedded SurrealDB instance combining graph storage and vector search, and zero-config local semantic search (no API key required).

Connecting a client (below) gives it the ability to use mem-port; for more detailed, tunable instructions on what it should actually save and when — including keeping personal/team/project memory in separate scopes — see MEMORY_GUIDE.md.

Quick start

npx @rsl-innovation/mem-port serve

This starts a daemon on http://127.0.0.1:8787/mcp. Point any MCP client at it over Streamable HTTP, with a library-id header identifying your workspace. Every copilot that connects with the same library-id shares the same memory; different library-ids are fully isolated from each other (each maps to its own SurrealDB namespace/database) — there’s no cross-tenant leakage.

npx re-checks the registry on every invocation. If you’ll be running mem-port commands often, install it globally instead so mem-port is a plain command on your PATH:

npm install -g @rsl-innovation/mem-port
mem-port serve

The rest of this README uses mem-port for brevity. If you didn’t install globally, substitute npx @rsl-innovation/mem-port wherever you see that — it works identically, just slower to start.

Connecting from Claude Code

Easiest: use the CLI (--header accepts any number of Key: Value pairs). Add --scope user so the server is available in every project on this machine, not just the one you happen to be in when you run the command — the default local scope ties it to a single project directory:

在 GitHub 查看完整 README

安装

npx -y mcp-remote@latest http://127.0.0.1:8787/mcp --header library-id:my-personal-workspace
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mem-port": { "type": "http", "url": "http://127.0.0.1:8787/mcp", "headers": { "library-id": "my-personal-workspace" } } } }