Skip to main content
Glama

Perenna

Python PyPI CI Codecov CodeRabbit Pull Request Reviews License Ask DeepWiki

perenna MCP server


轻量级、基于 Git 的 AI 代理持久记忆。Claude Code、Codex、ChatGPT、Cursor 及其他 MCP 客户端可以共享持久记忆,无需共享同一个供应商账户或彼此的对话历史。

  • 独立的 MCP 工具用于读取、写入和删除记忆

  • 本地 stdio 与受 OAuth 保护的单用户 Streamable HTTP 传输

  • 人类可读的 Markdown,存储于独立的 Git 仓库

  • 本地 Vexor 检索索引,随时可从 Git 重建

  • 跨进程锁定,供多个本地代理进程使用

为什么选择 Perenna?

你的记忆应该跟随你,而不是你碰巧使用的某个代理。

Claude Code、Codex、Cursor 和 ChatGPT 把记忆存留在各自的信息孤岛中。切换代理,你的记忆就会消失;切换机器,本地记忆也留在了原来的地方。

Perenna 为它们提供一份共享的 Git-backed 记忆。本地代理和 ChatGPT 可以接入同一个自托管的 Perenna 服务,而每一条持久记忆仍然保持为普通 Markdown,你可以自行检视、编辑、版本管理并备份。

Mem0 的自托管全栈 明显更重,而其托管的 免费计划 目前允许将客户内容用于模型训练和产品改进。

Perenna 的设计与众不同:无需账户、不依赖专有记忆云、不受锁定。只有你的记忆,在你的 Git 仓库里,运行在你掌控的基础设施上。

Related MCP server: Hypermnesic

快速入门

随你的 AI 代理一同安装

将以下内容粘贴到 Claude Code、Codex、ChatGPT Desktop、Cursor 或另一个能够访问终端和本地 MCP 配置的编码代理中:

Install Perenna and connect it to this AI agent as a local stdio MCP server.
Work through the complete setup autonomously.

Use these as the source of truth:
- https://github.com/scarletkc/Perenna/blob/main/docs/getting-started.md
- https://github.com/scarletkc/Perenna/blob/main/docs/guides/client-setup.md

1. Detect the operating system, shell, and current MCP client.
2. Check for Python 3.12 or newer, Git, and uv. Install uv in user scope if it
   is missing. If Python or Git needs administrator approval, give me the exact
   command and stop there.
3. Install Perenna with `uv tool install perenna`. If Perenna is already
   installed, upgrade it with `uv tool upgrade perenna`.
   For Codex, also run `perenna skill install --agent codex`. For Claude Code,
   run `perenna skill install --agent claude-code`. Do not replace an existing
   modified copy or remove unrelated installed skills.
4. Check the effective Vexor embedding provider configuration. Reuse a working
   `~/.vexor/config.json` or inherited environment configuration. If none is
   available, ask me to choose between a remote provider and local embeddings.
   Explain that a remote provider receives memory text and search queries. For
   a remote provider, keep the provider and model in Vexor configuration and
   supply its secret through `VEXOR_API_KEY` or the provider-specific environment
   variable. For local embeddings, install `perenna[local]` and configure the
   local model according to the Perenna configuration reference. Verify the
   selected provider with `uvx vexor doctor` using the same environment that
   the Perenna process will inherit.
5. Ask whether I want to synchronize Perenna with a private Git repository. If
   I do, ask me to provide or approve its URL, run
   `perenna sync setup <repository-url>`, and verify it with
   `perenna sync status`. Treat repository creation, remote replacement, and
   reconciling diverged history as separate choices that require my explicit
   approval.
6. Register `perenna mcp --source <stable-client-name>` using the client-specific
   method in the setup guide. Preserve unrelated MCP servers and settings. Use
   a stable source such as `claude-code`, `codex`, or `cursor` for this client.
   For another client, use its official instructions for adding a local stdio
   MCP server. Make sure the Perenna process inherits `VEXOR_CONFIG_JSON`,
   `VEXOR_API_KEY`, or any provider-specific key used in step 4. Report only
   whether a secret is present.
7. Verify `perenna --help` and the saved MCP configuration. Reload MCP servers
   and call `memory_read` with `action: "list"` when the client supports it. If
   a restart is required, tell me the single restart step.
8. Report the commands run, files changed, and verification results. Keep API
   keys out of tracked configuration files.

安装已发布版本

Perenna 需要 Python 3.12+、Git 和 uv。

uv tool install perenna

为本地客户端安装可选的内存行为技能:

perenna skill install --agent codex
# or
perenna skill install --agent claude-code

当两个客户端都应收到该技能时,在一条命令中重复 --agent。的 配置参考 说明了用户范围与项目范围、目标位置以及替换这门技能时的保护措施。

Codex 和 Claude Code 也可以改用 Perenna 的存储库 Marketplace 中捆绑安装的 Skill 与 MCP 连接。请按照 插件设置指南 操作,并为每个客户端选择一种设置路径。

Perrena 需要可用的 Vexor 嵌入模型提供程序。如需交互式选择并配置提供程序,请运行:

uvx vexor init

Perenna 会自动复用 ~/.vexor/config.json。如果使用进程级配置,请确保 MCP 服务器从宿主机环境中获得 VEXOR_CONFIG_JSON 以及 VEXOR_API_KEY 或所选提供程序的 API 密钥。远程提供程序会收到记忆文本和搜索查询。

如果你选择本地嵌入,请同时安装 Perenna 的本地扩展:

uv tool install "perenna[local]"

Vexor 提供程序配置 覆盖了远程和本地设置。在启动 MCP 客户端的环境中,验证已选定的提供程序:

uvx vexor doctor

要配置一个 MCP 客户端并启动:

perenna mcp --source <client-name>

Per lore in its local data under ~/.perenna/;除非配置了其他 home 目录,否则默认创建于此。

要通过一个私有 Git 仓库导入、发布或执行快进兼容的历史,请运行:

perenna sync setup <repository-url>

从源码安装以进行开发

git clone https://github.com/scarletkc/Perenna.git
cd Perenna
uv tool install .

文档

请先浏览文档索引,再根据你的任务选择对应路径:

License

MIT

Available Tools

3 tools
memory_deleteA
Destructive

Delete exactly one committed memory by ID, expected title, and revision. The deletion removes it from current recall but remains recoverable from Git history.

Inputs: memory_id (required), base_revision (required), expected_title (required). Returns: action, commit, memory, changed, +3 more

memory_readA
Read-onlyIdempotent

Read permanent memory. List returns stable memory IDs and titles, search returns bounded ranked candidate passages, and get returns one complete committed memory with its revision.

Returns: object

memory_writeA
Destructive

Create or modify permanent memory. Summary is a stable one-line description of what a memory covers. Patch applies exact all-or-nothing edits; replace overwrites the complete summary and body. Existing memories require a current base revision.

Returns: action, commit, memory, changed, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool handles a distinct lifecycle operation: reading/querying, writing/updating, and deleting memories. There is no overlap between the primary actions, and the sub-modes within memory_read are explicitly separated (list, search, get).

    Naming Consistency5/5

    All tool names follow the same memory_verb pattern using clear, lowercase snake_case verbs. The naming makes the operation type immediately obvious and perfectly consistent across the set.

    Tool Count5/5

    Three tools is a compact but complete surface for a permanent memory store. Each tool earns its place, and no redundant or extraneous operations exist.

    Completeness5/5

    The set covers the full lifecycle: create/modify via memory_write, read via memory_read (including list/search/get), and delete via memory_delete. Revision-handling and Git-history recovery details further round out the functionality, leaving no critical gaps.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a memory layer for AI coding agents with Git-powered version control, enabling automatic tracking of prompts, context, and code diffs.
      194
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Git-native long-term memory for AI agents: your markdown files are the source of truth, the search index is a disposable projection rebuilt from git, and every memory the agent writes is a reviewable git commit. Served over one OAuth-secured MCP endpoint with hybrid lexical+semantic recall and a gated, git-first commit_note write tool.
      7
      9
      AGPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Persistent, structured memory for AI coding agents via a git-like filesystem with branch/commit/merge tools, enabling agents to maintain context across sessions.
      MIT