Skip to main content

Claude Desktop 中的 MCP

2 分钟把 Synapse 接入 Claude Desktop。Claude 原生获得 79 个 Synapse 工具。


Claude Desktop 中的 MCP

Claude Desktop 是 Anthropic 推出的 macOS 与 Windows 桌面应用。配置 Synapse MCP Server 后,Claude 原生获得全部 79 个 Synapse 工具的访问权限 — 它可以存储记忆、回放记忆、管理任务、与你聊天等等。

前置条件

  • Claude Desktop 应用(macOS 或 Windows)
  • 已安装 Node.js 18+(node --version
  • 你的 Synapse Mind Key

第 1 步:打开配置文件

  • macOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows%APPDATA%\Claude\claude_desktop_config.json

如果文件不存在,请创建。

第 2 步:添加 Synapse MCP Server

{
  "mcpServers": {
    "synapse": {
      "command": "npx",
      "args": ["-y", "synapse-mcp-api@latest"],
      "env": {
        "SYNAPSE_MIND_KEY": "mk_YOUR_MIND_KEY_HERE",
        "SYNAPSE_URL": "https://synapse.schaefer.zone"
      }
    }
  }
}
如果你已经配置了其他 MCP Server,只需把 `"synapse"` 块添加到已有的 `"mcpServers"` 对象内。

第 3 步:重启 Claude Desktop

  1. 完全退出 Claude Desktop(macOS 上 Cmd+Q,而非只关窗口)
  2. 重新打开 Claude Desktop
  3. 开启新聊天
  4. 查看左下角的 🔌 插头图标 — 应显示 “79 tools”

第 4 步:测试

在新聊天中输入:

memory_recall aufrufen

Claude 应该调用 memory_recall 工具,并返回已存储记忆的摘要(如果 Mind 为空则返回 “No memories yet”)。

可用工具(部分)

工具 说明
memory_recall 回放所有记忆
memory_store 存储新记忆
memory_search 搜索记忆
task_list 列出任务
task_create 创建任务
chat_poll 检查新消息
chat_reply 回复消息
browser_new 打开浏览器标签页
computer_list 列出已注册计算机

完整列表:MCP 是什么?

故障排查

Claude Desktop 中没有工具出现

  1. 验证 Node.js 版本:node --version(必须 ≥ 18)
  2. 检查配置文件是否为有效 JSON(无尾随逗号)
  3. 完全重启 Claude Desktop(Cmd+Q,而非只关窗口)
  4. 查看 Claude Desktop 日志:~/Library/Logs/Claude/mcp.log(macOS)

“Mind Key invalid” 错误

  • 确认 SYNAPSE_MIND_KEYmk_ 开头
  • 通过 POST /minds 获取新 key(需要 /login 的 JWT)
  • JSON 中 key 不要加引号

npx 未找到

  • 安装 Node.js 18+:https://nodejs.org/
  • 安装后重启终端
  • macOS 用 Homebrew:brew install node

工具出现但调用失败

  • 检查 SYNAPSE_URL 是否可达:curl https://synapse.schaefer.zone/health
  • 验证 Mind Key 可用:curl -H "Authorization: Bearer mk_..." https://synapse.schaefer.zone/memory/recall
  • 参见 MCP 故障排查

工具配置文件(节省 tokens)

如果你使用较小的 LLM 或想节省上下文 tokens,设置工具配置文件:

{
  "mcpServers": {
    "synapse": {
      "command": "npx",
      "args": ["-y", "synapse-mcp-api@latest"],
      "env": {
        "SYNAPSE_MIND_KEY": "mk_...",
        "SYNAPSE_URL": "https://synapse.schaefer.zone",
        "MCP_PROFILE": "standard"
      }
    }
  }
}

配置文件:minimal(8 个工具)、standard(25)、full(119,默认)。

下一步