Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#1,377 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
5.2k
Fork
594
Merge medio
2g 2h
PR unite (30g)
53

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelcontextprotocol/go-sdk

Tutte le issue di modelcontextprotocol/go-sdk

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.