vMCP: a backend's protocol revision is probed on every Legacy connect, but a cached Modern backend that stops speaking Modern is never reclassified
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by reading vMCP's probeRevision, dispatch, and isRevisionMismatch paths, plus mcpcompat's Initialize and the revision cache behavior. Trace how Legacy and Modern requests handle protocol-version errors, then check the relevant health-check and client connection tests. Done means cached Legacy backends avoid repeated Modern probes and cached Modern backends can recover when a backend serves only Legacy revisions.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Both observations are from vMCP v0.63.0 (toolhive-core v0.0.58, go-sdk v1.8.0), with a backend that runs the TypeScript MCP SDK's streamable HTTP server: firecrawl-mcp 3.37.0, whose CLI serves only the 2025 protocol revisions.
1. A backend cached as Legacy still gets a server/discover on every connect
probeRevision classifies such a backend as Legacy once and caches that. The Legacy path then builds a client through mcpcompat/client.Client.Initialize, which calls gosdk.Client.Connect(ctx, tr, nil). With nil ClientSessionOptions, go-sdk uses its latest version, 2026-07-28, so Connect first POSTs server/discover with MCP-Protocol-Version: 2026-07-28 and falls back to initialize only after that fails. InitializeParams.ProtocolVersion, which vMCP sets, is not passed on to Connect.
So every Legacy connect, including the health check (ListCapabilities every 30 s by default) and every session's backend connect, sends a request the backend is already known to reject. The TypeScript SDK backend answers each one with HTTP 400 (-32000 Bad Request: Unsupported protocol version: 2026-07-28 ...) and logs it at ERROR with a stack trace. Tool calls succeed after the fallback, but one such backend produced several thousand ERROR log entries a day from health checks and connects alone.
Suggestion: when the cached revision is Legacy, connect with the Legacy version directly, for example by passing &gosdk.ClientSessionOptions{ProtocolVersion: request.Params.ProtocolVersion} from mcpcompat Initialize and having vMCP request 2025-11-25 for a backend cached as Legacy. The legacyInit cache flip that turns a Legacy backend into a Modern one when initialize negotiates 2026-07-28 would then need another trigger, such as an occasional re-probe, bounded the way #6185 bounds the refuted-Modern-hint memory with a TTL.
2. A cached Modern backend that answers Modern requests with a generic JSON-RPC error is never reclassified
The reverse direction. Once a backend is cached Modern, dispatch reclassifies it only when isRevisionMismatch holds: errWrongEra, errLegacyResponseBody or errModernNegotiatedDown. A Legacy-only TypeScript SDK backend does not produce any of those. It answers a Modern request with HTTP 400 and a well-formed JSON-RPC error body (code: -32000, message Bad Request: Unsupported protocol version: 2026-07-28 ...), which readModernEnvelope decodes and interpretModernResult returns as a generic modern <method>: rpc error -32000. That is not a mismatch, so the error goes to the caller, nothing re-probes, and the revision cache has no TTL.
We hit the setup for this when enabling 2026-07-28 on such a backend, and it matters in two ordinary operations:
- Rolling back the backend to a build that serves only the 2025 revisions. Every tool call and health check to it fails until the vMCP pod restarts.
- Rolling out a backend with more than one replica. Once one new pod answers
server/discover, vMCP caches Modern, and requests that reach a pod still on the old build fail until that pod is replaced.
The same 400 on the first probe of an uncached backend is classified Legacy correctly (probeRevision's default branch), so only the cached path is affected.
Suggestion: treat an HTTP 400 on a Modern request whose JSON-RPC error is not one of the Modern codes (-32020 to -32022, -32601) as a wrong-era signal, as a bare 400 already is. server/discover has no side effects and a 400 from a Legacy transport means the request was rejected before any handler ran, so retrying under Legacy is safe in that case. Alternatively, re-probe on a failed health check of a cached Modern backend.
- Ngôn ngữ chính
- Go
- Star
- 2.3k
- Fork
- 332
- Merge trung bình
- 19 giờ 39 phút
- Pull request đã merge (30 ngày)
- 174
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stacklok/toolhive
-
Reduce log spam of vMCP pod by logging cache sync messages at debugCó thể làm lại được @FOWEPJF255 đã nhận 8 ngày trước và không có pull request nào đang mở. Đang mởkubernetes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stacklok/toolhive#7109 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
stacklok/toolhive#6925 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
proxyrunner tool-filter middleware strips SEP-2322 Modern envelope from tools/list, breaking vMCP health checksCó thể làm lại được @alex-feel đã nhận 56 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
stacklok/toolhive#6684 · 5 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
HttpClientBuilder.Build() ignores HTTP(S)_PROXY (auth-server OAuth/DCR calls bypass forward proxy)Có thể đã có người làm @schonmann đã nhận 46 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
stacklok/toolhive#6671 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Delete the dead pkg/vmcp/server/adapter packageCó thể làm lại được @suantea đã nhận 40 ngày trước và không có pull request nào đang mở. Đang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của stacklok/toolhive
Issue tương tự
-
HTTP probe loses insecureSkipVerify in the generated probe manifestCó thể đã có người làm @BahaaMattar đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
litmuschaos/litmus#5745 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
messaging/v1: IsGRPCProtocol and InternalMetadataToGrpcMetadata panic on empty or nil metadata valuesCó thể đã có người làm @patelshivani2283-lab đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
stacklok/toolhive-catalog#2024 ·
Maintainer thường phản hồi trong vòng 1 ngày