claude-openrouter-delegate-mcp
claude-openrouter-delegate-mcp
Anthropic ベースの Claude Code セッションから OpenRouter ベースの Claude Code セッションへタスクを委譲します。2 つのセッションが環境変数を共有することはありません。
Claude Code を OpenRouter に向けるということは、ANTHROPIC_* 変数をシェルにエクスポートすることを意味します。これらの変数はプロセス全体に影響するため、1 つのシェルは「Anthropic」か「OpenRouter」のどちらか一方であり、両方になることはありません。また、OpenRouter キーを保持するエクスポート済みの ANTHROPIC_AUTH_TOKEN は、1 つの迷子のサブプロセスから漏洩する可能性があります。
この MCP サーバーは、各委譲セッションを明示的に構築された環境を持つ子プロセスとして起動します。Opus セッションは自身の認証情報を保持し、委譲先は OpenRouter の認証情報を取得します。両者は同じターミナル内で並行して動作します。
┌────────────────────────────┐
│ Claude Code (Opus) │ your session, Anthropic credentials
│ │
│ └─ mcp: openrouter ──────┼──▶ spawn: claude -p (fresh env)
└────────────────────────────┘ ANTHROPIC_BASE_URL=https://openrouter.ai/api
ANTHROPIC_AUTH_TOKEN=sk-or-v1-…
→ deepseek/deepseek-v4-flash-0731これは claude-ollama-delegate-mcp の兄弟プロジェクトです。こちらはローカルの Ollama サーバーに対して同じことを行います。ここでのすべてを形作る違いは、OpenRouter は実際に費用がかかり、400 以上のモデルを提供しているということです。そのため、このパッケージには API キーのパス、価格付きのモデルカタログ、ジョブごとのコストレポートが追加されています。
クイックスタート
# 1. an OpenRouter API key: https://openrouter.ai/keys
export OPENROUTER_API_KEY=sk-or-v1-...
# 2. register the server
claude mcp add openrouter --scope user -- npx -y claude-openrouter-delegate-mcp
# 3. restart your Claude Code sessionその後、平易な言葉で委譲を依頼します:
delegate this to openrouter: summarise every exported symbol in src/
デフォルトでは、サーバーは明示的に依頼した場合のみ委譲します。オーケストレーターに独自の判断で決定させるには、委譲モードを参照してください。
Related MCP server: opencode-delegate
目次
仕組み
OpenRouter は、OpenAI 形式のエンドポイントに加えて Anthropic 互換の POST /v1/messages エンドポイントを公開しているため、Claude Code は正しいベース URL を指定すれば変更なしで通信できます。各委譲タスクは、それぞれのプロセス内で claude -p として実行され、以下の設定が適用されます:
ANTHROPIC_BASE_URL=https://openrouter.ai/api
ANTHROPIC_AUTH_TOKEN=<your OpenRouter key>
ANTHROPIC_DEFAULT_OPUS_MODEL=<model>
ANTHROPIC_DEFAULT_SONNET_MODEL=<model>
ANTHROPIC_DEFAULT_HAIKU_MODEL=<small model>
ANTHROPIC_SMALL_FAST_MODEL=<small model>
CLAUDE_CODE_SUBAGENT_MODEL=<model>
ANTHROPIC_CUSTOM_HEADERS=HTTP-Referer: …⏎X-Title: …
CLAUDE_CODE_MAX_OUTPUT_TOKENS=<clamped per model>ベース URL は /api で終わります。これは Claude Code が自身で /v1/messages を追加するためです。ANTHROPIC_API_KEY ではなく ANTHROPIC_AUTH_TOKEN が使用されるのは、これが Authorization: Bearer <key> として送信され、OpenRouter が期待するスキームだからです。
子環境は、プラットフォームごとの小さな許可リストから構築されます。ANTHROPIC_*、CLAUDE_*、AWS_*、GOOGLE_*、AZURE_*、OPENAI_*、BEDROCK_*、VERTEX_*、または OPENROUTER_* に一致するものはすべて、OpenRouter の値が適用される前に削除されます。最後のプレフィックスは意図的なものです。委譲先はキーを ANTHROPIC_AUTH_TOKEN としてのみ必要とするため、委譲先が実行する他のツールが拾い上げる可能性のある別の名前でキーのコピーを受け取ることはありません。
委譲先はまた、--strict-mcp-config と MCP 設定なしで起動します。これにより起動が高速になり、このサーバーを再帰的に呼び出すことを防ぎます。
省略できない 2 つの詳細
出力トークンのクランプ。 Claude Code はすべてのリクエストで max_tokens: 32000 を要求します。多くの OpenRouter モデルはより低い上限を持ち(amazon/nova-micro-v1 は 5120 を許可)、リクエストを拒否します。サーバーはカタログから top_provider.max_completion_tokens を読み取り、CLAUDE_CODE_MAX_OUTPUT_TOKENS を選択したモデルが実際に受け入れる値に固定します。
ツール呼び出しは必須です。 Claude Code はすべてのリクエストで完全なツールスキーマを含む約 110 KB のボディを送信します。ツールを呼び出せないモデルは、支払い後に最初のターンで失敗します。サーバーはカタログの supported_parameters を使用して、そのようなモデルを事前に拒否します。
前提条件
要件 | 備考 |
Node.js 20+ |
|
OpenRouter アカウント | openrouter.ai/keys。クレジットのチャージが必要です。 |
Claude Code CLI | claude.com/code。 |
node --version
claude --version
curl -s -H "Authorization: Bearer $OPENROUTER_API_KEY" \
https://openrouter.ai/api/v1/credits # {"data":{"total_credits":…}}インストール
npm から(推奨)
claude mcp add openrouter --scope user \
--env OPENROUTER_API_KEY=sk-or-v1-... \
-- npx -y claude-openrouter-delegate-mcpまたはグローバルにインストールします。これにより設定 CLI も PATH に配置されます:
npm install -g claude-openrouter-delegate-mcp
openrouter-mcp-config --api-key sk-or-v1-...
claude mcp add openrouter --scope user -- claude-openrouter-delegate-mcpソースから
git clone https://github.com/histonedev/claude-openrouter-delegate-mcp.git
cd claude-openrouter-delegate-mcp
npm install # builds automatically via the prepare script
claude mcp add openrouter --scope user -- node "$(pwd)/dist/index.js"設定 CLI を node dist/cli.js … として実行するか、npm link で openrouter-mcp-config を PATH に配置します。
確認
claude mcp list # openrouter: ... - ✔ Connectedその後、Claude Code セッションを再起動してください。ツールリストは起動時に読み込まれます。
API キー
以下のうち最初に設定されているものから解決されます:
OPENROUTER_API_KEY(最優先 — エコシステムの他の部分が使用する名前)OPENROUTER_MCP_API_KEY設定ファイル内の
apiKeyFile— キーを含むファイルへのパス設定ファイル内の
apiKey
openrouter-mcp-config --api-key sk-or-v1-... # writes ~/.openrouter-mcp/config.json, mode 0600
openrouter-mcp-config --api-key-file ~/.secrets/or # or keep it somewhere else entirelyキーが MCP ツールを通じて公開されることはありません。openrouter_models は sk-or-v1-a...7f2e として報告し、CLI も同じマスク形式を出力し、設定ファイルは 0600 で書き込まれます。--api-key --scope project で渡されたキーはユーザー設定にリダイレクトされます。プロジェクト設定はコミットされるためです。
キーをディスクに一切置きたくない場合は、MCP 登録時に --env OPENROUTER_API_KEY=… で固定し、設定ファイルをスキップしてください。
設定
設定は 4 つのレイヤーから解決され、後者が優先されます:
組み込みのデフォルト
ユーザー設定 —
~/.openrouter-mcp/config.json($OPENROUTER_MCP_CONFIGで上書き可能)プロジェクト設定 — サーバーの作業ディレクトリ内の
./openrouter-mcp.config.json環境変数
{
"delegationMode": "ondemand",
"defaultModel": "deepseek/deepseek-v4-flash-0731",
"smallModel": "google/gemini-3.7-flash",
"allowedModels": ["deepseek/deepseek-v4-flash-0731", "qwen/qwen3.7-flash"],
"defaultPermissionMode": "auto",
"maxOutputTokens": 16000,
"requireToolSupport": true
}設定 | 環境変数 | デフォルト | 意味 |
|
|
| 委譲をどの程度積極的に使用するか |
|
| — | OpenRouter キー |
|
|
| 呼び出しで省略された場合のモデル |
|
|
| 委譲先のバックグラウンド/ユーティリティスロット用モデル |
|
|
| 委譲が使用できるモデル |
|
|
| 委譲先のパーミッションモード |
|
|
| 上限。モデルごとにさらにクランプされる |
|
|
| ツールを呼び出せないモデルを拒否 |
|
|
| エンドポイント(プロキシがある場合はそれを指定) |
|
| このリポジトリ |
|
|
|
| Claude Code CLI へのパス |
|
|
| プロンプト、トランスクリプト、結果 |
|
|
| 1 ターンの強制終了時間 |
|
|
| これを超える出力は切り詰められ、完全なテキストはディスクに保存 |
設定の変更
設定はモデルではなく、ターミナルから変更します:
openrouter-mcp-config # show current settings + active layers
openrouter-mcp-config --mode auto # off | ondemand | auto
openrouter-mcp-config --default-model qwen/qwen3.7-flash
openrouter-mcp-config --small-model google/gemini-3.7-flash
openrouter-mcp-config --allow deepseek/deepseek-v4-flash-0731,qwen/qwen3.7-flash
openrouter-mcp-config --permission-mode acceptEdits
openrouter-mcp-config --scope project # write ./openrouter-mcp.config.jsonその後、Claude Code セッションを再起動して、サーバーが設定を再読み込みするようにします。
これ用の MCP ツールは意図的に存在しません。 セキュリティモデルを参照してください。
委譲モード
これは、モデルが実際に読み取るツールの説明を書き換えることで、オーケストレーターが委譲にどの程度積極的に手を伸ばすかを制御します。変更にはセッションの再起動が必要です(設計上の意図です)。
モード | 効果 |
|
|
| 明示的に依頼した場合のみ委譲します —「delegate this」「use openrouter」「ask deepseek」など。 |
| オーケストレーターが独自に判断し、説明に組み込まれた基準を使用します。 |
どちらのモードにも明示的なコスト警告が含まれます。ローカルモデルとは異なり、委譲されたすべてのターンが課金され、すべてのリクエストが数万の入力トークンを運ぶためです。
モデルの選択
OpenRouter は 400 以上のモデルを提供しています。openrouter_models はツール対応のものにフィルタリングし、デフォルトで切り詰めます。カタログ全体をオーケストレーターのコンテキストに投入すること自体が高コストだからです。
openrouter_models({ filter: "gemini", limit: 10 })
openrouter_models({ free_only: true })デフォルトは deepseek/deepseek-v4-flash-0731 です。ツール対応、1.3M コンテキスト、そして安価です。allowedModels を設定して、信頼するショートリストに委譲を固定してください。許可されたセットは delegate_start の説明に埋め込まれるため、オーケストレーターは追加の呼び出しなしでメニューを把握でき、他のモデルは黙って代替されるのではなく名前で拒否されます。
モデルの品質はさまざまで、それはあなたが管理すべき問題です
これらは Claude モデルではなく、Claude Code はチャット UI よりもモデルに強く依存します。このパッケージの構築中に、実際の実行で観察されたこと:
モデルがツールを正しく呼び出しても、最終テキストを返さないことがあります。作業は行われましたが、締めくくりのメッセージがありませんでした。サーバーはこれを検出し、空の結果の代わりに記録されたアクティビティトレイルを返します。
モデルが独自のネイティブなツール呼び出しマークアップをプレーンテキストとして出力することがあります — DeepSeek が推論ブロック内で
<|DSML|tool_calls>を生成するなど — 構造化されたツール呼び出しの代わりに。何も実行されず、トークンは依然として課金されます。プロンプトが長く複雑になるほど、これが発生する可能性が高くなります。完了したジョブの
tool calls: 0注釈は、古典的な失敗のためにあります。つまり、ツール呼び出しに裏付けられていない、リポジトリに関する自信満々の回答です。
弱いモデルには短く単一目的のプロンプトを好み、max_turns で作業を制限し、主張が重要な場合は delegate_status を確認してください。
コスト
完了したすべてのジョブがコストを報告し、ラベルはその信頼度を示します:
cost: $0.00045 (billed by OpenRouter, 1 generation(s))
cost: >=$0.00045 (billed so far -- 1 of 2 generations recorded)
cost: $0.00924 (rough list-price estimate; actual routing may differ several-fold)OpenRouterは生成IDをAnthropicのメッセージIDとして返すため、サーバーはそれらを収集し、/v1/generationに各リクエストの実際のコストを問い合わせます。それが信頼できる数値です。課金レコードは生成終了の少し後に届くため、ジョブは一時的に部分合計を報告することがあります — >=として表示され、最終的な数値としては決して表示されません。なぜなら、コスト表示が誤ってはいけない方向は下方向だけだからです。
見積もりは、レコードを取得できない場合のフォールバックです。桁レベルの目安としてのみ扱ってください。テストでは、同じモデルで同一のトークン数が、プロバイダーのルーティングとキャッシュヒットによって10倍も請求が異なり、ある実行ではリスト価格での計算が20倍高くなりました。
トークン数について知っておくべきことが2つあります:
Claude Codeはプロンプトのほぼ全体を
input_tokensではなくcache_creation_input_tokensとして報告します。tokens: in …の行はすべての入力クラスを合計します。「12 input tokens」のように見えるジョブは、実際には~42,000です。OpenRouterはキャッシュを尊重しないプロバイダーにルーティングすることが多く(
native_tokens_cached: 0)、そのため再開された会話はキャッシュ読み取りの数値が示すほど安くはありません。
コスト削減。 smallModelが最も効果的なレバーです。Claude Codeのhaikuスロットはバックグラウンドのユーティリティ呼び出しを担当しており、メインモデルは高性能なまま、そこに安価なモデルを指定しても品質はほとんど損なわれません。次にmax_turnsがエージェントのループを制限し、allowed_toolsがデリゲートにタスクに必要な以上にリポジトリを探索させないようにします。
ツールリファレンス
ツール | 目的 |
| モデルと価格・コンテキストウィンドウを一覧表示し、設定とクレジット残高を報告します(読み取り専用) |
| タスクを開始し、即座に |
| 同じセッションに別のメッセージを送信します |
| 状態をポーリングし、デリゲートのツール呼び出しの末尾も取得します |
| 最終出力を収集します |
| 実行中のデリゲートとそれが開始したすべてを終了します |
| ジョブを会話ごとにグループ化し、総支出とともに一覧表示します |
delegate_start
パラメータ | 型 | 備考 |
| string | タスク。 |
| string | プロンプトを保持するファイルへのパス。長い場合はこちらが推奨されます。 |
| string | OpenRouter ID(例: |
| string | この呼び出しでバックグラウンド/ユーティリティモデルを上書きします。 |
| string | デリゲートの作業ディレクトリ。 |
| enum |
|
| string[] | 例: |
| string[] | 例: |
| string | デリゲートへの追加の指示 |
| number | デリゲートのエージェントターンを制限 — コスト上限にもなります |
| string[] | 追加でアクセス可能なディレクトリ |
| number | 最大N秒間ブロック(0–600)。デフォルト0 = 即座に返ります。 |
delegate_followupはjob_idまたはsession_idを受け取り、さらに同じprompt/prompt_fileのペアと、オプションのpermission_mode、max_turns、wait_secondsを受け取ります。
運用
デフォルトで非同期
delegate_startはミリ秒単位でjob_idを返し、デリゲートはバックグラウンドで実行を続けます。これにより、長時間のタスクがセッションを停止させたり、MCPクライアントのタイムアウトを引き起こしたりするのを防ぎます。ほとんどのクライアントは60秒後に単一のリクエストを諦めますが、これは多くのデリゲートタスクがかかる時間より短いのです。
delegate_start({ prompt: "Audit src/ for unused exports" })
→ job_id A, session_id S, turn 1, state: running
delegate_status({ job_id: "A" })
→ recent activity:
[tool] Grep: export
[tool] Read: /repo/src/index.ts
delegate_result({ job_id: "A" })
→ the final text代わりにブロックするには、それらのいずれかにwait_secondsを渡します。短いタスクには便利ですが、クライアントのリクエストタイムアウト未満に抑えてください。
双方向の会話
すべてのジョブにはsession_idが付いています。そのjob_idをdelegate_followupに渡すと、完全な履歴を持つセッションが再開されます。session_idはターンをまたいで安定していますが、各ターンは新しいjob_idを取得します。
delegate_start({ prompt: "Summarise the auth flow in this repo" })
→ job A, session S, turn 1
delegate_followup({ job_id: "A", prompt: "Now list every place it can fail" })
→ job B, session S, turn 2 (delegate still remembers turn 1)再開すると会話が入力トークンとして再生されるため、長いスレッドは新しいスレッドよりも1ターンあたりのコストが高くなります。ただし、同じコンテキストを再構築するよりははるかに安価です。
長いプロンプト
すべてのプロンプトパラメータにはprompt_file版があります。内部的には、プロンプトは常にディスクに書き込まれ、stdinを介してCLIに渡されます — argvエントリとしても、シェル経由でもありません。バッククォート、$(...)、引用符、改行、glob文字はそのまま通過し、argvの長さ制限もありません。
権限
// read-only review
delegate_start({ prompt: "...", disallowed_tools: ["Write", "Edit", "NotebookEdit"] })
// tightly scoped
delegate_start({ prompt: "...", allowed_tools: ["Read", "Grep", "Glob"] })キャンセル
delegate_cancel({ job_id: "A" })デリゲートとそれが開始したすべてを強制終了し、それ以上クレジットを消費しないようにします。サーバーはシャットダウン時にも実行中のデリゲートを強制終了します。
ジョブのアーティファクト
各ジョブは~/.openrouter-mcp/jobs/<job_id>/に書き込みます:
ファイル | 内容 |
| 送信されたものそのもの |
| すべてのツール呼び出しとツール結果を含む完全な |
| メタデータ:状態、モデル、トークン、コスト、生成ID、タイミング、終了コード |
| 最終出力テキスト |
stream.jsonlは、デリゲートの要約が説得力に欠ける場合に確認すべき場所です。そこにはモデルによる説明ではなく、実際のツール結果が保持されています。自動的に削除されるものはありません — 好きなときにディレクトリを削除してください。
トラブルシューティング
No OpenRouter API key configured
OPENROUTER_API_KEYを設定するか、openrouter-mcp-config --api-key sk-or-v1-...を実行してから、セッションを再起動してください。
OpenRouter rejected the API key (HTTP 401)
openrouter.ai/keysで確認してください。キーはサーバー起動時に読み込まれるため、新しいキーにはセッションの再起動が必要です。
Model "x" does not support tool calling
意図した動作です — Claude Codeはすべてのリクエストでツールスキーマを送信します。別のモデルを選ぶか、それでも試す場合はrequireToolSupport: falseを設定してください。
Model "x" is not in the allowed list
意図した動作です。openrouter-mcp-config --allow <models>を実行してから再起動してください。
デリゲートがテキストを返さない、またはツール呼び出しが何も実行しない
配線の問題ではなく、モデルの品質の問題です — モデルの品質はばらつくを参照してください。より短いプロンプトやより高性能なモデルを試し、stream.jsonlを読んで実際に何が起こったのかを確認してください。
MCPクライアントからのRequest timed out
wait_secondsがクライアントのリクエストごとのタイムアウト(多くの場合60秒)を超えました。wait_secondsを外し、代わりにdelegate_statusでポーリングしてください — それが非同期設計の目的です。
max_tokensに関するHTTP 400
モデルの出力上限が要求された値より低いです。サーバーはカタログの値に自動的にクランプします。カタログが誤っている場合はmaxOutputTokensを下げてください。
ツールがClaude Codeに表示されない
ツールリストはセッション開始時に読み込まれます。再起動するか、claude mcp listで確認してください。
デリゲートが起動エラーですぐに失敗する
CLIが見つかりませんでした。OPENROUTER_MCP_CLAUDE_BINにclaudeの絶対パスを設定してください。
プラットフォームサポート
プラットフォーム | 状態 |
Windows | エンドツーエンドでテスト済み |
macOS | サポート対象。Linuxと同じPOSIXコードパス |
Linux | サポート対象 |
プラットフォームの違いはsrc/platform.tsに分離されています:
バイナリの解決。 POSIXではspawnがPATHを検索します。Windowsでは、ネイティブインストールではclaude.exe、npmインストールではclaude.cmdが生成されますが、CreateProcessは.cmdを直接実行できません — そのためサーバーは.exe優先でPATH × PATHEXTを走査し、.cmdシムをcmd.exe経由でルーティングするフォールバックを使用します。
引数のエスケープ。 そのフォールバックは2つのレイヤーを適用します:MSVCRTのargvクオート、次にcmd自身のメタ文字(& | < > ^ " ( ) % !)のキャレットエスケープです。2番目のレイヤーを省略するのは、古典的な.cmdコマンドインジェクションの穴です。プロンプトはこのパスには決して触れません — stdin経由で渡されます。制限が1つあります:複数行の append_system_promptはcmd.exeのコマンドラインをまたげないため、サーバーはそれを静かに壊すのではなく、OPENROUTER_MCP_CLAUDE_BINを指す明確なエラーを発生させます。
環境変数の許可リスト。 WindowsはPOSIXよりもはるかに多くの環境変数を保持します。SystemRootとwindirは必須です — これらを取り除くとWinsockが初期化に失敗し、子プロセスはソケットをまったく開けなくなります。
キャンセル。 POSIXでは子プロセスはプロセスグループリーダーとしてdetachedで生成され、process.kill(-pid)でキャンセルされます。Windowsではtaskkill /T /Fを使用します。
セキュリティモデル
資格情報の分離がポイントです。 子プロセスの環境は継承ではなくゼロから構築され、OpenRouterの値が適用される前にプロバイダー変数が取り除かれます。test/env-unit.mjsは、キーが正確に1つの変数で子プロセスに届き、親の秘密情報が残らないことを検証します。test/e2e.mjsは、偽のANTHROPIC_API_KEYと実際のANTHROPIC_BASE_URL=https://api.anthropic.comで親を汚染し、デリゲートがどちらも見えないことを確認します。
キーはツール経由では決して読み取れません。 すべての診断パスがキーをマスクし、test/readonly.mjsはツール出力にもCLI出力にもキーが含まれないことを検証します。これは、トークンがリテラル文字列ollamaであるOllama版よりも、ここでの方が重要です。
委任ポリシーはモデルから書き換えられません。 delegationMode、allowedModels、APIキーを変更するMCPツールはありません。ondemandが不便だと感じたモデルが、自分でautoに切り替えて支出を開始することはできません。設定は起動時に一度だけ読み込まれ、実行時に変更されることはなく、ツールの説明にもポリシーはモデルが変更できるものではないと明記されています。
これはガードレールであり、セキュリティ境界ではありません。 シェルアクセスを持つエージェントは設定ファイルを編集できます。ツールを削除することで得られるのは、そのような変更がタスク途中の単発の静かなツール呼び出しではなく、次回の再起動時にのみ有効になる可視的なファイル編集であることです。完全に防ぐには、MCP登録時に--envで値を固定してください。これにより設定ファイルが上書きされます:
claude mcp add openrouter --scope user \
--env OPENROUTER_API_KEY=sk-or-v1-... \
--env OPENROUTER_MCP_DELEGATION_MODE=ondemand \
--env OPENROUTER_MCP_ALLOWED_MODELS=deepseek/deepseek-v4-flash-0731 \
-- node /path/to/claude-openrouter-delegate-mcp/dist/index.js支出は現実です。 暴走したautoモードのオーケストレーターは、あなたの忍耐ではなくクレジットを消費します。このサーバーに渡すキーにはOpenRouterのキー上限を設定しておいてください — それはモデルが抗弁できない上限です。
デリゲートはあなたのファイルシステムを継承します。 デリゲートはあなたのユーザーとして、指定したcwdで、defaultPermissionModeで実行されます。委任されたセッションは通常のClaude Codeセッションと同じように扱ってください — 信頼度の低いモデルに作業を任せる場合は、disallowed_toolsまたは読み取り専用の権限モードを使用してください。
開発
npm install # installs and builds
npm run build # tsc
npm run dev # tsc --watchテスト
node test/env-unit.mjs # env isolation, key handling, model slot wiring
node test/pricing-unit.mjs # cost arithmetic, catalog filtering, URL normalisation
node test/quoting.mjs # Windows argv/cmd escaping, incl. an injection probe
node test/killtree-unit.mjs # process-tree termination (cross-platform)
OPENROUTER_API_KEY=... node test/e2e.mjs # full MCP round trip (costs ~$0.01)
OPENROUTER_API_KEY=... node test/async.mjs # async polling, prompt_file, cancel
CFG_PATH=/tmp/c.json CFG_CWD=/tmp node test/readonly.mjs # config is read-only to the modelnpm test はネットワークを必要としない4つのテストを実行します。これらは Windows と POSIX の両方で成功します。プロセッスツリーのテストはシェルの組み込みコマンドではなく node プロセスからツリーを構築するため、POSIX 専用ではありません。
リリースの公開
npm login # interactive, once per machine
npm version patch # or minor / major -- tags and bumps
npm publish # prepare script builds first
git push --follow-tagsnpm publish はスクリプトや非対話シェルではなく、実際のターミナルから実行してください。WebAuthn/セキュリティキー 2FA では、CLI はブラウザを開いてチャレンジを完了します。TTY がないとそれができないため、セキュリティキーでは生成できない TOTP コードを要求するようにフォールバックします(npm error code EOTP)。CI では、代わりに Bypass 2FA 付きのきめ細かいアクセストークンを使用してください。
パッケージには dist/、README.md、LICENSE のみが含まれます。publishConfig.access は public で、prepare はパッキング前に tsc を実行するため、古い dist/ が公開されることはありません。
レイアウト
File | Responsibility |
| MCP サーバー、ツール登録、ハンドラー |
| 階層化された設定の読み込み、API キーの解決、マスキング |
| 起動時に解決される設定シングルトン |
| モード依存のツール説明、コスト警告 |
| 子環境の構築とプロバイダー変数のブロックリスト |
| Windows/POSIX の spawn、引数のエスケープ、プロセッスツリーの強制終了 |
| ジョブのライフサイクル、 |
| カタログ、価格設定、ツールサポートの強制、請求ルックアップ |
|
|
ライセンス
MIT — LICENSE を参照してください。
Available Tools
7 toolsdelegate_cancelCancel a delegated taskA
Terminate a running delegated session and everything it started. Also stops it spending any more of the user's OpenRouter credits.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job_id to cancel. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool terminates 'everything it started' and stops spending credits, which are important behavioral consequences. However, it doesn't mention whether the cancellation is reversible or what happens to already-completed results.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action, and includes a key secondary effect (credit spending). No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema, no annotations), the description is fairly complete. It covers the main action and a critical side effect. It could mention that the job must be running, but that's implied by 'running delegated session'.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100% for the single parameter 'job_id', which is self-explanatory. The description adds no extra meaning beyond the schema, but since the schema already fully documents the parameter, a baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Terminate a running delegated session and everything it started.' It uses a specific verb ('Terminate') and resource ('running delegated session'), and distinguishes it from siblings like delegate_start and delegate_status by focusing on cancellation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (when a delegated session is running and needs to be stopped), but does not explicitly mention alternatives or when not to use it. It also doesn't clarify that it's for running sessions only, which could be inferred but not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delegate_followupContinue a delegated conversationA
Send another message to an existing delegated session, resuming its full conversation history. Identify it by job_id (any turn) or session_id. Returns a new job_id for this turn while keeping the same session_id, so you can go back and forth with the delegate.
Note that resuming replays the whole conversation as input tokens, so a long thread costs more per turn than a fresh one -- but still far less than re-establishing the same context from scratch.
Only continue conversations the user asked you to start.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | No | A job_id from any earlier turn of the conversation. | |
| prompt | No | The next message. Use prompt_file for long prompts. | |
| max_turns | No | Cap the delegate's agentic turns for this turn. | |
| session_id | No | The Claude Code session id, as an alternative to job_id. | |
| prompt_file | No | Path to a file holding the next message. | |
| wait_seconds | No | Block up to this many seconds before returning. | |
| permission_mode | No | Override the permission mode for this turn. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the burden. It discloses that resuming replays the whole conversation as input tokens and notes cost implications, and clearly states that a new job_id is returned while session_id stays constant. This is transparent behavioral info beyond the basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: a few sentences, front-loaded with the main purpose and identification methods. Every sentence adds value (usage guidance, cost note, return behavior). No fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 7 params, no required, no output schema, no annotations. The description covers the key behaviors (return values, cost, when to use). It doesn't describe error cases or all parameter nuances, but it handles the most important aspects. Slightly better than average for a delegation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining how job_id vs session_id identify the session (any turn or session_id), and advises using prompt_file for long prompts讷. It also implies that wait_seconds and permission_mode are per-turn overrides, though not explicit. Slightly above baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Send another message to an existing delegated session, resuming its full conversation history.' It uses a specific verb (send) and resource (delegated session), and differentiates from siblings like delegate_start by focusing on continuation rather than initiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use it: 'Send another message to an existing delegated session' and 'Only continue conversations the user asked you to start,' which sets a clear usage boundary. It also explains the alternative of starting fresh (and cost trade-offs), and mentions using prompt_file for long prompts, giving practical guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delegate_listList delegated tasksA
Show delegated jobs from this server's lifetime, newest first, grouped by conversation, with the estimated total spend.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum jobs to list. Default 20. | |
| state | No | Filter by state. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It transparently mentions key behaviors: shows jobs from the server's lifetime (all historical jobs), orders newest first, groups by conversation, and includes estimated total spend. This goes beyond a generic 'list' by specifying output structure and a calculated metric, providing useful expectations for the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, information-dense sentence that covers purpose, ordering, grouping, and an output summary metric. No wasted words; it front-loads the primary function and key behavioral details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is a simple list operation with two optional parameters well-described in the schema. The description adds value by specifying sort order, grouping, and the spend estimate, which are not in the schema. It lacks information about pagination or default limits, but the schema covers the limit parameter. Overall, sufficient for the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% coverage with descriptions for both `limit` and `state`. The description itself does not add meaning beyond what the schema provides; the mention of filtering by state is implied by the parameter but not elaborated. Since coverage is complete, the baseline is 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: to show delegated jobs from the server's lifetime, with specific ordering (newest first), grouping (by conversation), and a summary metric (estimated total spend). It uses an action verb ('show') and a resource ('delegated jobs'), and the scope is well-defined, distinguishing it from action-oriented siblings like delegate_start or delegate_cancel.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys that this is a list operation for delegated jobs, which differentiates it from the action-oriented siblings (start, followup, status, result, cancel). However, it does not explicitly state when to use this tool instead of others, such as delegate_status for checking a single job's status, or mention any preconditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delegate_resultGet a delegated task's outputA
Return the final text produced by a delegated session, with its token usage, estimated cost and session_id for follow-ups. Blocks until the job finishes if you pass wait_seconds.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job_id to collect. | |
| wait_seconds | No | Block up to this many seconds for the job to finish. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It explicitly discloses the blocking behavior with wait_seconds and details what is returned (text, token usage, cost, session_id). However, it does not state whether the operation is read-only or what happens if the job is not finished when wait_seconds is not passed, leaving minor behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short, dense sentences. The first states the core functionality and return fields, and the second provides the critical blocking behavior. No waste, information is front-loaded, and it is easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool without an output schema, the description covers the essentials: what it returns, the optional blocking behavior, and follow-up information. It does not address failure scenarios or the result when the job is incomplete without wait_seconds, but these are minor gaps given the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents job_id and wait_seconds. The description does not add any extra meaning to the parameters beyond what the schema provides, so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies that the tool returns the final text of a delegated session along with token usage, cost, and session ID. It distinguishes itself from siblings like delegate_status (status checks) and delegate_followup (continuations) by focusing on retrieving the completed output, making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (when you need the final output) and mentions blocking with wait_seconds, but does not explicitly contrast it with alternatives like delegate_status or delegate_followup, nor does it state when not to use it. This is clear context without exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delegate_startDelegate a task to an OpenRouter modelA
Start a headless Claude Code session backed by an OpenRouter model and return immediately with a job_id. It runs in its own process with its own environment, so your Anthropic credentials and model settings are untouched. Poll with delegate_status, collect with delegate_result, and continue the conversation with delegate_followup. Pass prompt_file for long prompts.
Default: deepseek/deepseek-v4-flash-0731.
WHEN TO USE -- ON EXPLICIT REQUEST ONLY. Delegation mode is "ondemand". Call this only when the user actually asks for it: "delegate this", "use openrouter", "ask gemini", "run this on a cheaper model", or when they name an OpenRouter model. If the user has not asked for delegation, do the work yourself and do not offer this tool unprompted.
COSTS REAL MONEY. Each delegated turn is billed to the user's OpenRouter credits, and every request carries Claude Code's full system prompt and tool schema (tens of thousands of input tokens), so even a short task is not free. Do not delegate speculatively, do not retry a failed delegation repeatedly without changing something, and prefer one well-specified task over several exploratory ones. Reported costs are estimates from list prices; the authoritative figure is on openrouter.ai/activity.
This policy is set by the user and is not yours to change. If it is getting in the way, say so and let the user run openrouter-mcp-config; do not edit config files to widen it.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the delegated session. Defaults to the server's cwd. | |
| model | No | OpenRouter model id, e.g. "google/gemini-2.5-flash". Must be in the allowed list. | |
| prompt | No | The task for the delegated session. Use prompt_file for long prompts. | |
| add_dirs | No | Additional directories the delegate may access. | |
| max_turns | No | Cap the delegate's agentic turns. Each turn is billed, so this is also a cost cap. | |
| prompt_file | No | Path to a file holding the prompt. Preferred for long or special-character-heavy prompts. | |
| small_model | No | Model for the delegate's background/small-model slot. Defaults to the configured one. | |
| wait_seconds | No | Block up to this many seconds for completion. Default 0. | |
| allowed_tools | No | Tool allowlist, e.g. ['Read','Grep','Bash(git *)']. | |
| permission_mode | No | Permission mode for the delegate. Defaults to the configured default. | |
| disallowed_tools | No | Tool denylist, e.g. ['Write','Edit']. | |
| append_system_prompt | No | Extra instructions appended to the delegate's system prompt. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Although no annotations are provided, the description discloses that it runs in its own process, doesn't touch Anthropic credentials, and prominently warns 'COSTS REAL MONEY' with billing details and token usage. It also notes the async nature (return immediately).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with clear sections (purpose, behavior, when-to-use, cost, policy). Though somewhat verbose, each sentence adds value—warnings about cost and usage are important.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers async behavior, cost implications, policy, and references sibling tools (delegate_status, delegate_result). Given the complexity of delegation (cost, permissions, background process), this description is complete enough for an agent to act.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers all 12 parameters with descriptions (100% coverage). The description adds minimal extra beyond schema, e.g., 'Pass `prompt_file` for long prompts' which is already implied. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Start a headless Claude Code session backed by an OpenRouter model and return immediately with a job_id.' It distinguishes from sibling tools by outlining the delegation flow (status, result, followup).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly specifies when to use: 'ON EXPLICIT REQUEST ONLY' with concrete examples. Also states 'If the user has not asked for delegation, do the work yourself and do not offer this tool unprompted.' Provides clear alternatives and cost warnings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delegate_statusCheck a delegated taskA
Report whether a delegated job is still running, plus a tail of what the session has been doing -- its actual tool calls and partial text. Optionally block until it finishes. Use the tool-call trace to check that a delegate really did the work it claims.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job_id returned by delegate_start or delegate_followup. | |
| wait_seconds | No | Block up to this many seconds waiting for completion. | |
| progress_limit | No | How many recent activity lines to show. Default 15. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the reporting behavior (status, tail, blocking) and a verification use case. However, it doesn't state whether checking status has side effects (e.g., marks job as read), how errors are handled, or the return format. It adds useful context but is not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary purpose, and contains no redundant or vague wording. It efficiently communicates the tool's function and a key use case.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a status tool with 3 parameters and no output schema, the description covers the essential aspects: status reporting, activity tail, optional blocking, and verification usage. It doesn't detail the return structure, but the description's 'report whether... plus a tail' gives a sufficient mental model. The lack of an explicit non-destructive note is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description's references to blocking and tail map to wait_seconds and progress_limit, but the schema already describes these parameters clearly. No additional meaning is added beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reports whether a delegated job is still running, provides a tail of tool calls and partial text, and optionally blocks. This distinguishes it from siblings like delegate_result (fetching final result) and delegate_start/delegate_followup/delegate_cancel/delegate_list. Specific verb+resource with unique features.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a concrete use case: 'Use the tool-call trace to check that a delegate really did the work it claims.' This implies when to use this tool (status/trace verification) and communicates its value over siblings. It doesn't explicitly exclude alternatives or state when not to use, but provides clear context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
openrouter_modelsList OpenRouter modelsA
List OpenRouter models available for delegation with their prices and context windows, plus the current delegation policy, credit balance, and the environment a delegated session receives. OpenRouter serves several hundred models, so results are filtered to tool-capable ones and truncated -- pass filter to search by name and limit to see more. Use this to pick a model, to check the balance before delegating, or to report the configuration when the user asks about it.
These settings are user-controlled. There is no tool to change them: if the user wants a different delegation mode, model policy, or API key, tell them to run openrouter-mcp-config in a terminal and restart the session. Do not edit the config files yourself.
Default: deepseek/deepseek-v4-flash-0731.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum models to list. Default 30. | |
| filter | No | Case-insensitive substring match on model id or name, e.g. "gemini" or "qwen". | |
| free_only | No | Only models that cost nothing. | |
| tools_only | No | Only models that support tool calling. Default true; Claude Code needs it. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does so well. It discloses that results are 'filtered to tool-capable ones and truncated,' that filtering is by default active (tools_only), the default model value, and that these settings are user-controlled with no tool to change them, including a 'do not edit config files' safety instruction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three compact paragraphs, each earning its place: purpose/result orientation, usage guidance with alternatives, and the default model. Front-loaded with the core listing purpose, with no fluff or repetition of schema content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema, the description explicitly states what the response contains (prices, context windows, delegation policy, credit balance, environment). It also covers filtering/truncation behavior, parameter hints, defaults, and the limitation that settings cannot be changed via this tool. This is complete for a listing tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining parameter intent: 'pass `filter` to search by name and `limit` to see more,' and clarifies the default filtering behavior relevant to tools_only. free_only is not mentioned in the description, but the schema already documents it fully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description opens with a specific verb+resource: 'List OpenRouter models available for delegation with their prices and context windows, plus the current delegation policy, credit balance, and the environment a delegated session receives.' It goes beyond a simple name by defining scope (delegation) and the exact data returned. It also clearly distinguishes itself from the sibling delegate_* tools as a read-only listing tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit usage guidance is provided: 'Use this to pick a `model`, to check the balance before delegating, or to report the configuration when the user asks about it.' It also gives when-not-to-use and an alternative action: if the user wants config changes, 'tell them to run `openrouter-mcp-config` in a terminal and restart the session. Do not edit the config files yourself.'
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v1.0.0- First observed
delegate_cancel - First observed
delegate_followup - First observed
delegate_list - First observed
delegate_result - First observed
delegate_start - First observed
delegate_status - First observed
openrouter_models
TDQS
Scored across 7 tools
Each tool maps to a distinct stage or aspect of the delegation lifecycle: models/config discovery, start, follow-up, status, final result, cancel, and list. The only superficially similar pair (delegate_status vs delegate_result) is clearly separated by monitoring vs collecting final output.
Six of seven tools share the clean delegate_ prefix with a readable action, making the lifecycle easy to scan. Minor deviation: delegate_status, delegate_result, and delegate_followup use nouns rather than verbs, and openrouter_models breaks the prefix pattern.
Seven tools is well-scoped for a delegation server: one discovery/config tool plus six lifecycle operations. Each tool covers a necessary step without redundancy or bloat.
The delegation workflow is fully covered: inspect models/config, start, monitor, collect, resume, cancel, and list jobs. Deliberately missing config-editing tools are documented as user-controlled via a separate CLI, so there are no dead ends for the stated purpose.
Maintenance
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Launch your clients' products on up to 100 directories each from Claude, ChatGPT, Cursor or VS Code.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
AI routing, memory, guardrails, and governance. Routes across Claude, GPT, Gemini.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate tasks to free OpenRouter models as callable tools while keeping the Anthropic endpoint for the orchestrator, with optional sandboxed file and shell access.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code and Claude Desktop to delegate coding tasks to any model available in OpenCode while Claude remains the orchestrator, planning work, reviewing diffs, and running tests. Supports synchronous and async delegation, model selection, session continuation, and permission-aware execution.6MIT
- AlicenseAqualityBmaintenanceEnables Claude Code to offload bulk tasks to cheap OpenRouter worker models via tiered model selection, parallel batch execution, daily budget caps, and cost logging.3MIT
- AlicenseBqualityCmaintenanceEnables multi-model inference, model discovery, credit monitoring, and API key management through OpenRouter, integrating with Claude Desktop, Cursor, Antigravity, and Windsurf.4MIT