Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Ping on 2026-07-28 sessions sends a removed method and surfaces confusing errors - propose failing fast

Đã đóng
#1,377 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api

Hướng nghiên cứu

Read ClientSession.Ping in mcp/client.go and inspect the protocol version negotiated by the session. The issue describes a guard and a test that verifies no ping request is sent on a simulated 2026-07-28 session; it also mentions a cmd_test readiness check. Done means Ping returns a descriptive local error for that version and the tests cover the behavior. The author says a patch is ready and plans to send a PR after maintainer feedback.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Follow-up to #1249 / #1174 / #1130, which closed the missing-_meta reports as by design because ping is removed from the 2026-07-28 protocol schema. This issue is about the client-side consequence of that ruling.

What did you do? Connected to a discovery-native 2026-07-28 server (e.g. https://mcp.svelte.dev/mcp) and called ClientSession.Ping.

What did you see? The client sends the removed ping method anyway and surfaces the server's rejection: MCP error -32020: Header mismatch: MCP-Protocol-Version does not match the request protocol version on transports that validate header/meta consistency, or MethodNotFound at dispatch — neither of which tells the caller that the method no longer exists in the negotiated protocol.

What did you expect to see? A clear local error before any round trip, pointing at a liveness check that still works on 2026-07-28 sessions.

SDK version: v1.8.0 (behavior identical on current main: Ping in mcp/client.go sends unconditionally).

Go version: go1.27.1.

Proposal: on sessions negotiated at 2026-07-28, Ping returns a descriptive local error without a round trip — mcp: ping is not supported on 2026-07-28 sessions (the method was removed); verify liveness with tools/list, resources/list, or prompts/list — instead of sending a method the spec removed. No working behavior is lost: every such ping fails today. If this counts as an exported-API behavior change under the proposal process, happy to treat this issue as the proposal seed.

I have a patch ready (guard + a test asserting no ping request is sent on a simulated 2026-07-28 session, plus a cmd_test readiness check that no longer relies on ping) and will send the PR once there's a maintainer read on the direction.

Ngôn ngữ chính
Go
Star
5.2k
Fork
583
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
53

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/go-sdk

Tất cả issue của modelcontextprotocol/go-sdk

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.