Skip to content

tools/ui: Respect configured MCP transport instead of always using Streamable HTTP#97

Open
joydolma wants to merge 1 commit into
PrismML-Eng:prismfrom
joydolma:feature/mcp
Open

tools/ui: Respect configured MCP transport instead of always using Streamable HTTP#97
joydolma wants to merge 1 commit into
PrismML-Eng:prismfrom
joydolma:feature/mcp

Conversation

@joydolma

Copy link
Copy Markdown

Summary

This PR fixes MCP transport selection in the UI by respecting the configured
transport type instead of always defaulting to Streamable HTTP.

This restores compatibility with legacy SSE-based MCP servers while preserving
support for newer Streamable HTTP servers.

Changes

  • Respect the configured MCP transport type.
  • Improve legacy SSE transport detection.
  • Improve transport selection logic.
  • Preserve compatibility with existing Streamable HTTP servers.

Motivation

Some MCP servers (including existing third-party implementations) still expose
the legacy SSE transport. The current behavior always prefers Streamable HTTP,
which prevents successful connections to those servers even when SSE is
explicitly configured.

This change allows the configured transport to be used while maintaining
compatibility with both transport implementations.

Compatibility

This change has been verified with:

  • PrismML Streamable HTTP MCP servers
  • Legacy SSE MCP servers
  • Nuke MCP
  • ComfyUI MCP
  • MCP Bridge (personal)

The goal is to preserve compatibility with both transport implementations
without changing the default behavior for Streamable HTTP servers.

Testing

Tested successfully with:

  • Nuke MCP
  • ComfyUI MCP
  • MCP Bridge (personal)

Verified tool discovery and execution with both legacy SSE and Streamable HTTP
servers.

@joydolma joydolma changed the title tools/ui: Respect configured MCP transport and improve SSE compatibilityFix legacy SSE transport detection and transport selection tools/ui: Respect configured MCP transport instead of always using Streamable HTTP Jul 21, 2026
@khosravipasha

Copy link
Copy Markdown
Collaborator

Thanks for the PR, will take a closer look. Is this somethign related to our fork? Or should it be more in the main llama.cpp. Does not seem to be touching our part of code (our main addition is mianly the kernels for 1-bit and ternary models, and few experiments features kv-cache 4-bit and dspark.)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates MCP transport selection to support legacy SSE servers while retaining Streamable HTTP defaults.

Changes:

  • Detects SSE transport from endpoint URLs.
  • Creates the transport specified by the MCP configuration.

Reviewed changes

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

File Description
tools/ui/src/lib/utils/mcp.ts Adds SSE URL detection.
tools/ui/src/lib/services/mcp.service.ts Selects configured SSE or Streamable HTTP transport.

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

Comment on lines +52 to +53
normalized.endsWith("/sse") ||
normalized.includes("/sse?")
Comment on lines +422 to +423
// Respect the configured transport instead of always defaulting to Streamable HTTP.
switch (config.transport) {
Comment on lines +423 to +424
switch (config.transport) {
case MCPTransportType.SSE:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants