modelcontextprotocol / modelcontextprotocol/csharp-sdk

Allow tools to continue running when session is closed

Offen
#623 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement needs confirmation
Vorherrschende Sprache
C#
Sterne
4.5k
Forks
814
Ø Merge
9 T. 19 Std.
Gemergte PRs (30 T.)
4

Beschreibung

Is your feature request related to a problem? Please describe.

A server may implement a long-running tool that should continue running if the client disconnects or session is closed due to idle timeout.

The MCP Spec permits this case and has provisions for reconnecting to the server to resume its connection to the tool (resumable streams), but this is currently not possible with the C# SDK because it terminates tool calls when the session is closed.

Describe the solution you'd like

An option in the McpServerOptions, or maybe in the HttpTransport options, or maybe on individual tools, that skip cancellation of outstanding tool calls when a session is closed.

Describe alternatives you've considered

An alternative might be to not close a session when the client disconnects, and/or disable the idle session timeout.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit nachzuverfolgen, wie der Sitzungsabschluss und Leerlauf-Timeouts ausstehende Tool-Aufrufe im C# SDK abbrechen. Vergleiche McpServerOptions, die Optionen von HttpTransport und die Konfiguration einzelner Tools mit den Vorgaben für wiederaufnehmbare MCP-Streams. Als erledigt gilt die Aufgabe, wenn eine dokumentierte Option berechtigte Tool-Aufrufe nach einer Unterbrechung oder einem Sitzungsabschluss beibehält und die erneute Verbindung zu ihnen unterstützt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
api, backend
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

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