modelcontextprotocol / modelcontextprotocol/csharp-sdk

Add option for automatic server-side keep-alive for SSE responses

Open
#736 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs confirmation
Dominant language
C#
Stars
4.5k
Forks
814
Avg merge
9d 19h
Merged PRs (30d)
4

Description

Describe the bug
I developed a MCP server with SSE endpoint but when a client connects via /sse endpoint, after appx a few minutes later server drops connection. This is happen because Client-side needs from server-side to ping itself. Current release doesnt support this and

Expected behavior
You can add periodic ping option to keep alive for each client connection. (time)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the server's /sse endpoint and trace how each client connection is kept open. Review the existing server options and connection lifecycle before deciding where a configurable periodic ping belongs. Done means clients receive server-side keep-alive pings at the requested interval and connections no longer drop solely because they are idle.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.