模型上下文协议服务器

MCP (Model Context Protocol) 服务器为AI代理提供持久化记忆功能,支持多种工具和资源,适用于Claude Desktop、Cursor等客户端。

  • by heybeaux
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 heybeaux/engram-mcp

使用说明

@openingram/mcp

MCP(模型上下文协议)服务器 记忆印迹 --AI代理的持久内存。适用于Claude Desktop、Cursor和任何MCP客户端。

特性

  • 6工具: engram_remember, engram_recall, engram_search, engram_forget, engram_context, engram_observe
  • 2资源: engram://stats, engram://context
  • 1提示: memory-aware-chat
  • 安全:远程后端的输入验证、速率限制、TLS强制
  • 离线弹性:当Engram无法访问时,性能会下降
  • 零磁盘占用:无状态代理--在本地不存储任何内容

快速开始

1.安装

npm install -g @openengram/mcp

2.配置克劳德桌面

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:

Cloud(适用于任何地方——推荐):

{
  "mcpServers": {
    "engram": {
      "command": "engram-mcp",
      "env": {
        "ENGRAM_API_URL": "https://api.openengram.ai",
        "ENGRAM_API_KEY": "your_api_key",
        "ENGRAM_USER_ID": "your_user_id"
      }
    }
  }
}

自托管(本地网络):

{
  "mcpServers": {
    "engram": {
      "command": "engram-mcp",
      "env": {
        "ENGRAM_API_URL": "http://localhost:3001",
        "ENGRAM_API_KEY": "your_api_key",
        "ENGRAM_USER_ID": "your_user_id"
      }
    }
  }
}

3.重新启动克劳德桌面

退出并重新打开Claude Desktop。您应该在聊天输入中看到可用的Engram工具。

环境变量

变量 必填 默认 描述
ENGRAM_API_KEY ✅ — 您的Engram API密钥(eng_ 前缀)
ENGRAM_USER_ID ❌ Beaux 用户命名空间ID
ENGRAM_API_URL ❌ https://api.openengram.ai 工程师API URL
ENGRAM_BASE_URL ❌ — 别名为 ENGRAM_API_URL
ENGRAM_TIMEOUT_MS ❌ 10000 请求超时(ms)
ENGRAM_LOG_LEVEL ❌ warn debug / info / warn / error
ENGRAM_MAX_RETRIES ❌ 2 瞬态故障的重试次数
ENGRAM_ALLOW_HTTP ❌ false 允许非本地主机HTTP(仅限开发人员)

工具

工具 说明
engram_remember 存储具有可选图层、重要性和标签的内存
engram_recall 在具有相关性得分的记忆中进行语义搜索
engram_search 实体/图形感知搜索
engram_forget 按ID删除内存
engram_context 生成LLM优化的上下文窗口
engram_observe 自动从文本中提取和存储记忆

发展

git clone https://github.com/heybeaux/engram-mcp.git
cd engram-mcp
npm install
npm run build

# Run locally
ENGRAM_API_KEY=your_key ENGRAM_USER_ID=dev npm run dev

链接

许可证

麻省理工学院