MCP Advanced Reasoning Server for Cursor AI について
MCP Advanced Reasoning Server for Cursor AIは、Cursor AIの会話で複数の推論方式を使えるサーバーです。複数段階の問題解決を支援しますが、READMEによると現在の応答はプレースホルダーで、本番向け推論アルゴリズムではありません。
主な機能
- 01MCTS推論ツール
- 02ビームサーチ推論ツール
- 03R1 Transformer推論ツール
- 04TransformerとMCTSのハイブリッドモード
- 05複数段階の自動実行
活用シーン
- 01複雑な問題で複数の経路を検討
- 02R1によるアルゴリズム分析
- 03ハイブリッド推論でコードのリファクタリングを検討
MCP 対応
Cursor AIなどのMCPクライアントに、MCTS、ビームサーチ、R1 Transformer、ハイブリッド方式の推論ツールを提供します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
特筆すべき言及:
https://github.com/Jacck/mcp-reasoner
アイデアを提供してくれた Jacck に感謝します。
Cursor AI 向け MCP 高度推論サーバー
Cursor AI で Claude に高度な推論機能を提供する Model Context Protocol(MCP)サーバーです。
機能
- モンテカルロ木探索(MCTS):複雑な問題解決タスクに MCTS 推論を使用します。
- ビームサーチ:複数の推論経路を同時に探索します。
- R1 Transformer:複雑な問題に Transformer ベースの推論を活用します。
- ハイブリッド推論:Transformer による分析と MCTS を組み合わせ、推論を強化します。
- 自動反復推論:すべての複数ステップ推論方式は、1 回のツール呼び出しで推論ステップをすべて自動的に完了します。
インストール
npm install
npm run build
使用方法
Cursor AI の設定
-
最初にサーバーをビルドします:
cd mcp-reasoning-server npm run build -
Cursor AI を開きます
-
Settings > Features > MCP に移動します
-
「+ Add new global MCP server」ボタンをクリックします
-
以下の詳細を入力します:
- コマンドフィールドに入力します:
node C:\\Users\\[YourUsername]\\path\\to\\mcp-reasoning-server\\dist\\index.js - プロジェクトの dist/index.js ファイルへの完全なパスを使用してください
- Windows のパスではバックスラッシュを 2 つ使用してください
- コマンドフィールドに入力します:
-
「Add」をクリックします
-
リストでサーバーを見つけます(最初は「Disabled」と表示されます)
-
「Disabled」をクリックして「Enabled」に切り替えます
-
更新ボタンをクリックして、利用可能なツールを読み込みます
-
コマンドプロンプトウィンドウが自動的に開きます。このウィンドウでサーバーが実行されています
-
このコマンドプロンプトウィンドウを開いたままにしている間、推論ツールを利用できます
または、Cursor の MCP 設定ファイル C:\Users\[Username]\.cursor\mcp.json(Windows)を手動で編集できます:
{
"mcpServers": {
"mcp-reasoner": {
"command": "node",
"args": ["C:\\Users\\[Username]\\path\\to\\mcp-reasoning-server\\dist\\index.js"]
}
}
}
重要な注意事項
- サーバーの実行:コマンドプロンプトウィンドウが開いて実行中の間のみ、ツールを利用できます
- 変更の適用:サーバーコードを変更した場合は、再起動する前に
npm run buildで再ビルドする必要があります - 再起動:サーバーを再起動するには、コマンドプロンプトウィンドウを閉じ、Cursor の設定でサーバーをオフ/オンに切り替えます
推論ツールの使用
Claude との Cursor AI の会話で、推論ツールを直接使用できます:
MCTS 推論
/reason-mcts コマンドの後にクエリを入力して、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 Transformer 推論
単一ステップの Transformer ベースの推論には /reason-r1 コマンドを使用します:
/reason-r1 Analyze the complexity of this algorithm.
ハイブリッド推論
Transformer と MCTS による推論を組み合わせるには /reason-hybrid コマンドを使用します:
/reason-hybrid How should we approach refactoring this legacy codebase?
Claude との統合
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:Cursor で使いやすくするためのコマンドラッパーsrc/utils/errors.ts:エラー処理ユーティリティ
自動反復推論
推論ツールは、1 回のツール呼び出し中にすべての推論ステップを内部で自動的に完了するように実装されています。各推論方式は、次の手順に従います:
- 最初の思考/ステップを初期化します
- 後続の思考/ステップを自動的に生成します
- すべての思考と最終結果を返します
この方法により、手動でツールを複数回呼び出すことなく、推論プロセスを最後まで完了できます。
新しい推論方式の追加
新しい推論方式を追加するには、次の手順に従います:
src/tools/reasoning-tools.tsに新しいツールの実装を追加しますsrc/tools/reasoning-wrapper.tsに対応するコマンドラッパーを追加します- 既存のツールのパターンに従い、パラメーターと応答形式を定義します
- 複数ステップの推論方式の場合は、自動反復を実装します
npm run buildでプロジェクトを再ビルドします
制限事項
これはシミュレートされた推論サーバーです。本番環境で実装する場合は、現在使用しているプレースホルダーの応答ではなく、実際の推論アルゴリズムに接続します。
ライセンス
ISC
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。