tools/ui: Respect configured MCP transport instead of always using Streamable HTTP#97
tools/ui: Respect configured MCP transport instead of always using Streamable HTTP#97joydolma wants to merge 3 commits into
Conversation
|
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.) |
There was a problem hiding this comment.
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.
Thanks for taking a look! You're right—this isn't related to Prism's inference/runtime additions. It affects the MCP client in the bundled UI. While testing with Nuke MCP, ComfyUI MCP, and my own MCP Bridge, I found that the configured transport wasn't being respected. Even when SSE was explicitly configured, the client always created a Streamable HTTP transport, which prevented legacy SSE MCP servers from connecting. I've updated the implementation based on the review feedback, added regression tests, and all unit tests are now passing. If you think this is better suited for upstream llama.cpp, I'm happy to submit it there instead. |
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
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:
The goal is to preserve compatibility with both transport implementations
without changing the default behavior for Streamable HTTP servers.
Testing
Tested successfully with:
Verified tool discovery and execution with both legacy SSE and Streamable HTTP
servers.