Skip to content

fix(controller): disable standalone SSE for STREAMABLE_HTTP remote mcp servers - #1974

Merged
EItanya merged 1 commit into
mainfrom
jmhbh/fix-rms-tool-discovery
Jun 8, 2026
Merged

EItanya merged 1 commit into
mainfrom
jmhbh/fix-rms-tool-discovery

Conversation

@jmhbh

@jmhbh jmhbh commented Jun 8, 2026

Copy link
Copy Markdown
Contributor
  • Fixes issue RemoteMCPServer (STREAMABLE_HTTP) tool discovery fails with "context deadline exceeded" when the server keeps the GET SSE listening channel open idle #1955 by disabling SSE for STREAMABLE_HTTP remote mcp servers. The reconciler's createMcpTransport was passing an HTTP client with Timeout: spec.timeout (default 30s) to StreamableClientTransport. After initialize completes, the SDK synchronously opens a GET request for the standalone SSE channel before returning from Connect. A spec-compliant server holds this connection open indefinitely, causing client.Do to block until http.Client.Timeout fires at which point the connection is marked failed and tools/list cannot complete. Since we currently do not implement notification handlers in the reconciler as the primary function is to perform tool discovery. disabling standalone SSE on the transport used for tool discovery fixes the issue and is safe as the SSE stream provides no value in this code path.

Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Copilot AI review requested due to automatic review settings June 8, 2026 01:53
@github-actions github-actions Bot added the bug Something isn't working label Jun 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables the standalone SSE GET “listening channel” when performing tool discovery against STREAMABLE_HTTP Remote MCP servers, preventing discovery from failing when a spec-compliant server holds that connection open idle (issue #1955).

Changes:

  • Set DisableStandaloneSSE: true on the StreamableClientTransport created by the reconciler for RemoteMCPServer tool discovery.
  • Add an E2E regression test that simulates a server accepting GET and hanging, while still allowing POST-based MCP calls to succeed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
go/core/internal/controller/reconciler/reconciler.go Disables standalone SSE on streamable HTTP transport used for tool discovery to avoid discovery timeouts.
go/core/test/e2e/remotemcpserver_tls_test.go Adds an E2E test reproducing the hanging standalone SSE channel scenario for streamable HTTP.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +608 to +612
rms := createRMS(t, cli, v1alpha2.RemoteMCPServerSpec{
URL: buildK8sURL("http://" + ln.Addr().String()),
Protocol: v1alpha2.RemoteMCPServerProtocolStreamableHttp,
Timeout: &timeout,
})
@jmhbh
jmhbh marked this pull request as draft June 8, 2026 02:11
@jmhbh
jmhbh marked this pull request as ready for review June 8, 2026 02:15
@EItanya
EItanya merged commit 529cc13 into main Jun 8, 2026
23 checks passed
@EItanya
EItanya deleted the jmhbh/fix-rms-tool-discovery branch June 8, 2026 14:40
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
kagent 0.9.7

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre><!-- Release notes generated using configuration in .github/release.yml at v0.9.7 -->

## What's Changed
### Features
* feat(api): add workingDir to BYO agent deployment spec by @mesutoezdil in kagent-dev/kagent#1970
* feat(ui): add guard to prevent out-of-sync sends when working cross-tabs by @onematchfox in kagent-dev/kagent#1904
### Bug Fixes
* fix(controller): disable standalone SSE for STREAMABLE_HTTP remote mcp servers by @jmhbh in kagent-dev/kagent#1974
* fix: ignore local cache directories in go docker context by @EItanya in kagent-dev/kagent#1978
* fix(controller): return error instead of panicking on unknown auth mode by @SarthakB11 in kagent-dev/kagent#1791
### Other Changes
* Expose the controller's /metrics endpoint through a dedicated Service by @danielorbach in kagent-dev/kagent#1803
* Migrate from A2A v0 to v1 (part 1) by @supreme-gg-gg in kagent-dev/kagent#1921
* switch from tags to digest for images by @peterj in kagent-dev/kagent#1961
* automatically refresh substrate status page by @peterj in kagent-dev/kagent#1990
* chore: bump kagent tools to 0.2.1 by @jmhbh in kagent-dev/kagent#1995
* support running declarative agents in substrate by @peterj in kagent-dev/kagent#1981


**Full Changelog**: https://github.com/kagent-dev/kagent/compare/v0.9.6...v0.9.7</pre>
  <p>View the full release notes at <a href="https://github.com/kagent-dev/kagent/releases/tag/v0.9.7">https://github.com/kagent-dev/kagent/releases/tag/v0.9.7</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!11305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants