Deep Thinker について
Deep Thinker は、思考を有向非巡回グラフで管理する構造化推論向け MCP サーバーです。複雑な問題を分析し、推論過程を確認したいエージェント向けに、複数の戦略、評価、セッション再開機能を備えています。
主な機能
- 01有向非巡回グラフで思考を整理
- 0210 種類の推論戦略
- 03確信度の評価と自己批評
- 04停滞の検出と戦略変更の提案
- 05推論セッションの保存と再開
- 06思考グラフの検索、枝刈り、最適化
活用シーン
- 01アーキテクチャ案と根拠の比較
- 02障害の原因候補の調査
- 03選択肢、リスク、判断への影響の評価
- 04保存済みの分析セッションの再開
MCP 対応
推論とグラフ管理を行う 17 個のツールを MCP クライアントに公開します。思考、評価、メタ認知による監視、グラフ検索に対応し、構造化された応答で次の操作も提案します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
17掲載時のツール一覧 · 3 週間前に更新
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
| content | string | はい | 思考の内容 |
| type | enum | いいえ | 思考の種類(デフォルト:analysis)hypothesis | analysis | evidence | conclusion | question | assumption | insight | critique | synthesis | observation |
| strategy | enum | いいえ | 使用する推論戦略(デフォルト:メタ認知の現在の戦略)。戦略を自動選択するには 'auto' を使用します。新しい戦略:first_principles=基本原理への分解、counterfactual=反実仮想分析、systems_thinking=フィードバックループとレバレッジポイント、mcts=最適化のためのモンテカルロ木探索sequential | dialectic | parallel | analogical | abductive | first_principles | counterfactual | systems_thinking | mcts | auto |
| confidence | number | いいえ | この思考の初期確信度。範囲は0~1(デフォルト:0.5) |
| parentId | string | いいえ | 接続する親思考のID(デフォルト:最後にアクティブだったリーフ) |
| branch | string | いいえ | 並列探索に使用するブランチ名(デフォルト:main) |
| tags | array | いいえ | 思考を分類するためのタグ |
| edgeTo | object | いいえ | 別のノードへの明示的なエッジを作成します |
| edgeTo.targetId | string | いいえ | ターゲットノード ID |
| edgeTo.type | enum | いいえ | エッジの種類derives_from | contradicts | supports | refines | challenges | synthesizes | parallels | abstracts | instantiates |
| dialectic | object | いいえ | 弁証法モード:thesisを指定します(antithesis/synthesisは任意)。 |
| dialectic.thesis | string | いいえ | テーゼ/命題 |
| dialectic.antithesis | string | いいえ | 対立する見解(任意) |
| dialectic.synthesis | string | いいえ | 統合案(任意) |
| parallel | array | いいえ | 並列モード:複数の独立した思考を同時に探索します |
| analogical | object | いいえ | 類推モード:元の領域、対応関係、導き出される結論 |
| analogical.sourceDomain | string | いいえ | 類推の基にする既知の領域 |
| analogical.mapping | string | いいえ | 各領域間の対応関係 |
| analogical.projectedConclusion | string | いいえ | 類推から導かれる結論 |
| abductive | object | いいえ | アブダクションモード:観察結果、考えられる説明、最良の説明 |
| abductive.observation | string | いいえ | 説明する対象となる観察結果 |
| abductive.explanations | array | いいえ | 考えられる説明とその妥当性スコア |
| abductive.bestExplanation | string | いいえ | 最良の説明(決定している場合) |
| firstPrinciples | object | いいえ | 第一原理モード:問題を基本的な真理に分解し、再構築します |
| firstPrinciples.problem | string | いいえ | 分解する問題(デフォルト:コンテンツを使用) |
| firstPrinciples.assumptions | array | いいえ | 検証すべき前提 |
| firstPrinciples.depth | number | いいえ | 分解の深さ(デフォルト:3) |
| firstPrinciples.domain | string | いいえ | 任意の領域コンテキスト(例:'physics'、'economics') |
| counterfactual | object | いいえ | 反実仮想モード:仮定のシナリオとその波及効果を分析します |
| counterfactual.currentState | string | いいえ | 現在の状態の説明(デフォルト:コンテンツを使用) |
| counterfactual.variablesToChange | array | はい | 仮定のシナリオで変更する変数 |
| counterfactual.timeHorizon | enum | いいえ | 影響の時間的範囲immediate | short_term | medium_term | long_term |
| counterfactual.rippleDepth | number | いいえ | 波及効果の段階数(デフォルト:3) |
| systemsThinking | object | いいえ | システム思考モード:フィードバックループとレバレッジポイントを分析します |
| systemsThinking.systemDescription | string | いいえ | システムの説明(デフォルトではコンテンツを使用) |
| systemsThinking.boundaries | array | いいえ | システム境界 |
| systemsThinking.components | array | はい | システムコンポーネント(2 つ以上必要) |
| systemsThinking.timeScale | enum | いいえ | 分析時間スケールimmediate | short_term | medium_term | long_term |
| systemsThinking.focusArea | enum | いいえ | 分析の焦点feedback_loops | leverage_points | emergence | resilience | all |
| mcts | object | いいえ | MCTS モード:最適な経路を選択するモンテカルロ木探索 |
| mcts.problem | string | いいえ | 解決する問題(デフォルトではコンテンツを使用) |
| mcts.possibleActions | array | はい | 評価するアクション候補(2 つ以上) |
| mcts.simulationDepth | number | いいえ | シミュレーションの深さ(デフォルト:5) |
| mcts.numSimulations | number | いいえ | シミュレーション回数(デフォルト:100) |
| mcts.explorationConstant | number | いいえ | UCB1 探索定数(デフォルト:1.414) |
| mcts.pruningThreshold | number | いいえ | 枝刈りしきい値(デフォルト:0.2) |
| knowledge | object | いいえ | この思考に外部知識を添付します |
| knowledge.source | string | いいえ | 知識のソース |
| knowledge.content | string | いいえ | 知識の内容 |
| knowledge.relevance | number | いいえ | この思考との関連性(0-1) |
詳細
deep-thinker
DAG ベースの思考グラフ、10 種類の推論戦略(自動選択を含む)、17 個のツール、ノードエイリアス、セッション永続化、構造化レスポンス、インテリジェントなエラー処理を備えた、高度な認知的思考を実現する MCP サーバーです。
sequential-thinking MCP を大きく進化させ、グラフベースの思考管理、スキーマ検証、インテリジェントな戦略選択により、構造化された深い推論を実現します。
クイックスタート
npx deep-thinker
{
"mcpServers": {
"deep-thinker": {
"command": "npx",
"args": ["-y", "deep-thinker"]
}
}
}
使用例
| 例 | 戦略 | ユースケース |
|---|---|---|
| アーキテクチャの意思決定 | 弁証法 + 並列 | モノリスとマイクロサービスの比較 |
| デバッグインシデント | アブダクション | 本番環境での 500 エラー |
| 機能の優先順位付け | 並列 + 弁証法 | 第 3 四半期のロードマップ策定 |
| 科学的仮説 | 類推 + アブダクション | CRISPR 向け LNP デリバリー |
| 行き詰まりの打開 | メタ認知的な切り替え | サーバーレスのコスト分析 |
機能
- DAG ベースの思考グラフ — 思考は、分岐、マージ、クロスエッジを含む有向非巡回グラフを形成します(単なる線形チェーンではありません)
- 10 種類の推論戦略 — 順次、弁証法(テーゼ→アンチテーゼ→ジンテーゼ)、並列、類推、アブダクション、第一原理(基本要素への分解)、反実仮想(波及効果を含む仮定の検討)、システム思考(フィードバックループとレバレッジポイント)、MCTS(モンテカルロ最適化)、自動(内容とグラフの状態に基づくインテリジェントな自動選択)
- ノードエイリアス — 任意の
nodeIdパラメーターで、複雑なノード ID の代わりに"last"、"best"、"root"を使用できます - 構造化レスポンス — すべてのツールレスポンスは、
status、summary、confidence、nextSuggestedアクションを含む、一貫したMCPResponseJSON を返します - セッションの永続化 — 思考グラフを
~/.deep-thinker/sessions/に自動保存します。reset({ resume: "name" })で MCP の再起動後に再開できます - わかりやすいエラーメッセージ — Zod の検証エラーを人が理解しやすいヒントに変換します(例:
"confidence 0 ile 1 arasında...") - 信頼度スコアリング — 支持・反証の分析、深さによるペナルティ、知識統合による加点を備えた、多要素の信頼度評価
- 自己批評 — 重大度レベルと信頼度の調整を伴う批評を自動生成します
- メタ認知エンジン — 停滞状態、進展の停滞、信頼度の低下を検出し、戦略の切り替えや是正措置を提案します
- 知識統合 — 外部知識を思考に追加し、知識の欠落を検出して、情報源間の整合性を検証します
- 思考の枝刈り — 行き止まりの検出、冗長性の除去、成果につながらない深い分岐の削除、経路の最適化
- help ツール — カテゴリー(コア/高度/ワークフロー)別にまとめられた 17 個のツールを、クイックスタート例とともに確認できます
- conclude ツール —
primaryFinding、actionItems、graphHealth、nextSuggestedを含む、包括的なグラフの要約 - 高 IQ 推論の拡張機能 — 可視化、悪魔の代弁者、学際的な統合、時間的投影、倫理的評価、感情知能分析、意思決定の説明、社会的影響分析を行う 8 個の高度なツール
- 感情知能 — 感情のトーン、共感、説得の有効性、ステークホルダーの感情を分析します
- 倫理的フレームワーク — 義務論、帰結主義、徳倫理、権利に基づく観点から評価します
- 分野横断的な統合 — 生物学、経済学、物理学、心理学、コンピューターサイエンス、芸術から得られた知見を組み合わせます
- 時間的推論 — 楽観的、悲観的、現実的、破壊的なシナリオを用いて、思考を未来または過去のシナリオに投影します
- 社会的影響のモデリング — ステークホルダーの感情、集団の結束、説得の有効性、倫理的な整合性を分析します
- 不確実性の定量化 — 堅牢な意思決定のための信頼区間、確率分布、感度分析
- 多言語サポート — 英語、トルコ語、ドイツ語、フランス語、スペイン語、日本語、中国語、ロシア語で思考を扱えます
- メタ認知レイヤー — 5 段階のメタ認知による再帰的な推論
- PromptOptimizer(Node Zero) — 曖昧なプロンプトを最適化された Super Prompts に変換し、戦略を自動で振り分けるエントリーポイント
インストール
グローバル
npm install -g deep-thinker
npx(インストール不要)
npx deep-thinker
MCP の設定
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 を指定してください。
レスポンス形式
すべてのツールレスポンスは MCPResponse の構造に従います。
{
"status": "ok | error | warning",
"nodeId": "thought_3",
"summary": "sequential stratejisiyle \"Should we use microservices?...\" eklendi",
"confidence": 0.75,
"data": { "...": "tool-specific data" },
"nextSuggested": {
"tool": "evaluate",
"params": { "critique": true },
"reason": "Düşük confidence — değerlendirme önerilir"
},
"warnings": ["Stuck detected: ..."]
}
nextSuggested フィールドは、次に行うべき論理的な手順を常に推奨するため、次のステップを推測することなくツール呼び出しを連鎖させることができます。
ノードのエイリアス
わかりにくいノード ID を調べる代わりに、任意の nodeId、parentId、または targetId パラメーターにエイリアスを使用できます。
| エイリアス | 解決先 |
|---|---|
"last" | 最後に追加されたノード(挿入順) |
"best" | 信頼度スコアが最も高いノード |
"root" | 入力エッジのない最初のノード |
evaluate({ nodeId: "last" }) → evaluates the latest thought
simulate_devils_advocate({ nodeId: "best", depth: 2 }) → challenges the strongest thought
graph({ action: "path", nodeId: "root", targetId: "best" }) → traces from root to best conclusion
セッションの永続化
思考グラフは、think の呼び出し後に毎回自動保存されます。セッションは ~/.deep-thinker/sessions/ に保存されます。
// Save current session explicitly
reset({ save: true, saveName: "my-analysis" })
// List saved sessions
reset({ listSessions: true })
// Resume a saved session after MCP restart
reset({ resume: "my-analysis" })
ツール
コアツール
think
推論戦略を使って、認知グラフに思考を追加します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
content | string | はい | 思考の内容 |
type | string | いいえ | 思考の種類:hypothesis、analysis、evidence、conclusion、question、assumption、insight、critique、synthesis、observation |
strategy | string | いいえ | 戦略:sequential、dialectic、parallel、analogical、abductive、first_principles、counterfactual、systems_thinking、mcts、auto |
confidence | number | いいえ | 初期の確信度 0~1(デフォルト:0.5) |
parentId | string | いいえ | 親ノードの ID またはエイリアス(デフォルト:最後のリーフ) |
branch | string | いいえ | 並列探索用のブランチ名 |
tags | string[] | いいえ | 分類用のタグ |
edgeTo | object | いいえ | 明示的なエッジ:{ targetId, type } |
dialectic | object | いいえ | 弁証法モード:{ thesis, antithesis?, synthesis? } |
parallel | array | いいえ | 並列モード:[{ content, type, confidence }] |
analogical | object | いいえ | 類推モード:{ sourceDomain, mapping, projectedConclusion } |
abductive | object | いいえ | アブダクションモード:{ observation, explanations[], bestExplanation? } |
firstPrinciples | object | いいえ | 第一原理モード:{ problem, assumptions?, depth?, domain? } |
counterfactual | object | いいえ | 反実仮想モード:{ currentState?, variablesToChange, rippleDepth? } |
systemsThinking | object | いいえ | システム思考モード:{ systemDescription?, components, focusArea? } |
mcts | object | いいえ | MCTS モード:{ problem?, possibleActions, numSimulations? } |
knowledge | object | いいえ | ナレッジを添付:{ source, content, relevance } |
戦略の詳細:
| 戦略 | 説明 | 最適な用途 |
|---|---|---|
| Sequential | 線形の連鎖:各思考は前の思考から導かれます | 段階的な推論 |
| Dialectic | 矛盾を解消するための、テーゼ → アンチテーゼ → ジンテーゼのパターン | 対立の解消 |
| Parallel | 複数の独立したブランチを同時に探索します | アイデア出し |
| Analogical | 既知の領域のパターンを現在の問題に当てはめます | 領域横断的な洞察 |
| Abductive | 仮説を生成し、最適な説明を推論します | 根本原因の分析 |
| First Principles | 基本的な真理まで分解し、前提を問い直します | 慣習からの脱却 |
| Counterfactual | 多段階の波及効果を含む「もしも」のシナリオ | リスク/影響の分析 |
| Systems Thinking | フィードバックループ、レバレッジポイント、創発的特性 | 複雑なシステム |
| MCTS | モンテカルロ木探索による最適な意思決定の選択 | 最適化問題 |
| Auto | コンテンツの特徴とグラフの状況に基づいて、戦略を自動的に選択します | 手間をかけずに推論 |
auto 戦略の動作:
auto 戦略は、キーワードと現在のグラフの状態を分析します:
- 「why」「neden」「how」「nasıl」を含むコンテンツ →
abductive - 「if」「eğer」「what if」「varsayalım」を含むコンテンツ →
counterfactual - 「vs」「veya」「compare」「karşılaştır」を含むコンテンツ →
dialectic - 「system」「sistem」「loop」「döngü」を含むコンテンツ →
systems_thinking - 「fundamental」「temel」「assumption」「varsayım」を含むコンテンツ →
first_principles - 平均確信度が低く、ノード数が多い場合 →
parallel(行き詰まりの打開) - 最初の思考 →
sequential - 4 つ以上の思考が順次追加された後 →
dialectic(対立する見解を導入) - デフォルト →
sequential
エッジの種類: derives_from、contradicts、supports、refines、challenges、synthesizes、parallels、abstracts、instantiates
evaluate
確信度スコアリング、批評、グラフの健全性分析を用いて、思考プロセスを評価します。
パラメーター:
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | No | 評価する特定のノード(エイリアス last、best、root を指定できます) |
critique | boolean | No | 自己批評を生成します(デフォルト:true) |
findGaps | boolean | No | ナレッジのギャップを見つけます(デフォルト:false) |
validateKnowledge | boolean | No | ナレッジの一貫性を検証します(デフォルト:false) |
metacog
メタ認知操作 — 思考プロセスを監視し、制御します。
パラメーター:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | report = 全状態、switch = 戦略の変更、auto_update = システムに分析を任せる |
strategy | string | No | 新しい戦略(switch アクション用) |
reason | string | No | 切り替える理由(switch アクション用) |
メタ認知エンジンは次のことを自動的に行います:
- 停滞を検出します(確信度が向上しない)
- 確信度の低下傾向を検出します
- 過剰な矛盾を検出します
- 戦略の切り替え、枝刈り、バックトラッキング、または結論を提案します
graph
思考グラフを照会して可視化します。
パラメーター:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | visualize、stats、path、node、branches、best_path、leaves |
nodeId | string | No | ノード ID またはエイリアス(path、node アクション用) |
targetId | string | No | ターゲット ID またはエイリアス(path アクション用) |
prune
思考グラフを枝刈りして最適化します。
パラメーター:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | analyze(レポートのみ)、prune(実行)、optimize_path、prune_node |
nodeId | string | No | 枝刈りするノード — エイリアスを指定できます(prune_node 用) |
reason | string | No | 理由(prune_node 用) |
reset
思考グラフをリセットして新しいセッションを開始するか、セッションを保存または保存済みセッションを再開します。
パラメーター:
| Parameter | Type | Required | Description |
|---|---|---|---|
problem | string | No | 新しい問題の説明 |
save | boolean | No | リセット前に現在のセッションを保存します(デフォルト:false) |
saveName | string | No | 保存するセッションの名前(save: true の場合に推奨) |
resume | string | No | 名前を指定して、以前に保存したセッションを再開します |
listSessions | boolean | No | 保存済みのすべてのセッションを一覧表示します |
conclude
思考グラフ全体を分析し、アクション項目とグラフの健全性レポートを含む包括的な要約と結論を作成します。
パラメーター:
| Parameter | Type | Required | Description |
|---|---|---|---|
detailLevel | string | No | brief、detailed、technical(デフォルト:detailed) |
includeCounterfactuals | boolean | No | 反事実分析を含めます(デフォルト:false) |
format | string | No | prose、structured、executive(デフォルト:structured) |
レスポンスには次の内容が含まれます:
primaryFinding— 確信度を含む主要な結論supportingEvidence— 確信度の高い追加ノードstrategiesUsed— 貢献した戦略keyInsights— 最善のパスに含まれる洞察タイプのノードactionItems— 結論から導かれた優先順位付きアクションgraphHealth— ノード数、行き止まり、平均確信度、推奨事項nextSuggested— 論理的な次のステップ(健全でなければ枝刈り、完了していれば保存)
help
ディープシンキングツールを見つけ、使用ワークフローを確認します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
category | string | いいえ | all、core、advanced、workflow(デフォルト:all) |
カテゴリ:
- core — 日常的に使う7つのツール(think、evaluate、metacog、graph、prune、reset、conclude)
- advanced — 8つの詳細分析ツール(可視化、悪魔の代弁者、分野横断、時間的分析、倫理、感情、説明、社会的影響、プロンプトオプティマイザー)
- workflow — 推奨ワークフロー3種類:
- Quick Decision — reset → think parallel → evaluate → conclude
- Deep Analysis — reset → first_principles → counterfactual → devil's advocate → evaluate → metacog → prune → conclude
- Breaking Dead Ends — metacog report → switch strategy → cross-disciplinary → abductive
強化ツール(高IQ推論)
visualize_thought_graph
思考グラフをSVGまたはASCIIで視覚化します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
format | string | いいえ | svg、ascii、またはtree(デフォルト:ascii) |
highlightPath | string | いいえ | 2つのノードID間のパス(形式:fromId-toId) |
showConfidence | boolean | いいえ | 確信度スコアを表示します(デフォルト:true) |
simulate_devils_advocate
指定された思考に対する反論と反対の見解を生成します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
nodeId | string | はい | 対象ノードIDまたはエイリアス(last、best、root) |
depth | number | いいえ | 反論の階層数(1-5、デフォルト:2) |
intensity | string | いいえ | mild、moderate、またはaggressive(デフォルト:moderate) |
cross_disciplinary_synthesis
複数の分野から得た知見を組み合わせ、新たな視点を生み出します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
sourceDomains | string[] | はい | 類推の参照元とする分野(例:["biology", "economics", "art"]) |
targetProblem | string | はい | 分野横断の知見を適用する問題 |
maxAnalogies | number | いいえ | 生成する類推の最大数(1-10、デフォルト:3) |
temporal_projection
思考を未来または過去のシナリオに投影します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
nodeId | string | はい | ルートノードIDまたはエイリアス |
years | number | はい | 未来への年数(正の値)または過去への年数(負の値) |
scenario | string | いいえ | optimistic、pessimistic、realistic、disruptive(デフォルト:realistic) |
ethical_framework_evaluation
複数の倫理的フレームワークを通じて、思考や意思決定を評価します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
nodeId | string | はい | ノードIDまたはエイリアス |
frameworks | string[] | いいえ | 使用するフレームワーク:deontological、consequentialist、virtue、rights_based(デフォルト:すべて) |
emotional_intelligence_analysis
感情的なトーン、関係者の感情、社会的力学を分析します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
text | string | はい | 感情的な内容を分析するテキスト |
context | string | いいえ | コンテキスト(例:team meeting、customer feedback、crisis situation) |
perspectiveTaking | number | いいえ | 視点取得のレベル(0~1、デフォルト:0.7) |
explain_decision
意思決定の経路を、人が理解しやすい形で説明します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
nodeId | string | はい | 意思決定/結論ノードの ID またはエイリアス |
detailLevel | string | いいえ | simple、detailed、technical(デフォルト:detailed) |
includeCounterfactuals | boolean | いいえ | もしもシナリオを表示します(デフォルト:true) |
social_impact_analysis
社会的影響、ステークホルダーの感情、グループの結束力、説得の有効性を分析します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
nodeId | string | はい | ノード ID またはエイリアス |
stakeholders | string[] | いいえ | ステークホルダーのグループ(デフォルト:["customers", "employees", "investors", "community"]) |
optimize_prompt
PromptOptimizer(Node Zero)— 曖昧なプロンプトを、戦略ルーティング機能を備えた最適化済みの Super Prompts に変換します。
パラメーター:
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
originalPrompt | string | はい | ユーザーが入力した、曖昧な可能性のある元のプロンプト |
userContext | object | いいえ | { expertiseLevel, domainKnowledge[], preferences } |
conversationHistory | array | いいえ | コンテキスト用の過去のメッセージ(最大 20 件) |
optimizationLevel | string | いいえ | light、standard、aggressive(デフォルト:standard) |
targetModel | string | いいえ | claude、gpt4、gpt35、local、generic(デフォルト:generic) |
autoRoute | boolean | いいえ | 推奨戦略に自動でルーティングします(デフォルト:false) |
使用例
自動戦略選択(新機能!)
think: { content: "Eğer mikroservis kullansaydık ne olurdu?" }
→ Auto-selects strategy: counterfactual (detected "Eğer" = "if" signal)
think: { content: "Why is the server crashing?" }
→ Auto-selects strategy: abductive (detected "why" signal)
think: { content: "Monolith vs microservices?" }
→ Auto-selects strategy: dialectic (detected "vs" comparison signal)
順次推論
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: { nodeId: "last", critique: true }
→ { status: "ok", confidence: 0.73, nextSuggested: { tool: "metacog" } }
弁証法的推論
think: {
strategy: "dialectic",
dialectic: {
thesis: "Microservices improve scalability",
antithesis: "But add operational complexity",
synthesis: "Use modular monolith as middle ground"
},
confidence: 0.75
}
ノードエイリアスの使用
evaluate({ nodeId: "last" }) → evaluate latest thought
simulate_devils_advocate({ nodeId: "best", depth: 3 }) → challenge strongest thought
graph({ action: "path", nodeId: "root", targetId: "best" }) → trace reasoning path
think({ parentId: "root", content: "Alternative..." }) → branch from root
セッションの保存と再開
// Work on a problem...
think({ content: "Analysis...", strategy: "auto" })
think({ content: "Another insight..." })
// Save before closing
reset({ save: true, saveName: "architecture-review" })
// ... MCP restarts ...
// Resume exactly where you left off
reset({ resume: "architecture-review" })
→ { status: "ok", summary: "architecture-review oturumu geri yüklendi — 5 node ile devam ediliyor" }
第一原理からの推論
think: {
strategy: "first_principles",
firstPrinciples: {
problem: "How to improve battery efficiency?",
assumptions: ["Batteries must use lithium", "Charging takes hours"],
depth: 3,
domain: "physics"
}
}
→ Creates: Problem → Assumptions Challenged → Fundamental Truths → Reconstructed Solution
反実仮想(もしも)分析
think: {
strategy: "counterfactual",
counterfactual: {
currentState: "Office-based work with 5-day commute",
variablesToChange: [
{ variable: "work_location", currentValue: "office", hypotheticalValue: "remote", impactWeight: 0.9 },
{ variable: "commute_days", currentValue: 5, hypotheticalValue: 0, impactWeight: 0.8 }
],
timeHorizon: "medium_term",
rippleDepth: 3
}
}
→ Creates: Baseline → Variable Changes → Stage 1/2/3 Ripple Effects → Scenarios → Risk Analysis
システム思考
think: {
strategy: "systems_thinking",
systemsThinking: {
systemDescription: "Software development team dynamics",
components: [
{ name: "FeatureBacklog", type: "stock", description: "Pending work" },
{ name: "DeveloperCapacity", type: "stock", description: "Available developers" },
{ name: "CodeReviews", type: "flow", description: "Review process" },
{ name: "Quality", type: "converter", description: "Quality gates" }
],
focusArea: "feedback_loops"
}
}
→ Creates: System Overview → Components → Feedback Loops → Leverage Points → Recommendations
MCTS(モンテカルロ木探索)
think: {
strategy: "mcts",
mcts: {
problem: "Which architecture pattern to choose?",
possibleActions: [
{ id: "microservices", description: "Microservices architecture", estimatedReward: 0.7 },
{ id: "monolith", description: "Monolithic architecture", estimatedReward: 0.5 },
{ id: "modular", description: "Modular monolith", estimatedReward: 0.8 }
],
numSimulations: 100,
pruningThreshold: 0.2
}
}
→ Creates: Root → Actions → Simulations → Pruning Analysis → Optimal Path
分析の結論
conclude({ detailLevel: "detailed" })
→ {
status: "ok",
summary: "12 dusunce, 3 dal, sequential+counterfactual stratejileriyle analiz tamamlandi",
data: {
conclusion: { primaryFinding: "...", confidence: 0.85 },
actionItems: [{ action: "Investigate...", priority: "high" }, ...],
graphHealth: { totalThoughts: 12, avgConfidence: 0.72, recommendation: "Graf saglikli gorunuyor" }
},
nextSuggested: { tool: "reset", params: { save: true }, reason: "Analizi kaydetmeyi unutmayin" }
}
メタ認知ガイダンス
metacog: { action: "auto_update" }
→ Stuck detected + suggested action in nextSuggested
metacog: { action: "switch", strategy: "parallel", reason: "Break through impasse" }
→ Strategy switched + next step recommended
枝刈り
prune: { action: "analyze" }
→ Dead Ends, Redundant Branches, Total prunable count
prune: { action: "prune" }
→ Nodes pruned + metacog updated + nextSuggested
ヘルプの表示
help() → all tools, all categories, all workflows
help({ category: "core" }) → 7 core tools with quick-start examples
help({ category: "advanced" }) → 9 advanced tools
help({ category: "workflow" }) → 3 recommended workflows
わかりやすいエラーメッセージ
検証に失敗すると、Zod の生の出力ではなく、人が理解しやすいエラーが表示されます。
think({ confidence: 1.5 })
→ {
status: "error",
error: "VALIDATION_ERROR",
message: "\"confidence\" parametresinde hata: ...",
field: "confidence",
hint: "confidence 0 ile 1 arasında bir sayı olmalı. Örnek: confidence: 0.7"
}
evaluate({ nodeId: "nonexistent" })
→ {
status: "error",
error: "NODE_NOT_FOUND",
provided: "nonexistent",
hint: "Geçerli alias'lar: \"last\", \"best\", \"root\" veya graph aracıyla node ID alın"
}
アーキテクチャ
src/
├── index.ts MCP server & 17 tool handlers
├── test.ts Core functionality tests (118 tests)
├── test_enhanced_strategies.ts Strategy tests (13 tests)
├── core/
│ ├── types.ts Type definitions, MCPResponse, NextAction
│ ├── schemas.ts Zod validation schemas (10 strategies incl. auto)
│ ├── node.ts ThoughtNode CRUD operations
│ ├── graph.ts DAG-based thought graph + resolveNodeId + aliases
│ ├── strategies.ts 10 reasoning strategies + selectStrategy (auto)
│ ├── scorer.ts Confidence scoring & self-critique
│ ├── metacog.ts Metacognitive engine with smart triggers
│ ├── knowledge.ts Knowledge integration & validation
│ ├── pruner.ts Dead-end/redundancy detection & pruning
│ ├── session.ts Session persistence (save/load/resume)
│ └── errors.ts Friendly error formatting (Zod + unknown)
└── enhancements/
├── visualization.ts SVG & ASCII graph visualization
├── devils_advocate.ts Counterargument generation
├── cross_disciplinary.ts Cross-domain analogy engine
├── temporal_projection.ts Future/past thought projection
├── ethical_evaluation.ts 4 ethical frameworks
├── emotional_intelligence.ts Emotion & sentiment analysis
├── explanation.ts Decision explainability
└── social_impact.ts Stakeholder & social impact
v3.0.0 の新機能
| 機能 | 説明 |
|---|---|
| ノードエイリアス | すべての nodeId パラメーターで、ノード ID の代わりに "last"、"best"、"root" を使用できます |
| MCPResponse | status、summary、confidence、nextSuggested を含む構造化 JSON レスポンス |
| セッションの永続化 | ~/.deep-thinker/sessions/ に自動保存し、再起動後も再開できます |
| わかりやすいエラー | Zod エラーを、フィールドごとのガイダンスを含む、人が理解しやすいヒントに変換します |
| help ツール | ワークフローの例を含む、3 カテゴリーのツール検索 |
| conclude ツール | primaryFinding、actionItems、graphHealth を含むグラフの概要 |
| strategy: auto | コンテンツ内のキーワードとグラフの状態に基づく自動戦略選択 |
sequential-thinking との比較
| 機能 | sequential-thinking | deep-thinker |
|---|---|---|
| 思考構造 | 線形チェーン | DAG(分岐/マージ/交差エッジ) |
| 戦略 | 順次のみ | 10 種類の戦略(自動選択を含む) |
| スキーマ検証 | なし | すべての戦略に Zod スキーマを使用 |
| 信頼度 | 基本的な思考番号 | トレンド分析を伴う多要素スコアリング |
| 自己批評 | なし | 深刻度レベルを伴う自動処理 |
| メタ認知 | なし | 行き詰まりの検出、スマートな戦略トリガー、自動切り替え |
| ナレッジ | なし | 外部参照、ギャップ検出、一貫性検証 |
| 枝刈り | なし | 行き止まり、冗長性、経路の最適化 |
| グラフクエリ | 線形レビュー | 可視化、最適な経路、分岐分析、統計 |
| ノード参照 | ID のみ | エイリアス:last、best、root |
| レスポンス形式 | プレーンテキスト | nextSuggested を含む構造化された MCPResponse |
| セッションの永続化 | なし | 自動保存、保存/読み込み/再開 |
| エラーメッセージ | 生のエラー | ヒント付きの人間が読みやすいメッセージ |
| ツールの検出 | なし | カテゴリとワークフローを備えたヘルプツール |
| 結論 | 手動レビュー | actionItems を含む conclude ツール |
| 戦略の選択 | 手動のみ | 内容に基づく自動戦略選択 |
開発
git clone https://github.com/hubinoretros/deep-thinker.git
cd deep-thinker
npm install
npm run build
npm start
テスト
npm run build
npm test
Node、Graph、10 種類の Strategy(auto を含む)、Scorer、Metacog、Knowledge、Pruner、Integration、Edge Cases、Schema Validation の全モジュールを対象とする 131 件のテスト。
ドキュメント
- アーキテクチャの詳細 — DAG、スコアリング、メタ認知、枝刈りの内部的な仕組み
- 戦略選択ガイド — 各戦略を使用する場面と組み合わせ方
コントリビューション
ガイドラインについては、CONTRIBUTING.md を参照してください。PR を歓迎します。特に、新しい推論戦略や MCP ツールのアイデアをお待ちしています。
ライセンス
MIT
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。