mcp-memories
mcp-memories
一个 MCP 服务器,用于捕获代码构建会话并将其发布到共享的团队知识库,通过语义搜索让过往工作变得可发现。
它的功能:
通过 IDE 钩子(Cursor、Claude Code)自动捕获每个代理会话
当你调用
complete_session时,使用 Grove AI 进行摘要,并使用 Voyagevoyage-code-4进行嵌入团队成员使用自然语言搜索——向量搜索 + Voyage 重排序返回最相关的过往构建
设置
1. 安装并构建
npm install
npm run build2. 配置环境
cp .env.example .env
# Fill in MONGODB_URI, MDB_GROVE_API_KEY, GROVE_BASE_URL, VOYAGE_API_KEY, MEMORIES_AUTHOR3. 注册 MCP 服务器
添加到你的 IDE 的 MCP 配置中(例如 ~/.cursor/mcp.json 或 Claude Desktop 的 config.json):
{
"mcpServers": {
"mcp-memories": {
"command": "node",
"args": ["/path/to/mcp-memories/dist/index.js"],
"env": {
"MONGODB_URI": "mongodb+srv://...",
"MEMORIES_DB": "mcp_memories",
"MDB_GROVE_API_KEY": "...",
"GROVE_BASE_URL": "...",
"GROVE_MODEL": "claude-3-7-sonnet",
"VOYAGE_API_KEY": "...",
"MEMORIES_AUTHOR": "your.name"
}
}
}
}4. 设置自动捕获钩子
Cursor — hooks.json 已位于 .cursor/hooks.json。它会在每次 stop 事件时自动触发捕获脚本。
Claude Code — 将 hooks/claude/settings-snippet.json 中的片段合并到你的 ~/.claude/settings.json 中,并更新路径以指向此仓库。
Related MCP server: arcane
工具
工具 | 使用时机 |
| 由钩子自动调用,或手动记录你正在处理的内容 |
| 完成时调用——触发摘要生成和嵌入,并发布到团队 |
| 查找与你即将开始的工作相关的过往构建 |
| 查看团队已构建的内容,按语言/标签/仓库分类 |
| 浏览最近发布的会话 |
典型工作流程
# During a session — automatic (hook fires) or manual:
capture_activity(session_id="abc123", conversation_context="Built JWT auth middleware...")
# When done:
complete_session(session_id="abc123", final_notes="Ended up using RS256 instead of HS256 because...")
# Later, someone else starting similar work:
search_memories(query="JWT authentication middleware Node.js")MongoDB Atlas 设置
服务器在启动时会自动创建自己的索引,包括 Atlas 向量搜索索引(memories_vector_index,1024 维,余弦相似度,voyage-code-4)。你需要一个启用了向量搜索的 Atlas 集群。
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
One searchable history across every AI coding tool, with secret scanning and a shared task board.
- vibsyncOAuthcom.vibsync
One shared brain for your AI coding agents: team memory, agent Q&A, tasks, and file claims.
Shared project memory that keeps teammates and AI agents aligned across sessions.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAutomatically extracts technical concepts from AI coding conversations, organizes them into a searchable knowledge base with hierarchy and categories, and links them to specific locations in your codebase.-
- AlicenseNot gradedqualityBmaintenanceProvides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.MIT
- AlicenseAqualityCmaintenanceEnables cross-session memory and recall for AI coding assistants through a git-synced knowledge base, hybrid semantic and TF-IDF search across tool transcripts, and automatic distillation of insights with secrets scrubbing.6181 npm18MIT
- AlicenseAqualityBmaintenanceEnables teams to capture and distill knowledge from sessions, meetings, and feeds into a searchable, vector-embedded graph, then retrieve or synthesize it conversationally via semantic search and citations.1724Apache 2.0