deep-thinker
deep-thinker
先进的认知思维 MCP 服务器,具有基于 DAG(有向无环图)的思维图谱、多种推理策略、元认知和自我评估功能。
这是对 sequential-thinking MCP 的重大演进,提供了基于图谱思维管理的结构化深度推理。
特性
基于 DAG 的思维图谱 — 思维形成一个有向无环图,支持分支、合并和交叉边(不仅仅是线性链)
5 种推理策略 — 顺序推理、辩证推理(正题→反题→合题)、并行推理、类比推理、溯因推理(推导至最佳解释)
置信度评分 — 多因素置信度评估,支持支撑/矛盾分析、深度惩罚和知识整合提升
自我批判 — 自动生成带有严重程度等级和置信度调整的批判意见
元认知引擎 — 检测停滞状态、停滞不前、置信度下降;建议策略切换和纠正措施
知识整合 — 将外部知识附加到思维中,检测知识缺口,验证跨来源的一致性
思维剪枝 — 死胡同检测、冗余删除、消除深度无效分支、路径优化
安装
全局安装
npm install -g deep-thinkernpx (无需安装)
npx deep-thinkerMCP 配置
Claude Desktop
添加到你的 claude_desktop_config.json:
{
"mcpServers": {
"deep-thinker": {
"command": "npx",
"args": ["-y", "deep-thinker"]
}
}
}或者如果已全局安装:
{
"mcpServers": {
"deep-thinker": {
"command": "deep-thinker"
}
}
}其他 MCP 客户端
该服务器通过 stdio 进行通信。将你的 MCP 客户端指向 deep-thinker 命令或 node path/to/dist/index.js。
工具
think
使用推理策略向认知图谱添加一个思维。
参数:
参数 | 类型 | 必需 | 描述 |
| string | 是 | 思维内容 |
| string | 否 | 思维类型: |
| string | 否 | 策略: |
| number | 否 | 初始置信度 0-1 (默认: 0.5) |
| string | 否 | 父节点 ID (默认: 最后一个叶子节点) |
| string | 否 | 用于并行探索的分支名称 |
| string[] | 否 | 分类标签 |
| object | 否 | 显式边: |
| object | 否 | 辩证模式: |
| array | 否 | 并行模式: |
| object | 否 | 类比模式: |
| object | 否 | 溯因模式: |
| object | 否 | 附加知识: |
策略详情:
Sequential (顺序) — 线性链:每个思维都源自前一个思维
Dialectic (辩证) — 正题 → 反题 → 合题模式,用于解决矛盾
Parallel (并行) — 同时探索多个独立分支
Analogical (类比) — 将已知领域的模式映射到当前问题
Abductive (溯因) — 生成假设并推导出最佳解释
边类型: derives_from(源自), contradicts(矛盾), supports(支持), refines(细化), challenges(挑战), synthesizes(综合), parallels(平行), abstracts(抽象), instantiates(实例化)
evaluate
通过置信度评分、批判和图谱健康分析来评估思维过程。
参数:
参数 | 类型 | 必需 | 描述 |
| string | 否 | 要评估的特定节点 (默认: 整个图谱) |
| boolean | 否 | 生成自我批判 (默认: true) |
| boolean | 否 | 查找知识缺口 (默认: false) |
| boolean | 否 | 验证知识一致性 (默认: false) |
metacog
元认知操作 — 监控和控制思维过程。
参数:
参数 | 类型 | 必需 | 描述 |
| string | 是 |
|
| string | 否 | 新策略 (用于 |
| string | 否 | 切换原因 (用于 |
元认知引擎会自动:
检测停滞(置信度未提升)
检测置信度下降趋势
检测过多的矛盾
建议策略切换、剪枝、回溯或得出结论
graph
查询和可视化思维图谱。
参数:
参数 | 类型 | 必需 | 描述 |
| string | 是 |
|
| string | 否 | 节点 ID (用于 |
| string | 否 | 目标 ID (用于 |
prune
剪枝并优化思维图谱。
参数:
参数 | 类型 | 必需 | 描述 |
| string | 是 |
|
| string | 否 | 要剪枝的节点 (用于 |
| string | 否 | 原因 (用于 |
reset
重置思维图谱并开始新的会话。
参数:
参数 | 类型 | 必需 | 描述 |
| string | 否 | 新的问题陈述 |
使用示例
顺序推理
think: "Should we use microservices?" → type: question, confidence: 0.9
think: "Monolith has deployment bottlenecks" → type: analysis, confidence: 0.7
think: "Team lacks DevOps capacity for microservices" → type: evidence, confidence: 0.8
evaluate: → overall confidence 0.73
metacog: auto_update → strategy: sequential, progress: normal辩证推理
think: {
strategy: "dialectic",
dialectic: {
thesis: "Microservices improve scalability",
antithesis: "But add operational complexity",
synthesis: "Use modular monolith as middle ground"
},
confidence: 0.75
}并行探索
think: {
strategy: "parallel",
parallel: [
{ content: "Team expertise in Docker/K8s", type: "evidence", confidence: 0.8 },
{ content: "Limited DevOps capacity", type: "evidence", confidence: 0.6 },
{ content: "Budget allows hiring", type: "evidence", confidence: 0.4 }
]
}溯因推理
think: {
strategy: "abductive",
abductive: {
observation: "The grass is wet",
explanations: [
{ content: "It rained", plausibility: 0.8 },
{ content: "Sprinklers were on", plausibility: 0.6 }
],
bestExplanation: "It rained"
},
confidence: 0.8
}元认知指导
metacog: { action: "auto_update" }
→ ⚠ Stuck: confidence has not improved for 3 steps
→ 💡 Action: [switch_strategy] Try parallel exploration
→ Suggested Strategy: parallel
metacog: { action: "switch", strategy: "parallel", reason: "Break through impasse" }
→ Strategy switched: sequential → parallel剪枝
prune: { action: "analyze" }
→ Dead Ends: 2
[thought_7] confidence=0.15: Bad idea...
[thought_9] confidence=0.10: Another dead end...
→ Redundant Branch Groups: 1
Keep [thought_5], prune [thought_6]: Redundant analysis...
→ Total prunable: 3 node(s)
prune: { action: "prune" }
→ Pruned 3 node(s) in 3 operations架构
src/
├── index.ts MCP server & tool handlers
└── core/
├── types.ts Type definitions & constants
├── node.ts ThoughtNode CRUD operations
├── graph.ts DAG-based thought graph
├── strategies.ts 5 reasoning strategy implementations
├── scorer.ts Confidence scoring & self-critique
├── metacog.ts Metacognitive engine
├── knowledge.ts Knowledge integration & validation
└── pruner.ts Dead-end/redundancy detection & pruning与 sequential-thinking 的比较
特性 | sequential-thinking | deep-thinker |
思维结构 | 线性链 | DAG (分支/合并/交叉边) |
策略 | 仅顺序 | 5 种策略 (顺序、辩证、并行、类比、溯因) |
置信度 | 基本思维编号 | 带有趋势分析的多因素评分 |
自我批判 | 无 | 自动生成,带有严重程度等级 |
元认知 | 无 | 停滞检测、策略建议、自动切换 |
知识 | 无 | 外部引用、缺口检测、一致性验证 |
剪枝 | 无 | 死胡同、冗余、路径优化 |
图谱查询 | 线性回顾 | 可视化、最佳路径、分支分析、统计 |
开发
git clone https://github.com/hubinoretros/deep-thinker.git
cd deep-thinker
npm install
npm run build
npm start许可证
MIT
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hubinoretros/deep-thinker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server