Skip to content

Operator: Change default proxy mode from SSE to streamable-http - #2521

Merged
ChrisJBurns merged 2 commits into
mainfrom
change-default-proxy-mode-streamable-http
Nov 8, 2025
Merged

ChrisJBurns merged 2 commits into
mainfrom
change-default-proxy-mode-streamable-http

Conversation

@danbarr

@danbarr danbarr commented Nov 8, 2025 •

Copy link
Copy Markdown
Collaborator

Summary

Changes the Kubernetes Operator default proxy mode from the deprecated sse to streamable-http for stdio-based MCP servers. The streamable-http transport is the recommended approach per the MCP specification.

Fixes #2211

Changes

Core Changes

  • CRD Type Definition (cmd/thv-operator/api/v1alpha1/mcpserver_types.go): Updated kubebuilder default annotation from sse to streamable-http
  • Controller Logic (cmd/thv-operator/controllers/mcpserver_runconfig.go): Changed default proxy mode with updated comment explaining SSE deprecation
  • Unit Tests (cmd/thv-operator/controllers/mcpserver_runconfig_test.go): Updated test expectations and assertions

Generated Files

  • Regenerated CRD manifests (deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpservers.yaml)
  • Regenerated CRD documentation (docs/operator/crd-api.md)

Version Bumps

  • operator-crds chart: 0.0.52 → 0.0.53
  • operator chart: 0.3.7 → 0.3.8

E2E Test Updates

Existing stdio tests - Added explicit proxyMode: sse to preserve original test behavior:

  • test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio/
  • test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio/

New streamable-http tests - Complete test coverage for the new default:

  • test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/
  • test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/

Both test scenarios validate:

  • Server info retrieval
  • Tool listing
  • Tool execution with input/output validation

Impact

Breaking Change

This is a breaking change for users who rely on the default SSE behavior without explicitly setting proxyMode.

Migration path: Users who need to continue using SSE can explicitly set it in their MCPServer resources:

spec:
  transport: stdio
  proxyMode: sse  # Explicitly set SSE mode

Benefits

  • ✅ Better alignment with MCP specification
  • ✅ Improved performance and reliability
  • ✅ Future-proofing (SSE support may be removed eventually)

Testing

  • ✅ Unit tests pass locally
  • ✅ E2E tests validated in CI
  • ✅ Both SSE and streamable-http e2e tests pass

Related

Update the Kubernetes Operator to default to streamable-http proxy mode
instead of the deprecated SSE transport for stdio-based MCP servers.

Changes:
- Update CRD default annotation from sse to streamable-http
- Update controller default logic to use streamable-http
- Update unit tests to expect streamable-http as default
- Regenerate CRD manifests and documentation
- Bump operator-crds chart version from 0.0.52 to 0.0.53
- Bump operator chart version from 0.3.7 to 0.3.8
- Add explicit proxyMode: sse to existing stdio e2e tests
- Add new stdio-streamable-http e2e test scenarios for both
  single-tenancy and multi-tenancy

The streamable-http transport is the recommended approach per the MCP
specification. Users can still explicitly set proxyMode: sse if needed.

Fixes #2211

Signed-off-by: Dan Barr <[email protected]>
@danbarr
danbarr requested a review from Copilot November 8, 2025 16:38
@codecov

codecov Bot commented Nov 8, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.68%. Comparing base (f5313e4) to head (ba57ee5).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2521      +/-   ##
==========================================
- Coverage   55.69%   55.68%   -0.02%     
==========================================
  Files         295      295              
  Lines       28031    28031              
==========================================
- Hits        15611    15608       -3     
- Misses      10998    11000       +2     
- Partials     1422     1423       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

This PR changes the default proxyMode for stdio transport from sse to streamable-http in the MCPServer CRD. The change affects the operator's default behavior when users don't explicitly specify a proxy mode.

  • Updated the default proxy mode from sse to streamable-http across API types, CRD definitions, controller logic, and documentation
  • Added comprehensive E2E tests for the new stdio-streamable-http configuration in both single-tenancy and multi-tenancy scenarios
  • Updated existing stdio tests to explicitly set proxyMode: sse to maintain test coverage for the SSE functionality

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cmd/thv-operator/api/v1alpha1/mcpserver_types.go Changed kubebuilder default annotation for proxyMode from sse to streamable-http
cmd/thv-operator/controllers/mcpserver_runconfig.go Updated default value logic and comment to use streamable-http instead of sse
cmd/thv-operator/controllers/mcpserver_runconfig_test.go Updated test name and assertions to validate new streamable-http default
deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpservers.yaml Updated CRD default value for proxyMode to streamable-http
deploy/charts/operator-crds/Chart.yaml Bumped chart version from 0.0.52 to 0.0.53
deploy/charts/operator-crds/README.md Updated version badge to reflect new chart version 0.0.53
deploy/charts/operator/Chart.yaml Bumped chart version from 0.3.7 to 0.3.8
deploy/charts/operator/README.md Updated version badge to reflect new chart version 0.3.8
docs/operator/crd-api.md Updated API documentation to reflect new default value streamable-http
test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio/mcpserver.yaml Explicitly set proxyMode: sse to maintain SSE test coverage
test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/mcpserver.yaml New test configuration for streamable-http proxy mode
test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/chainsaw-test.yaml New E2E test suite for stdio with streamable-http proxy mode
test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/assert-*.yaml New assertion files for streamable-http test scenario
test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio/mcpserver.yaml Explicitly set proxyMode: sse to maintain SSE test coverage
test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/mcpserver.yaml New test configuration for multi-tenancy streamable-http proxy mode
test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/chainsaw-test.yaml New E2E test suite for multi-tenancy stdio with streamable-http proxy mode
test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/assert-*.yaml New assertion files for multi-tenancy streamable-http test scenario

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

@ChrisJBurns ChrisJBurns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would we have to also modify the existing e2e tests so that they make sure to send the correct transport type request to the correct proxy mode? For example, single-tenancy/sse has no proxyMode which means its now defaulted to streamable-http but the test fires sse transport requests

Comment thread deploy/charts/operator/Chart.yaml Resolved
@danbarr

danbarr commented Nov 8, 2025

Copy link
Copy Markdown
Collaborator Author

Would we have to also modify the existing e2e tests so that they make sure to send the correct transport type request to the correct proxy mode? For example, single-tenancy/sse has no proxyMode which means its now defaulted to streamable-http but the test fires sse transport requests

proxyMode is only relevant when the transport is stdio though, right? So for that test, since transport: sse, the proxy will also be sse?

@ChrisJBurns

Copy link
Copy Markdown
Collaborator

@danbarr This makes sense, and also explains why the e2e tests for those scenarios pass (when I thought they'd fail)

@ChrisJBurns
ChrisJBurns merged commit b797d89 into main Nov 8, 2025
@ChrisJBurns
ChrisJBurns deleted the change-default-proxy-mode-streamable-http branch November 8, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operator: Change default proxy mode from deprecated SSE to streaming-http

3 participants