Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

No way to forward a static Authorization header to a local container-backed MCP server (SSE readiness probe always 401)

オープン
#6,798 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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 の本文から書いたものです。

説明

needs-triage

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" then initialize 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 for remote servers, not local image:-backed workloads.
  • #6523 / #6394 → vMCP passthroughHeaders — rejected for Authorization/Cookie without 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stacklok/toolhive のほかの issue

stacklok/toolhive の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。