Skip to content

Conversation

@roomote
Copy link

@roomote roomote bot commented Oct 26, 2025

This PR attempts to address Issue #8847 by standardizing the MCP server type field naming convention.

Problem

Different VS Code extensions use different naming conventions for HTTP-based MCP servers:

  • Cline uses streamableHttp (camelCase)
  • Roo/Kilo Code uses streamable-http (kebab-case)
  • mcp-use/LangChain uses streamable_http (snake_case)
  • VS Code official standard is http

This inconsistency prevents configuration portability between extensions.

Solution

This PR standardizes on VS Code's official http type while maintaining backward compatibility:

Changes Made

  1. Added support for http as the primary type for HTTP-based MCP servers
  2. Maintained backward compatibility with streamable-http (deprecated but still supported)
  3. Internal normalization: streamable-http is now transformed to http internally via Zod schema transformation
  4. Updated error messages to indicate http is the preferred type
  5. Added comprehensive test coverage for the new HTTP type standardization

Technical Details

  • Uses Zod schema transformation to normalize deprecated types internally
  • No breaking changes - existing streamable-http configurations will continue to work
  • Clear error messages guide users to the preferred configuration format

Testing

  • All existing tests pass ✅
  • Added 8 new test cases covering all scenarios ✅
  • TypeScript compilation successful ✅

Migration Path

  • Existing users with streamable-http configurations need no immediate action
  • Their configurations will continue to work seamlessly
  • In the future, we can add a deprecation warning to encourage migration to http

Feedback and guidance are welcome!

Fixes #8847


Important

Standardizes MCP server type to http in McpHub.ts, maintaining backward compatibility with streamable-http, and updates tests and error messages accordingly.

  • Behavior:
    • Standardizes MCP server type to http in McpHub.ts, maintaining backward compatibility with streamable-http.
    • Updates error messages to prefer http and deprecate streamable-http.
    • Uses Zod schema transformation to normalize streamable-http to http internally.
  • Testing:
    • Adds tests in McpHub.spec.ts to cover http type standardization and backward compatibility with streamable-http.
    • Validates configurations for both http and streamable-http types.
    • Ensures error messages reflect the new http type.
  • Misc:
    • Updates validateServerConfig in McpHub.ts to require explicit type for URL-based configs.

This description was created by Ellipsis for ea374fa. You can customize this summary. It will automatically update as commits are pushed.

- Add support for "http" as the primary type for HTTP-based MCP servers
- Maintain backward compatibility with "streamable-http" (deprecated)
- Update validation logic to normalize "streamable-http" to "http" internally
- Update error messages to reflect the new preferred type
- Add comprehensive test coverage for HTTP type standardization

Fixes #8847
- Remove redundant streamable-http check since schema transformation normalizes it to http
- TypeScript correctly identifies that streamable-http type cannot exist at runtime
@roomote roomote bot requested review from cte, jr and mrubens as code owners October 26, 2025 17:55
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Oct 26, 2025
@roomote
Copy link
Author

roomote bot commented Oct 26, 2025

Review Complete ✅

No issues found. The implementation successfully standardizes MCP server type to http per VS Code specification while maintaining backward compatibility.

Summary

Changes Reviewed:

  • Added support for http as the primary type for HTTP-based MCP servers
  • Maintained backward compatibility with streamable-http (deprecated but still supported)
  • Internal normalization via Zod schema transformation (streamable-httphttp)
  • Updated error messages to indicate http as preferred type
  • Comprehensive test coverage (8 new test cases)

Quality Assessment:

  • ✅ No breaking changes - existing streamable-http configurations continue to work
  • ✅ Type safety preserved through discriminated union pattern
  • ✅ Clear migration path with helpful error messages
  • ✅ Comprehensive test coverage for all scenarios
  • ✅ Follows VS Code's official specification

The PR is ready for merge.

Follow Along on Roo Code Cloud

Copy link
Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] MCP http Type: VS Code Extensions Should Follow Host Standards

4 participants