zhicun2-mcp
v0.3.2
Published
智存 2.0 MCP — 阻塞等待用户在 Cursor 扩展侧边栏中交互
Downloads
23
Maintainers
Readme
zhicun2-mcp
智存 2.0 的 MCP 服务:AI 通过 zhi 工具在扩展侧边栏与用户交互,并阻塞等待回复。
需配合 智存 2.0 Cursor 扩展(.vsix)使用。
安装(给最终用户)
1. 安装扩展
Cursor → 扩展 → ... → 从 VSIX 安装… → 选择 zhicun2-x.x.x.vsix
2. 配置 MCP
在 ~/.cursor/mcp.json(Windows: C:\Users\<用户名>\.cursor\mcp.json)或项目 .cursor/mcp.json 中加入:
{
"mcpServers": {
"zhicun2": {
"command": "npx",
"args": ["-y", "zhicun2-mcp"],
"env": {
"ZHICUN2_WORKSPACE": "${workspaceFolder}"
}
}
}
}3. 重载 Cursor
Developer: Reload Window,确认 MCP 面板中 zhicun2 已连接。
4. 验证
让 Agent 调用 ping,应返回 ✅ 智存扩展在线。
环境变量(可选)
| 变量 | 说明 |
|------|------|
| ZHICUN2_WORKSPACE | 当前工作区路径,多窗口时路由到对应扩展(推荐 ${workspaceFolder}) |
| ZHICUN2_PORT | 强制指定扩展 HTTP 端口 |
| ZHICUN2_WINDOW_ID | 强制指定 Cursor 窗口 ID |
工具
zhi— 向侧边栏发消息并阻塞等待用户回复ping— 检测扩展是否在线mem_read/mem_write— 读写工作区.zhicun2/memory/
开发
npm install
npm run build
npm publish # 需 npm 登录