Skip to content

SSE endpoints not connecting #138

Not planned
Not planned

Description

@rhvall

Describe the bug
Using the latest main code 0.9.0 (commit 7a76001) I tried to connect to multiple "SSE" MCP endpoints but there was a problem

To Reproduce

import Foundation
import MCP

// Initialize the client
let mcpList = [
    "https://mcp.deepwiki.com/sse",
    "https://mcp.deepwiki.com/mcp",
    "https://mcp.semgrep.ai/sse",
    "https://remote.mcpservers.org/sequentialthinking/mcp"
]

let connectTest = { (transport: Transport) async -> Bool in

    do {
        let client = Client(name: "MyApp", version: "1.0.0")
        let result = try await client.connect(transport: transport)

        // Check server capabilities
        print(result.capabilities)
        await client.disconnect()
        return true
    } catch {
        return false
    }
}

for link in mcpList {
    let url = URL(string: link)!

    // Create a transport and connect
    let transport = HTTPClientTransport(
        endpoint: url,
        streaming: true
    )

    let res = await connectTest(transport)
    print("HTTP URL: \(link). Result: \(res)")
}

Expected behavior
The client should connect to the SSE MCP server. But it only does with those that end with "/mcp". I tried with "streaming=true/false" but it did not make any change.

The problem is that not every MCP server offers "/mcp", multiple are only "/sse". From this list:
https://mcpservers.org/remote-mcp-servers
Most of them are using "sse" at the end.

Logs
This is the output of the example code above:

HTTP URL: https://mcp.deepwiki.com/sse. Result: false
Capabilities(logging: nil, prompts: nil, resources: nil, sampling: nil, tools: Optional(MCP.Server.Capabilities.Tools(listChanged: Optional(true))))
HTTP URL: https://mcp.deepwiki.com/mcp. Result: true
HTTP URL: https://mcp.semgrep.ai/sse. Result: false
Capabilities(logging: nil, prompts: nil, resources: nil, sampling: nil, tools: Optional(MCP.Server.Capabilities.Tools(listChanged: nil)))
HTTP URL: https://remote.mcpservers.org/sequentialthinking/mcp. Result: true

Additional context
I used as well the branch here: "#101" (commit 5978c71), but it did not work as well changing to "SSEClientTransport"

Activity

  1. added
    bug
    on Jun 12, 2025
  2. webwarrior06 commented on Sep 12, 2025

    @webwarrior06

    Same here. Any updates on this?

  3. stallent commented on Jan 15, 2026

    @stallent
    Contributor

    @webwarrior06 @rhvall Hello! New maintainer here. Starting to review the open issues and wanted to check to see how critical this is for you both? The original SSE Transport has been deprecated since protocol version 2025-03-26 which was already the latest about the same time the Swift sdk was released. Since it was never implemented, this would be new work to support a long since deprecated feature. I would hope/assume any servers you need to connect to support any form of connection in the 2025-03-26 onward. I'm inclined to close this issue but wanted to get your thoughts before doing so.

  4. DePasqualeOrg commented on Jan 15, 2026

    @DePasqualeOrg

    I looked into this issue while developing my fork, and the MCP servers mentioned above now support streamable HTTP. I think this is essentially a non-issue at this point. I purposely left out SSE Transport from my implementation, in order to reduce the surface area for maintenance and potential security vulnerabilities.

  5. jeanmatthieu commented on Dec 5, 2026

    @jeanmatthieu
    Contributor

    /sse endpoints use the legacy 2024-11-05 HTTP+SSE transport, which has been deprecated by the MCP specification (SEP-2596) and was intentionally never implemented in the Swift SDK. HTTPClientTransport implements the Streamable HTTP transport (/mcp endpoints). This is documented in ROADMAP.md and docs/rough_edges.md#not-implemented on rel/1.0.0 (#372, #341). Closing as not planned.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions