Skip to content

feat: add automatic MCP transport selection for 2024-11-05 / 2025-03-26 / 2025-06-18 vs 2025-11-25 #12262

Description

@edk4971

Is your feature request related to a problem? Please describe.
I'm coming from llama.cpp - localai fails on all my existing MCP servers. It appears the localai implementation of v1.5.0 of the mcp/go-sdk does not consider all permutations of transport/schema, currently hard-codes StreamableClientTransport and fails on 2025-06-18 stateless servers and SSE servers.

Describe the solution you'd like
Probe initialise, pick StreamableClientTransport{Stateless:false} for session-based 2025-11-25+, StreamableClientTransport{Stateless:true} for 2024-11-05/2025-03-26/2025-06-18, and fall back to SSEClientTransport

Describe alternatives you've considered
cleaner than a proxy - as should only be a single function (and the sdk is already in go.mod)

Additional context

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions