No way to forward a static Authorization header to a local container-backed MCP server (SSE readiness probe always 401)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 22/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, go
調査の方向性
Start from waitForInitializeSuccess, the readiness probe that sends an unauthenticated GET and accepts only HTTP 200, and from the local proxy path that forwards requests to container-backed workloads. Compare with the existing --remote-forward-headers and --remote-forward-headers-secret handling for remote servers, and the vMCP passthroughHeaders discussion in #6523 and #6394. Done means the design decides where static headers are configured and applied to both the probe and forwarded requests, which needs maintainer input first.
索引モデルが issue の本文から書いたものです。
説明
Summary
ToolHive cannot proxy a local (non-remote) container-backed MCP server that requires a static Bearer token on its protocol endpoints. The SSE/streamable-HTTP readiness probe (waitForInitializeSuccess) sends an unauthenticated GET to the proxied backend and only accepts HTTP 200 — so a backend whose MCP endpoints are behind an auth gate (e.g. Crawl4AI 0.9.x AuthGateMiddleware) never becomes "ready" and the workload stays stuck in initializing until the 5m timeout (initialize not successful).
Repro
Crawl4AI 0.9.4 (see unclecode/crawl4ai, fail-closed AuthGateMiddleware): every MCP endpoint (/sse, /mcp/sse, /messages) requires Authorization: Bearer $CRAWL4AI_API_TOKEN. ToolHive probe hits http://localhost:<proxy>/sse without a token → always HTTP 401 → workload never ready.
- Probe log:
Still waiting for MCP server to be ready ... last_observed: "HTTP 401"theninitialize not successful after 5m0s (154 attempts, last observed: HTTP 401).
What's missing
A way to tell ToolHive the static credential it should attach to every request it forwards to the (local) backend. Related work exists but only for remote servers and vMCP:
--remote-forward-headers/--remote-forward-headers-secret→ only forremoteservers, not localimage:-backed workloads.- #6523 / #6394 → vMCP
passthroughHeaders— rejected forAuthorization/Cookiewithout an opt-in, and not applicable to the plain local proxy path.
Expected behavior
Optionally attach static headers (e.g. Authorization: Bearer <token> from ToolHive secrets) to the readiness probe and to forwarded MCP requests for local container-backed workloads — so token-protected backends like Crawl4AI 0.9.x can be proxied directly without a custom stdio bridge.
Workaround used
A custom pinned image that runs a stdio bridge in the foreground (the bridge carries the token itself) and is started with --transport stdio. This works but forces every token-protected backend to ship a custom bridge.
Environment
- ToolHive v0.50.0 (Linux, Docker)
- Crawl4AI 0.9.4 (token-protected SSE backend)
- 主要言語
- Go
- スター
- 2.3k
- フォーク
- 318
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 97
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stacklok/toolhive のほかの issue
-
proxyrunner tool-filter middleware strips SEP-2322 Modern envelope from tools/list, breaking vMCP health checks対応中かも @alex-feel が 27 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
stacklok/toolhive#6684 · コメント 5 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
HttpClientBuilder.Build() ignores HTTP(S)_PROXY (auth-server OAuth/DCR calls bypass forward proxy)対応中かも @schonmann が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
stacklok/toolhive#6671 · コメント 2 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
`thv run` ignores `--oidc-insecure-allow-http` and `--thv-ca-bundle` — both dropped in `createOIDCConfig` (same as #1470)対応中かも @7487 が 44 日前に担当しました。 オープンauthentication bug cli oidc p1
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
stacklok/toolhive#6522 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Delete the dead pkg/vmcp/server/adapter package再び着手できるかも @suantea が 11 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Outgoing strategies differ on no-subject-provider fallback (xaa hard-fails, token_exchange and aws_sts fall back) and it is undocumented再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
stacklok/toolhive の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
goharbor/terraform-provider-harbor#655 · コメント 1 件 ·
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
syncthing/syncthing#10935 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
docker/sbx-releases#737 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
area/manager needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
kyma-project/telemetry-manager#3922 ·
メンテナーはふだん 1 日以内に返信