Bound pre-lifecycle bootstrap attempts in server initialization

Offen
#1,315 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@DaleSeo arbeitet bereits daran.

Seit 02.10.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

enhancement P2 T-service T-transport

Follow-up from #1248.

After #1248, serve_server stays in its bootstrap loop until a request selects a lifecycle. Malformed or unsupported requests get an error response and the loop continues. Discover probes also keep the loop open. This lets clients recover, for example after a bare tools/list without _meta. But a client can also keep the connection in the pre-lifecycle state forever by sending requests that never select a lifecycle.

Open question: should rmcp cap the number of pre-lifecycle attempts (or apply a timeout)? Or should the transport that owns the connection handle this?

Options:

  • Count rejected/bootstrap-neutral requests and return ServerInitializeError after N attempts.
  • Add a configurable bootstrap timeout.
  • Leave this to transports and document that expectation.
Vorherrschende Sprache
Rust
Sterne
4.1k
Forks
694
Ø Merge
4 T. 4 Std.
Gemergte PRs (30 T.)
42

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus modelcontextprotocol/rust-sdk

Alle Issues in modelcontextprotocol/rust-sdk

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.