ogham-mcp
by ogham-mcp·★ 104·综合分 49
Ogham MCP 是一个为 AI 编码代理提供的持久化、可搜索共享记忆系统,支持多客户端。
概述
Ogham MCP 为 AI 编码代理提供了一个持久的记忆层,可在 Claude Code、OpenCode 和 Cursor 等不同客户端之间工作。它通过实现可搜索的共享记忆(检索准确率达 97.2%)解决了 AI 代理在会话间忘记上下文的问题。该系统支持语义和关键词混合搜索、多种配置文件以适应不同上下文,并支持导出到 Obsidian 格式。它使用 Python 构建,并通过 PostgreSQL 和向量嵌入进行存储和检索。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要持久化、跨客户端的 AI 编码代理内存,并且已经使用或愿意设置 PostgreSQL/Supabase 基础设施时,选择 Ogham。
什么时候不要选它
如果您需要一个完全自包含的解决方案而不依赖外部数据库,或者您喜欢配置开销更少的简单工具,不要选择 Ogham。
此 server 暴露的工具
从 README 抽取出 12 个工具memoryStore a fact or memory in the shared memory system
searchSearch for memories in the shared memory using hybrid semantic and keyword search
listList recent memories from the shared memory system
deleteDelete a specific memory by its ID
use_profileSwitch to a specific memory profile
profilesList available memory profiles and their memory counts
statsShow profile statistics and memory usage information
exportExport memories to a file
importImport memories from a file
cleanupRemove expired memories from the shared memory system
hybrid_searchSearch across multiple memory profiles simultaneously
hooks_recallLoad project context from memory hooks
可对比工具
安装
安装
使用 uvx 快速开始(推荐)
uvx --from ogham-mcp ogham init这将运行一个设置向导,引导您完成数据库设置和客户端配置。
手动设置
- 设置数据库(推荐使用 Supabase 或 Neon)
- 配置环境变量:
export SUPABASE_URL=https://your-project.supabase.co
export SUPABASE_KEY=your-service-role-key
export EMBEDDING_PROVIDER=openai
export OPENAI_API_KEY=sk-...- 添加到您的 MCP 客户端:
**Claude Code:**
claude mcp add ogham -- uvx ogham-mcp**OpenCode:** 添加到 ~/.config/opencode/opencode.json:
{
"mcp": {
"ogham": {
"type": "local",
"command": ["uvx", "ogham-mcp"],
"environment": {
"SUPABASE_URL": "https://your-project.supabase.co",
"SUPABASE_KEY": "{env:SUPABASE_KEY}",
"EMBEDDING_PROVIDER": "openai",
"OPENAI_API_KEY": "{env:OPENAI_API_KEY}"
}
}
}
}FAQ
- Ogham 支持哪些数据库?
- Ogham 支持 Supabase(默认)、Neon 和自托管 PostgreSQL 数据库。
- Ogham 如何确保数据隐私?
- Ogham 将数据存储在您自己的数据库中。您可以控制连接凭据,数据不会离开您的基础设施,除非您使用 OpenAI 等外部嵌入提供程序。
ogham-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。