omniroute-mcp-bridge
omniroute-mcp-bridge
DSH が子プロセスとして起動する stdio MCP ブリッジです(dsh-mcp-client プラグイン、transport: stdio 経由)。tools/list / tools/call を、https://llm.claassen.family/api/mcp/stream にある omniroute streamable-http MCP サーバーにプロキシし、許可リストに載っているツールだけをモデルに公開します。
抑制
アップストリームの streamable-http セッションは、アイドル状態になると終了します("Unknown Mcp-Session-Id" 404)。このブリッジはそのエラーを正確に検出し、失効したクライアントを破棄して、MCP の初期化ハンドシェイクを再実行(新しいセッション ID を取得)して再試行します。これにより、死んだセッションによってツール呼び出しが失敗することがなくなります。
dsh-mcp-clientプラグインにはツールのフィルタリング設定がありません。このブリッジはtools/listをサーバー側でフィルタリングするため、約70個のツールの代わりにomniroute_web_searchのみが公開されます(モデルコンテキストの節約になり、安定したserverName: omnirouteが維持されるため、公開名はmcp__omniroute__omniroute_web_searchのままです)。アップストリームの認証ヘッダーは argv ではなく、子プロセスの env 経由で渡されます。シークレットがプロセス一覧に現れることはありません。シークレットは、Web プロファイルのパーミッション 0600 の
cordis.patch.ymlにのみ存在します。
Related MCP server: mcp-http-bridge
ファイル
ファイル | 目的 |
| stdio MCP サーバーのエントリポイント(DSH から起動される) |
| 注入可能なアップストリームアクセサー。死んだセッションの再初期化ロジックを備える |
| スタンドアローンのライブテスト: 完全な MCP ハンドシェイク + 実際の検索呼び出し |
| 再初期化ループに対する決定的なフェイクアップストリームテスト |
| アップストリームの生のツール名をダンプする |
| アップストリームセッションのアイドル TTL を測定する |
SDK の解決
package.json は、このブリッジの開発時に使用した正確なバージョンに @modelcontextprotocol/sdk を固定しています。取得方法は2つあります。
スタンドアロン: このディレクトリで
npm installを実行します。DSH ホスト内(このデプロイ環境):
node_modulesは/usr/lib/node_modules/@deepseek-ai/dsh/node_modulesへのシンボリックリンクです。そのため、ブリッジは常に DSH 自身の mcp-client プラグインが使うのと同じ SDK ビルドを使用します。このシンボリックリンクは gitignore されているため、その環境でクローンした後は再作成してください:ln -sfn /usr/lib/node_modules/@deepseek-ai/dsh/node_modules node_modules
設定(環境変数。~/.dsh/profiles/web/cordis.patch.yml で設定)
環境変数 | 意味 |
| streamable-http URL(必須) |
| リクエストヘッダーの JSON オブジェクト |
| カンマ区切りの生のツール名(省略時 = すべて) |
|
|
テスト
認証情報は コミットされていません。先にエクスポートしてください(パッチファイルの値を使用):
export MCP_BRIDGE_UPSTREAM_URL='https://llm.claassen.family/api/mcp/stream'
export MCP_BRIDGE_UPSTREAM_HEADERS='{"Authorization":"Bearer …","X-Forwarded-For":"127.0.0.1"}'次に:
node test-reinit.mjs # deterministic: dead session -> re-init -> success (no network needed)
node test-bridge.mjs # live: handshake + filtered list + real search
node probe.mjs # dump the upstream's raw tool names
node probe-ttl2.mjs # measure upstream session idle TTL許可リストの変更
パッチファイル内の MCP_BRIDGE_ALLOWED_TOOLS を編集してください(node probe.mjs で取得した生の名前をカンマ区切りで指定)。include-plugin の HMR がファイル変更時にパッチを再適用し、mcp-client プラグインがブリッジの子プロセスを再生成します。
This server cannot be deployed
Maintenance
Related MCP Connectors
Toolstile is a managed MCP gateway that connects remote MCP servers behind one endpoint, with per-agent permissions, shared accounts and activity logs. Connect at https://mcp.toolstile.com/mcp over Streamable HTTP with OAuth; sign in at https://toolstile.com, select a workspace and connect your upstream servers. Available tools, resources and prompts depend on that workspace and the agent's granted access.
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
MCP server (stdio): check if URLs are alive (status, redirects, latency) via the AgentForge API
Streamable HTTP MCP gateway for NV oOS fleets — one API key, namespaced tools, quotas and policy.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProxies remote HTTP/HTTPS MCP servers over stdio, allowing stdio-based MCP clients to connect to remote servers via Streamable HTTP or SSE transports.MIT
- AlicenseNot gradedqualityDmaintenanceThis server bridges a stdio MCP server to HTTP, allowing MCP clients that communicate over HTTP to use the server's tools. It includes a per-tool allow/deny filter for security.MIT
- FlicenseNot gradedqualityCmaintenanceLets you run a lightweight stdio MCP server in front of an upstream MCP server, exposing only a configured subset of its tools with compact schemas while keeping the full catalog reachable via discover, describe, and call meta-tools.-
- FlicenseNot gradedqualityCmaintenanceEnables local MCP clients to access tools from a remote FastMCP server over stdio, handling OAuth authentication and Streamable HTTP communication.-