promem-mcp
Promem-MCP
Project Memory MCP — AI编码代理的持久化项目上下文。由 DIP-RO 构建。
pip install promem-mcp无需数据库。无需云端。无需守护进程。无需手动管理内存。
ContextMCP 是一个本地优先、原生 MCP 的上下文运行时,为 AI 编码代理提供持久的项目理解——包括架构、规则、决策、约定、环境智能以及 Git 上下文——无需重复解释或浪费上下文。
快速开始
pip install promem-mcp然后向你的 AI 编码客户端注册 ContextMCP:
# See which clients are detected
promem config
# Auto-configure a specific client (with backup + merge)
promem config cursor
promem config claude-code
promem config claude-desktop
promem config vscode或手动添加到客户端的 MCP 配置中:
{
"mcpServers": {
"contextmcp": {
"command": "contextmcp",
"args": []
}
}
}VS Code 提示: VS Code 使用
"servers"键,而不是"mcpServers"。运行promem config vscode获取正确格式。
就这样。你的 AI 编码代理现在拥有了持久化的项目上下文。
工作原理
特性
零配置存储 — SQLite 数据库自动创建在操作系统合适的目录中
自动项目检测 — 语言、框架、包管理器、测试框架
持久化记忆 — 规则、决策、约定、环境事实、Git 智能
Token 高效检索 — 基于 FTS5 搜索与 token 预算,仅返回相关上下文
来源追踪 — 每条记忆都知道来源及置信度
机密信息脱敏 — API 密钥、令牌、密码永不存储或返回
项目隔离 — 项目记忆不会跨项目泄露
过期上下文检测 — 标记与当前项目状态冲突的记忆
矛盾检测 — 识别冲突的项目规则
会话连续性 — 用于切换代理/会话的交接摘要
Git 智能 — 最近的提交、变更文件、TODO/FIXME
环境诊断 — Python 版本、虚拟环境、.env 完整性、Docker
本地优先 — 无网络请求、无云端、无外部服务
MCP 工具
工具 | 描述 |
| 使用 token 预算搜索持久化项目上下文 |
| 根据 ID 获取特定记忆 |
| 保存一条记忆、决策、规则或事实 |
| 更新现有记忆 |
| 删除一条记忆 |
| 获取当前项目信息 |
| 获取所有项目规则和约定 |
| 获取所有技术/架构决策 |
| 获取最近的记忆和最新会话 |
| 获取 Git 智能信息 |
| 获取环境智能信息 |
| 运行环境诊断 |
| 获取用于交接的紧凑项目摘要 |
CLI
contextmcp --version # Version
promem status # Project + storage status
promem doctor # Health checks
promem stats # Usage statistics
promem search "query" # Search context
promem memory list # List memories
promem decision "text" # Save a decision
promem privacy # Privacy info
promem config # Client configuration
promem repair # Rebuild index, optimize DB
promem reset # Delete all data (with confirmation)客户端支持
客户端 | 自动配置? | 配置键 |
Claude Code |
|
|
Claude Desktop |
|
|
Cursor |
|
|
VS Code / Copilot |
|
|
OpenCode |
|
|
Gemini CLI |
|
|
Windsurf |
|
|
Cline |
|
|
Roo Code |
|
|
Amazon Q |
|
|
ZCode (GLM/Zhipu) |
|
|
Tabnine |
|
|
没有客户端支持真正的零配置自动注册。ContextMCP 会检测已安装的客户端,提供写入配置的选项(带备份+合并),并提供精确的复制粘贴片段。
隐私
仅本地 — 无网络请求
不上传项目内容
机密信息脱敏 — 永不存储或返回
无云端依赖
promem privacy存储位置
ContextMCP 使用项目本地存储 — 无集中式操作系统目录,无空间浪费。
位置 | 路径 |
项目本地(默认) |
|
每个项目拥有自己的 .contextmcp/contextmcp.db。存储随项目移动。无全局存储膨胀。
将 .contextmcp/ 添加到你的 .gitignore 中(ContextMCP 的忽略模式默认已包含)。
如需覆盖,可使用 CONTEXTMCP_DATA_DIR 环境变量。
安装
# pip
pip install promem-mcp
# uv
uv add contextmcp
# pipx (global CLI)
pipx install contextmcp适用于 venv、virtualenv、uv、pipx 以及系统 Python。
开发
git clone https://github.com/contextmcp/contextmcp.git
cd contextmcp
pip install -e ".[dev]"
pytest许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The project brain for AI coding agents — memory, decisions, sprints, knowledge base via MCP.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DIP-RO/MCP_Package'
If you have feedback or need assistance with the MCP directory API, please join our Discord server