mcpField
T
Thinking Partner MCP

Thinking Partner MCP

本地服务
github.com/nwant记忆与知识073 周前更新

关于 Thinking Partner MCP

Thinking Partner MCP 是一个本地 MCP 服务,为 Claude Desktop 和 Claude Code 保存并共享设计讨论与编码发现。它通过持久化上下文、决策记录和会话衔接,让架构思考与实现工作能够跨会话延续。

主要功能

  1. 01跨 Claude Desktop 与 Claude Code 共享上下文
  2. 02记录设计决策及推理
  3. 03记录编码实现发现
  4. 04衔接对话并传递未决问题
  5. 05持久化本地上下文并支持 Git 同步

适用场景

  1. 01在 Claude Desktop 记录架构选择
  2. 02在 Claude Code 获取设计背景并记录实现发现
  3. 03将编码中的问题带回后续设计讨论
  4. 04通过 Git 在多台机器间同步上下文

MCP 相关

它是本地 MCP 服务,提供设置焦点、获取上下文、记录决策与发现、衔接对话等工具,供 Claude Desktop 和 Claude Code 使用。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"thinking-partner": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-thinking-partner"
]
}
}
}
启动命令npx -y @modelcontextprotocol/server-thinking-partner

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@modelcontextprotocol/server-thinking-partner

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

思考伙伴 MCP

一个 Model Context Protocol(MCP)服务,可在 Claude Desktop 和 Claude Code 之间创建统一的 AI 思考伙伴。这让架构思考与实现工作之间能够无缝共享上下文并保持对话连贯性。

快速入门

# Install dependencies
npm install

# Test the server
npm test

# Configure Claude Desktop
npm run setup-desktop

# Configure Claude Code  
npm run setup-code

# Start development server
npm run dev

神奇的工作流

上午设计会议(Claude Desktop)
  1. 设定重点:「我正在设计身份验证系统」
  2. 架构讨论:探索方案并做出决策
  3. 自动记录:记录设计决策及其理由
实现阶段(Claude Code)
  1. 自动获取上下文:代码工具了解你的架构决策
  2. 发现实现问题:编码时记录发现
  3. 反馈循环:实现过程中的见解为后续设计提供参考
次日(任一工具)
  • 完整延续:两个工具都记得你的推理过程
  • 问题串联:未解决的问题可延续到后续会话
  • 模式识别:逐步积累长期知识

可用工具

set_focus

设置你当前正在处理的事项,并在两个工具之间共享

{
  "topic": "user authentication refactor",
  "context": "exploring JWT vs sessions",
  "tool": "desktop"
}
get_context

获取与当前对话相关的上下文

{
  "tool": "code",
  "scope": "current"
}
log_design_decision

记录在 Desktop 中做出的架构决策

{
  "decision": "Use JWT with refresh tokens",
  "reasoning": "Better for distributed architecture",
  "alternatives": ["session cookies", "OAuth only"]
}
log_implementation_finding

记录编码过程中发现的问题

{
  "finding": "JWT library requires specific token structure",
  "code_context": "auth/token.js - jwt.sign() options"
}
bridge_conversation

连接 Desktop 和 Code 之间的对话

{
  "from_tool": "desktop",
  "to_tool": "code", 
  "summary": "Decided on JWT approach",
  "open_questions": ["How to handle token rotation?"]
}

项目结构

thinking-partner-mcp/
├── src/
│   ├── index.js          # Main MCP server
│   ├── storage.js        # JSON persistence layer  
│   └── tools.js          # Tool implementations
├── scripts/
│   ├── setup-desktop.js  # Claude Desktop config
│   ├── setup-code.js     # Claude Code config
│   └── test-server.js    # Server testing
├── data/
│   └── context.json      # Persistent context storage
└── package.json

配置

设置脚本会自动配置 Claude Desktop 和 Claude Code,以使用此 MCP 服务。服务在本地运行,并在 data/context.json 中持久保存上下文。

Git 同步配置

服务支持自动 Git 同步,可在多台机器之间共享上下文:

# Copy example environment file
cp .env.example .env

# Edit .env to add your Git repository
[email protected]:yourusername/thinking-partner-data.git

环境变量:

  • THINKING_PARTNER_GIT_SYNC:启用或禁用 Git 同步(默认:true)
  • THINKING_PARTNER_AUTO_SYNC:启用或禁用保存时自动同步(默认:true)
  • THINKING_PARTNER_GIT_REMOTE:用于同步数据的 Git 仓库 URL

服务将自动:

  • 在数据目录中初始化 Git 仓库
  • 读取上下文数据前先拉取
  • 保存更改后提交并推送
  • 通过保留最新数据来处理合并冲突

使用示例

Desktop 会话:

User: "I'm designing a new API authentication system"
Claude: *sets focus and begins architectural discussion*
User: "Let's go with JWT tokens"
Claude: *logs decision with reasoning*

Code 会话:

$ claude-code
Claude: "I see you're implementing the JWT auth system we designed. 
        The decision was based on distributed architecture needs..."
User: "I'm having trouble with token refresh"
Claude: *implementation-focused help*
*logs discovery about refresh token complexity*

次日 Desktop 会话:

Claude: "I notice from your implementation work that JWT refresh 
        tokens were more complex than expected. Should we 
        reconsider the architectural approach?"

基础理念

此工具创建了一种全新的协作思考模式,让 AI 成为你反思过程的延伸。你不再进行彼此孤立的工具交互,而是展开持续的对话,随着时间推移不断加深理解。

真正的力量不在于单项功能,而在于持续使用过程中逐渐形成的认知伙伴关系。

开发

# Start with file watching
npm run dev

# Test the server 
npm test

# View current context
cat data/context.json | jq .

扩展

模块化设计让你可以轻松添加新工具、资源,或集成其他 AI 平台。随着上下文不断增长,还可以增强存储层,以支持更强大的持久化或搜索功能。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。