注目すべきもの:
https://github.com/Jacck/mcp-reasoner
ジャック、アイデアをくれてありがとう。
カーソルAI向けMCP高度推論サーバー
Cursor AI の Claude に高度な推論機能を提供する Model Context Protocol (MCP) サーバー。
特徴
モンテカルロ ツリー サーチ (MCTS) : 複雑な問題解決タスクに MCTS 推論を使用します。
ビームサーチ: 複数の推論パスを同時に探索します。
R1 Transformer : 複雑な問題に Transformer ベースの推論を活用します。
ハイブリッド推論: Transformer 分析と MCTS を組み合わせて推論を強化します。
自動反復推論: すべてのマルチステップ推論方法は、1 回のツール呼び出しですべての推論ステップを自動的に完了します。
Related MCP server: MCP Deep Web Research Server
インストール
npm install
npm run build使用法
カーソルAIを使った設定
まずサーバーを構築します。
cd mcp-reasoning-server npm run buildオープンカーソルAI
設定 > 機能 > MCP に移動します
「+新しいグローバルMCPサーバーを追加」ボタンをクリックします。
次の詳細を入力してください。
コマンド フィールド:
node C:\\Users\\[YourUsername]\\path\\to\\mcp-reasoning-server\\dist\\index.jsプロジェクトのdist/index.jsファイルへのフルパスを使用してください。
Windowsのパスには二重のバックスラッシュを使用する
「追加」をクリック
リストでサーバーを探します(最初は「無効」と表示されます)
「無効」をクリックして「有効」に切り替えます
利用可能なツールを読み込むには、更新ボタンをクリックしてください
コマンドプロンプトウィンドウが自動的に開きます。これが実行中のサーバーです。
このコマンドプロンプトウィンドウが開いている限り、推論ツールは利用可能になります。
または、 C:\Users\[Username]\.cursor\mcp.json (Windows) にあるカーソル MCP 構成ファイルを手動で編集することもできます。
{
"mcpServers": {
"mcp-reasoner": {
"command": "node",
"args": ["C:\\Users\\[Username]\\path\\to\\mcp-reasoning-server\\dist\\index.js"]
}
}
}重要な注意事項
サーバー実行中: ツールはコマンドプロンプトウィンドウが開いて実行されている間のみ使用できます。
変更を加える: サーバーコードに変更を加えた場合は、再起動する前に
npm run buildで再構築する必要があります。再起動: サーバーを再起動するには、コマンドプロンプトウィンドウを閉じ、カーソル設定でサーバーのオン/オフを切り替えます。
推論ツールの使用
クロードとのカーソル AI 会話で推論ツールを直接使用できます。
MCTS推論
MCTS ベースの推論チェーンを開始するには、 /reason-mctsコマンドに続けてクエリを使用します。
/reason-mcts How can I optimize the performance of this React component?ビームサーチ推論
ビーム検索ベースの推論には/reason-beamコマンドを使用します。
/reason-beam What architecture would be best for this microservice system?R1トランスフォーマーの推論
シングルステップのトランスフォーマーベースの推論には/reason-r1コマンドを使用します。
/reason-r1 Analyze the complexity of this algorithm.ハイブリッド推論
/reason-hybridコマンドを使用して、Transformer と MCTS 推論を組み合わせます。
/reason-hybrid How should we approach refactoring this legacy codebase?クロード・インテグレーション
Claude がこれらの推論ツールをより簡単に操作できるように、次のカスタム指示を追加できます。
When I use commands like /reason-mcts, /reason-beam, /reason-r1, or /reason-hybrid in chat, interpret them as requests to use the corresponding reasoning tools:
/reason-mcts: Use the reason_mcts tool with the text following the command as the query
Example: "/reason-mcts How do I solve this problem?" should call the reason_mcts tool
/reason-beam: Use the reason_beam tool with the text following the command as the query
Example: "/reason-beam What's the best approach for this complex problem?" should call the reason_beam tool
/reason-r1: Use the reason_r1 tool with the text following the command as the query
Example: "/reason-r1 Analyze this code for performance issues" should call the reason_r1 tool
/reason-hybrid: Use the reason_hybrid tool with the text following the command as the query
Example: "/reason-hybrid How should we restructure this architecture?" should call the reason_hybrid tool
When these commands are used, extract the text after the command as the query parameter and use the corresponding tool to perform advanced reasoning.発達
プロジェクト構造
src/index.ts: メインサーバーのエントリポイントsrc/tools/reasoning-tools.ts: 推論ツールの実装src/tools/reasoning-wrapper.ts: カーソルで使いやすくするためのコマンドラッパーsrc/utils/errors.ts: エラー処理ユーティリティ
自動反復推論
推論ツールは、1回のツール呼び出しですべての推論ステップを内部的に自動的に完了するように実装されています。各推論手法は以下のプロセスに従います。
最初の考え/ステップを初期化する
後続の考えや手順を自動的に生成する
最終結果とともにすべての考えを返す
このアプローチにより、複数の手動ツール呼び出しを必要とせずに推論プロセスが完全に完了することが保証されます。
新しい推論方法の追加
新しい推論方法を追加するには、次の手順に従います。
src/tools/reasoning-tools.tsに新しいツール実装を追加します。src/tools/reasoning-wrapper.tsに対応するコマンドラッパーを追加します。既存のツールのパターンに従い、パラメータと応答形式を定義します。
多段階の推論方法の場合は自動反復を実装する
npm run buildでプロジェクトをリビルドします。
制限事項
これはシミュレートされた推論サーバーです。本番環境では、現在使用されているプレースホルダ応答ではなく、実際の推論アルゴリズムに接続します。
ライセンス
ISC