phren

phren

A persistent memory server for AI agents that stores findings, tasks, and patterns in Markdown files within a git repository, enabling context injection across multiple AI tools.

Category
访问服务器

README

<p align="center"><img src="docs/phren-transparent.png" width="180" alt="phren"></p>

<h3 align="center">Your agents forget everything. Phren doesn't.</h3>

<p align="center"> <a href="https://www.npmjs.com/package/@phren/cli"><img src="https://img.shields.io/npm/v/%40phren%2Fcli?style=flat&labelColor=0D0D0D&color=7C3AED" alt="npm version"></a> <a href="https://github.com/alaarab/phren/blob/main/LICENSE"><img src="https://img.shields.io/github/license/alaarab/phren?style=flat&labelColor=0D0D0D&color=7C3AED" alt="license"></a> <a href="https://alaarab.github.io/phren/"><img src="https://img.shields.io/badge/docs-alaarab.github.io%2Fphren-7C3AED?style=flat&labelColor=0D0D0D" alt="docs"></a> <a href="https://alaarab.github.io/phren/whitepaper.pdf"><img src="https://img.shields.io/badge/whitepaper-PDF-7C3AED?style=flat&labelColor=0D0D0D" alt="whitepaper"></a> </p>

<p align="center"> Persistent memory for AI agents. Findings, tasks, and patterns live in markdown files in a git repo you control. No database, no vendor lock-in. Works with Claude, Copilot, Cursor, and Codex. </p>


Install

npx @phren/cli init

One command. Sets up ~/.phren, wires up MCP for your tools, installs hooks. Next time you open a project, context starts flowing automatically. On a new machine? Re-run init and you're back in sync.


What actually happens

When you open a prompt:

  • Hooks extract keywords from your question
  • Phren searches findings across projects (FTS5 full-text with semantic fallback)
  • Relevant snippets inject into your prompt before you hit send
  • You ask; Claude already knows the gotchas

When you discover something:

  • phren add-finding <project> "finding text" captures it with optional tags ([decision], [pattern], [pitfall], [bug])
  • Trust scores decay over time; decisions never do; observations expire in 14 days
  • Findings link to fragments (named concepts like "auth" or "build") that connect knowledge across projects

Sessions:

  • Mark boundaries with session_start / session_end
  • Next session sees your prior summary, active tasks, recent findings, and where you left off
  • Checkpoints track edited files and failing tests so you can resume exactly where you stopped

Tasks:

  • Add with priority/section. Pin across sessions. Link to GitHub issues.
  • Track completions and cross-project rollups.

Key features

Fragment graph

Explore connections visually. Drag nodes to reorganize; graph auto-settles. Click a fragment to see every finding linked to it across all projects.

Finding lifecycle

  • Supersede: "Finding X is obsoleted by finding Y"
  • Retract: "We were wrong about this; here's why"
  • Contradict: "We have two findings that conflict; this is why"

Helps you reason about contradictions instead of hiding them.

Multi-agent support

Same store works with Claude Code, Copilot, Cursor, and Codex. Agents tag findings with their tool, so you see who discovered what.

Review queue

Mark findings as needing review ([Review] section). Phren surfaces review items on every session start. Approve, reject, or edit in place.

Governance & policies

Per-project retention policies. Confidence decay curves. Access control. Audit logs. Configure with phren config or the web UI.

Store subscriptions

Subscribe to specific projects in a team store — others stay hidden from search and context injection:

phren store subscribe team-store arc intranet
phren store unsubscribe team-store legacy-projects

Progressive disclosure

Enable PHREN_FEATURE_PROGRESSIVE_DISCLOSURE=1 to get compact memory indices instead of full snippets. Call get_memory_detail(id) to expand only what you need.

Semantic dedup & conflict detection

Optional: enable LLM-based duplicate detection and contradiction flagging on add_finding. Prevents near-duplicate entries and catches "always use X" vs "never use X" contradictions.

Skills & hooks

Drop custom slash commands into ~/.phren/global/skills/. Hooks run on user prompt, tool use, and session events — wire phren into your own workflows.


CLI quick reference

phren                                   Interactive memory shell
phren search <query>                    Full-text search with FTS5
phren add-finding <project> "insight"
phren task add <project> "item"         Add a task
phren session_start <project>           Start a session
phren store list                        List personal + team stores
phren team init <name> --remote <url>
phren team join <url>                   Join a team store
phren web-ui [--port 3499]              Launch the web UI
phren doctor                            Health check & auto-fix

See full CLI docs at alaarab.github.io/phren.


Team stores

Shared knowledge repos for teams. One person creates with phren team init, others join with phren team join. Findings, tasks, and skills sync across team members.

Each team store can be configured with per-project subscriptions so people only see what they care about.


Platforms

  • Claude Code (VS Code, Web, Desktop) — MCP hooks + CLI
  • Copilot (VS Code, GitHub.com) — MCP hooks
  • Cursor (IDE) — MCP hooks + built-in skill system
  • Codex (Claude Agent SDK) — MCP tools + hooks

All use the same phren store. No vendor lock-in.


Packages

Package Description
@phren/cli CLI, MCP server, data layer (54 tools, FTS5, hooks)
phren-vscode VS Code extension (sidebar, graph, onboarding)

MIT License. Made by Ala Arab.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选