# KeepThinking MCP 多客户端配置指南

KeepThinking 的 MCP Server 基于标准 JSON-RPC 2.0 协议，兼容所有支持 MCP 的 AI 工具。一个记忆库，所有 AI 共享。

## 安装 KeepThinking

```bash
curl -sL https://keepthinking.vip/install | bash
```

安装后 MCP Server 路径：`~/.keepthinking/mcp/server.js`

---

## Claude Desktop

1. 打开 Claude Desktop
2. 菜单 → Settings → Developer → Edit Config
3. 编辑 `claude_desktop_config.json`：

```json
{
  "mcpServers": {
    "keepthinking": {
      "command": "node",
      "args": ["~/.keepthinking/mcp/server.js"]
    }
  }
}
```

4. 重启 Claude Desktop
5. 对话中点击 🔌 图标，确认 KeepThinking 已连接
6. 可用工具：`search_memory`、`get_context`、`list_projects`、`cognitive_graph`、`engine_status`

配置文件路径：
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

---

## Cursor

1. 在项目根目录创建 `.cursor/mcp.json`：

```json
{
  "mcpServers": {
    "keepthinking": {
      "command": "node",
      "args": ["~/.keepthinking/mcp/server.js"]
    }
  }
}
```

2. Cursor → Settings → MCP → 确认 KeepThinking 加载
3. 或直接在 Cursor 设置 → MCP Servers → 添加：Command: `node`, Args: `~/.keepthinking/mcp/server.js`

---

## VS Code + Cline

1. 安装 Cline 扩展
2. Cline 设置 → MCP Servers → 添加

```
Name: keepthinking
Type: stdio
Command: node
Args: ~/.keepthinking/mcp/server.js
```

3. 重启 Cline 即可使用

---

## Windsurf

1. 项目根目录创建 `.windsurf/mcp.json`，内容同上
2. 或 Windsurf Settings → MCP → 添加 stdio server

---

## 验证

安装后在终端测试：

```bash
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node ~/.keepthinking/mcp/server.js
```

预期返回 5 个工具：`search_memory`、`get_context`、`list_projects`、`cognitive_graph`、`engine_status`

---

## 后续规划

- [ ] VSCode 扩展（一键安装，无需手动配置）
- [ ] 本地 Embedding 语义搜索（WASM，完全本地）
- [ ] Git 自动集成（commit 历史纳入认知图谱）
- [ ] 团队局域网共享认知记忆
