mcpField
D
Deep Thinker

Deep Thinker

ローカル
github.com/hubinoretrosAI・エージェント1523 週間前に更新

Deep Thinker について

Deep Thinker は、思考を有向非巡回グラフで管理する構造化推論向け MCP サーバーです。複雑な問題を分析し、推論過程を確認したいエージェント向けに、複数の戦略、評価、セッション再開機能を備えています。

主な機能

  1. 01有向非巡回グラフで思考を整理
  2. 0210 種類の推論戦略
  3. 03確信度の評価と自己批評
  4. 04停滞の検出と戦略変更の提案
  5. 05推論セッションの保存と再開
  6. 06思考グラフの検索、枝刈り、最適化

活用シーン

  1. 01アーキテクチャ案と根拠の比較
  2. 02障害の原因候補の調査
  3. 03選択肢、リスク、判断への影響の評価
  4. 04保存済みの分析セッションの再開

MCP 対応

推論とグラフ管理を行う 17 個のツールを MCP クライアントに公開します。思考、評価、メタ認知による監視、グラフ検索に対応し、構造化された応答で次の操作も提案します。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

mcp.json · 共通設定
{
"mcpServers": {
"deep-thinker": {
"command": "npx",
"args": [
"-y",
"deep-thinker"
]
}
}
}
起動コマンドnpx -y deep-thinker

ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。

パッケージ
npmdeep-thinker

ツール

17

掲載時のツール一覧 · 3 週間前に更新

パラメーター型必須説明
contentstringはい思考の内容
typeenumいいえ思考の種類(デフォルト:analysis)hypothesis | analysis | evidence | conclusion | question | assumption | insight | critique | synthesis | observation
strategyenumいいえ使用する推論戦略(デフォルト:メタ認知の現在の戦略)。戦略を自動選択するには 'auto' を使用します。新しい戦略:first_principles=基本原理への分解、counterfactual=反実仮想分析、systems_thinking=フィードバックループとレバレッジポイント、mcts=最適化のためのモンテカルロ木探索sequential | dialectic | parallel | analogical | abductive | first_principles | counterfactual | systems_thinking | mcts | auto
confidencenumberいいえこの思考の初期確信度。範囲は0~1(デフォルト:0.5)
parentIdstringいいえ接続する親思考のID(デフォルト:最後にアクティブだったリーフ)
branchstringいいえ並列探索に使用するブランチ名(デフォルト:main)
tagsarrayいいえ思考を分類するためのタグ
edgeToobjectいいえ別のノードへの明示的なエッジを作成します
edgeTo.targetIdstringいいえターゲットノード ID
edgeTo.typeenumいいえエッジの種類derives_from | contradicts | supports | refines | challenges | synthesizes | parallels | abstracts | instantiates
dialecticobjectいいえ弁証法モード:thesisを指定します(antithesis/synthesisは任意)。
dialectic.thesisstringいいえテーゼ/命題
dialectic.antithesisstringいいえ対立する見解(任意)
dialectic.synthesisstringいいえ統合案(任意)
parallelarrayいいえ並列モード:複数の独立した思考を同時に探索します
analogicalobjectいいえ類推モード:元の領域、対応関係、導き出される結論
analogical.sourceDomainstringいいえ類推の基にする既知の領域
analogical.mappingstringいいえ各領域間の対応関係
analogical.projectedConclusionstringいいえ類推から導かれる結論
abductiveobjectいいえアブダクションモード:観察結果、考えられる説明、最良の説明
abductive.observationstringいいえ説明する対象となる観察結果
abductive.explanationsarrayいいえ考えられる説明とその妥当性スコア
abductive.bestExplanationstringいいえ最良の説明(決定している場合)
firstPrinciplesobjectいいえ第一原理モード:問題を基本的な真理に分解し、再構築します
firstPrinciples.problemstringいいえ分解する問題(デフォルト:コンテンツを使用)
firstPrinciples.assumptionsarrayいいえ検証すべき前提
firstPrinciples.depthnumberいいえ分解の深さ(デフォルト:3)
firstPrinciples.domainstringいいえ任意の領域コンテキスト(例:'physics'、'economics')
counterfactualobjectいいえ反実仮想モード:仮定のシナリオとその波及効果を分析します
counterfactual.currentStatestringいいえ現在の状態の説明(デフォルト:コンテンツを使用)
counterfactual.variablesToChangearrayはい仮定のシナリオで変更する変数
counterfactual.timeHorizonenumいいえ影響の時間的範囲immediate | short_term | medium_term | long_term
counterfactual.rippleDepthnumberいいえ波及効果の段階数(デフォルト:3)
systemsThinkingobjectいいえシステム思考モード:フィードバックループとレバレッジポイントを分析します
systemsThinking.systemDescriptionstringいいえシステムの説明(デフォルトではコンテンツを使用)
systemsThinking.boundariesarrayいいえシステム境界
systemsThinking.componentsarrayはいシステムコンポーネント(2 つ以上必要)
systemsThinking.timeScaleenumいいえ分析時間スケールimmediate | short_term | medium_term | long_term
systemsThinking.focusAreaenumいいえ分析の焦点feedback_loops | leverage_points | emergence | resilience | all
mctsobjectいいえMCTS モード:最適な経路を選択するモンテカルロ木探索
mcts.problemstringいいえ解決する問題(デフォルトではコンテンツを使用)
mcts.possibleActionsarrayはい評価するアクション候補(2 つ以上)
mcts.simulationDepthnumberいいえシミュレーションの深さ(デフォルト:5)
mcts.numSimulationsnumberいいえシミュレーション回数(デフォルト:100)
mcts.explorationConstantnumberいいえUCB1 探索定数(デフォルト:1.414)
mcts.pruningThresholdnumberいいえ枝刈りしきい値(デフォルト:0.2)
knowledgeobjectいいえこの思考に外部知識を添付します
knowledge.sourcestringいいえ知識のソース
knowledge.contentstringいいえ知識の内容
knowledge.relevancenumberいいえこの思考との関連性(0-1)

詳細

deep-thinker

CI npm version npm downloads license GitHub stars

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 アクションを含む、一貫した MCPResponse JSON を返します
  • セッションの永続化 — 思考グラフを ~/.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

推論戦略を使って、認知グラフに思考を追加します。

パラメーター:

パラメーター型必須説明
contentstringはい思考の内容
typestringいいえ思考の種類:hypothesis、analysis、evidence、conclusion、question、assumption、insight、critique、synthesis、observation
strategystringいいえ戦略:sequential、dialectic、parallel、analogical、abductive、first_principles、counterfactual、systems_thinking、mcts、auto
confidencenumberいいえ初期の確信度 0~1(デフォルト:0.5)
parentIdstringいいえ親ノードの ID またはエイリアス(デフォルト:最後のリーフ)
branchstringいいえ並列探索用のブランチ名
tagsstring[]いいえ分類用のタグ
edgeToobjectいいえ明示的なエッジ:{ targetId, type }
dialecticobjectいいえ弁証法モード:{ thesis, antithesis?, synthesis? }
parallelarrayいいえ並列モード:[{ content, type, confidence }]
analogicalobjectいいえ類推モード:{ sourceDomain, mapping, projectedConclusion }
abductiveobjectいいえアブダクションモード:{ observation, explanations[], bestExplanation? }
firstPrinciplesobjectいいえ第一原理モード:{ problem, assumptions?, depth?, domain? }
counterfactualobjectいいえ反実仮想モード:{ currentState?, variablesToChange, rippleDepth? }
systemsThinkingobjectいいえシステム思考モード:{ systemDescription?, components, focusArea? }
mctsobjectいいえMCTS モード:{ problem?, possibleActions, numSimulations? }
knowledgeobjectいいえナレッジを添付:{ 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

確信度スコアリング、批評、グラフの健全性分析を用いて、思考プロセスを評価します。

パラメーター:

ParameterTypeRequiredDescription
nodeIdstringNo評価する特定のノード(エイリアス last、best、root を指定できます)
critiquebooleanNo自己批評を生成します(デフォルト:true)
findGapsbooleanNoナレッジのギャップを見つけます(デフォルト:false)
validateKnowledgebooleanNoナレッジの一貫性を検証します(デフォルト:false)
metacog

メタ認知操作 — 思考プロセスを監視し、制御します。

パラメーター:

ParameterTypeRequiredDescription
actionstringYesreport = 全状態、switch = 戦略の変更、auto_update = システムに分析を任せる
strategystringNo新しい戦略(switch アクション用)
reasonstringNo切り替える理由(switch アクション用)

メタ認知エンジンは次のことを自動的に行います:

  • 停滞を検出します(確信度が向上しない)
  • 確信度の低下傾向を検出します
  • 過剰な矛盾を検出します
  • 戦略の切り替え、枝刈り、バックトラッキング、または結論を提案します
graph

思考グラフを照会して可視化します。

パラメーター:

ParameterTypeRequiredDescription
actionstringYesvisualize、stats、path、node、branches、best_path、leaves
nodeIdstringNoノード ID またはエイリアス(path、node アクション用)
targetIdstringNoターゲット ID またはエイリアス(path アクション用)
prune

思考グラフを枝刈りして最適化します。

パラメーター:

ParameterTypeRequiredDescription
actionstringYesanalyze(レポートのみ)、prune(実行)、optimize_path、prune_node
nodeIdstringNo枝刈りするノード — エイリアスを指定できます(prune_node 用)
reasonstringNo理由(prune_node 用)
reset

思考グラフをリセットして新しいセッションを開始するか、セッションを保存または保存済みセッションを再開します。

パラメーター:

ParameterTypeRequiredDescription
problemstringNo新しい問題の説明
savebooleanNoリセット前に現在のセッションを保存します(デフォルト:false)
saveNamestringNo保存するセッションの名前(save: true の場合に推奨)
resumestringNo名前を指定して、以前に保存したセッションを再開します
listSessionsbooleanNo保存済みのすべてのセッションを一覧表示します
conclude

思考グラフ全体を分析し、アクション項目とグラフの健全性レポートを含む包括的な要約と結論を作成します。

パラメーター:

ParameterTypeRequiredDescription
detailLevelstringNobrief、detailed、technical(デフォルト:detailed)
includeCounterfactualsbooleanNo反事実分析を含めます(デフォルト:false)
formatstringNoprose、structured、executive(デフォルト:structured)

レスポンスには次の内容が含まれます:

  • primaryFinding — 確信度を含む主要な結論
  • supportingEvidence — 確信度の高い追加ノード
  • strategiesUsed — 貢献した戦略
  • keyInsights — 最善のパスに含まれる洞察タイプのノード
  • actionItems — 結論から導かれた優先順位付きアクション
  • graphHealth — ノード数、行き止まり、平均確信度、推奨事項
  • nextSuggested — 論理的な次のステップ(健全でなければ枝刈り、完了していれば保存)
help

ディープシンキングツールを見つけ、使用ワークフローを確認します。

パラメーター:

パラメーター型必須説明
categorystringいいえ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で視覚化します。

パラメーター:

パラメーター型必須説明
formatstringいいえsvg、ascii、またはtree(デフォルト:ascii)
highlightPathstringいいえ2つのノードID間のパス(形式:fromId-toId)
showConfidencebooleanいいえ確信度スコアを表示します(デフォルト:true)
simulate_devils_advocate

指定された思考に対する反論と反対の見解を生成します。

パラメーター:

パラメーター型必須説明
nodeIdstringはい対象ノードIDまたはエイリアス(last、best、root)
depthnumberいいえ反論の階層数(1-5、デフォルト:2)
intensitystringいいえmild、moderate、またはaggressive(デフォルト:moderate)
cross_disciplinary_synthesis

複数の分野から得た知見を組み合わせ、新たな視点を生み出します。

パラメーター:

パラメーター型必須説明
sourceDomainsstring[]はい類推の参照元とする分野(例:["biology", "economics", "art"])
targetProblemstringはい分野横断の知見を適用する問題
maxAnalogiesnumberいいえ生成する類推の最大数(1-10、デフォルト:3)
temporal_projection

思考を未来または過去のシナリオに投影します。

パラメーター:

パラメーター型必須説明
nodeIdstringはいルートノードIDまたはエイリアス
yearsnumberはい未来への年数(正の値)または過去への年数(負の値)
scenariostringいいえoptimistic、pessimistic、realistic、disruptive(デフォルト:realistic)
ethical_framework_evaluation

複数の倫理的フレームワークを通じて、思考や意思決定を評価します。

パラメーター:

パラメーター型必須説明
nodeIdstringはいノードIDまたはエイリアス
frameworksstring[]いいえ使用するフレームワーク:deontological、consequentialist、virtue、rights_based(デフォルト:すべて)
emotional_intelligence_analysis

感情的なトーン、関係者の感情、社会的力学を分析します。

パラメーター:

パラメーター型必須説明
textstringはい感情的な内容を分析するテキスト
contextstringいいえコンテキスト(例:team meeting、customer feedback、crisis situation)
perspectiveTakingnumberいいえ視点取得のレベル(0~1、デフォルト:0.7)
explain_decision

意思決定の経路を、人が理解しやすい形で説明します。

パラメーター:

パラメーター型必須説明
nodeIdstringはい意思決定/結論ノードの ID またはエイリアス
detailLevelstringいいえsimple、detailed、technical(デフォルト:detailed)
includeCounterfactualsbooleanいいえもしもシナリオを表示します(デフォルト:true)
social_impact_analysis

社会的影響、ステークホルダーの感情、グループの結束力、説得の有効性を分析します。

パラメーター:

パラメーター型必須説明
nodeIdstringはいノード ID またはエイリアス
stakeholdersstring[]いいえステークホルダーのグループ(デフォルト:["customers", "employees", "investors", "community"])
optimize_prompt

PromptOptimizer(Node Zero)— 曖昧なプロンプトを、戦略ルーティング機能を備えた最適化済みの Super Prompts に変換します。

パラメーター:

パラメーター型必須説明
originalPromptstringはいユーザーが入力した、曖昧な可能性のある元のプロンプト
userContextobjectいいえ{ expertiseLevel, domainKnowledge[], preferences }
conversationHistoryarrayいいえコンテキスト用の過去のメッセージ(最大 20 件)
optimizationLevelstringいいえlight、standard、aggressive(デフォルト:standard)
targetModelstringいいえclaude、gpt4、gpt35、local、generic(デフォルト:generic)
autoRoutebooleanいいえ推奨戦略に自動でルーティングします(デフォルト: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" を使用できます
MCPResponsestatus、summary、confidence、nextSuggested を含む構造化 JSON レスポンス
セッションの永続化~/.deep-thinker/sessions/ に自動保存し、再起動後も再開できます
わかりやすいエラーZod エラーを、フィールドごとのガイダンスを含む、人が理解しやすいヒントに変換します
help ツールワークフローの例を含む、3 カテゴリーのツール検索
conclude ツールprimaryFinding、actionItems、graphHealth を含むグラフの概要
strategy: autoコンテンツ内のキーワードとグラフの状態に基づく自動戦略選択

sequential-thinking との比較

機能sequential-thinkingdeep-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 件のテスト。

ドキュメント

コントリビューション

ガイドラインについては、CONTRIBUTING.md を参照してください。PR を歓迎します。特に、新しい推論戦略や MCP ツールのアイデアをお待ちしています。

ライセンス

MIT

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。