KeepThinking — AI 的第二大脑。全球唯一跨平台本地 AI 记忆引擎。开源、免费、零上传。
打开终端,粘贴下面一行:
curl -sL https://keepthinking.vip/install | bash
支持 macOS / Linux,需 Node.js ≥ 18。安装后浏览器访问 localhost:3456 进入 Web 控制台。
# 停止服务
systemctl --user stop keepthinking
# 删除所有文件和记忆数据
rm -rf ~/.keepthinking
rm -f ~/.config/systemd/user/keepthinking.service
KeepThinking MCP Server 基于标准 JSON-RPC 2.0 协议。一份记忆,所有 AI 工具共享。
详细配置指南:MCP_SETUP.md
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"keepthinking": {
"command": "node",
"args": ["~/.keepthinking/mcp/server.js"]
}
}
}
// 项目根目录 .cursor/mcp.json
{
"mcpServers": {
"keepthinking": {
"command": "node",
"args": ["~/.keepthinking/mcp/server.js"]
}
}
}
Cline 设置 → MCP Servers → 添加 stdio server:Name keepthinking,Command node,Args ~/.keepthinking/mcp/server.js
项目根目录创建 .windsurf/mcp.json,内容同 Cursor。
| 工具 | 功能 |
|---|---|
| search_memory | 关键词搜索认知图谱和历史决策 |
| search_semantic | 本地 AI 语义向量搜索——理解含义 |
| get_context | 获取完整项目上下文(认知图谱+Git信息) |
| list_projects | 列出所有已知项目及统计 |
| cognitive_graph | 返回完整认知图谱(节点+边) |
| engine_status | 引擎健康状态:节点数、磁盘、内存 |
安装后浏览器访问 http://localhost:3456:
所有 API 仅监听 127.0.0.1:3456,不对外暴露。
| 端点 | 说明 |
|---|---|
| GET /api/health | 健康检查 |
| GET /api/stats | 引擎统计(节点/边/磁盘/内存) |
| GET /api/projects | 项目列表 |
| GET /api/context?project=xxx | 项目上下文 |
| GET /api/search?q=xxx&max=10 | 关键词搜索 |
| GET /api/search/semantic?q=xxx&max=10 | 语义搜索 |
| GET /api/graph?project=xxx | 认知图谱 |
~/.keepthinking/memory/~/.keepthinking/
├── memory/
│ ├── graph.json # 认知图谱(节点+边)
│ ├── experiences.json # 任务经验记录
│ ├── decisions.json # 决策记录
│ └── embed_cache.json # 语义向量缓存
├── mcp/
│ └── server.js # MCP stdio server
├── server/
│ └── server.js # HTTP 控制台服务
└── web/
└── console.html # Web 管理界面