Skip to content

[FEATURE]: Support MCP servers that require POST-based or non-standard SSE handshake #5371

Closed

Description

@slkiser

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Please extend the MCP “remote” client to support servers that initiate the SSE connection via a POST-based JSON-RPC handshake instead of a standard GET Accept: text/event-stream request.

Currently, opencode’s MCP client appears to assume a standard GET+SSE flow. Some MCP servers, however, respond with 405 Method Not Allowed to GET and only accept a POST that starts the JSON-RPC session and then upgrades/streams responses. This makes those servers unusable from opencode even though they otherwise speak MCP over HTTP.

It would be helpful if opencode could:

  • Support a POST-based MCP connection mode (e.g., configurable per MCP server), or
  • Offer a pluggable transport that allows POST initialisation before switching into streaming.

This would improve compatibility with a wider range of MCP servers and hosted MCP endpoints that don’t strictly follow the GET-based SSE pattern.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Dec 11, 2025
  2. github-actions commented on Dec 11, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of or closely related to existing issues. Please check:

    Feel free to ignore if none of these address your specific case, but they may provide workarounds or related discussion about extending OpenCode's MCP remote client capabilities.

  3. Shivansh-Khunger commented on Jan 8, 2026

    @Shivansh-Khunger

    I would like to work on this issue, would be investigating the issue first cause the implementation is somewhat has this in place. This might require a change in the core package so will be posting an implementation plan, if needed.

  4. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionUsed for feature requests, proposals, ideas, etc. Open discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions