feat(mcp-server): add keep-alive support#2624
Open
tdabasinskas wants to merge 1 commit intodocker:mainfrom
Open
feat(mcp-server): add keep-alive support#2624tdabasinskas wants to merge 1 commit intodocker:mainfrom
tdabasinskas wants to merge 1 commit intodocker:mainfrom
Conversation
ce7ee48 to
984b997
Compare
dgageot
previously approved these changes
May 4, 2026
Member
|
@tdabasinskas not sure why, GitHub doesn't want to merge this one, because of hypothetical merge conflicts. Could you rebase? |
- Add `MCPKeepAlive time.Duration` to `config.RuntimeConfig` and forward it to `mcp.NewServer` via `mcp.ServerOptions.KeepAlive` - Wire a `--mcp-keepalive` flag on the `serve mcp` subcommand; accepts a duration string (e.g. `30s`) - Default `0` preserves the previous behaviour (no keepalive) — opt-in only - The MCP SDK guards keepalive activation with `KeepAlive > 0`, so passing `0` cleanly disables without any extra branching - Useful when the MCP transport sits behind load balancers / NAT gateways that close idle connections; the next tool call would otherwise fail with a transport error rather than transparently reconnecting
984b997 to
b1ba6f5
Compare
Contributor
Author
Done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables keep-alive support for
serve mcp. Defaults to0to keep the existing behavior and be opt-in.