Skip to content

[BUG][MCP]: POST /mcp returns 405 after v0.9 to v1.0 migration β€” TRANSPORT_TYPE config mismatchΒ #3559

@ahujayogesh2003-maker

Description

@ahujayogesh2003-maker

🐞 Bug Summary

After migrating from v0.9 to v1.0.0-RC1, MCP tool calls fail when using streamable_http transport. The /mcp endpoint returns 405 Method Not Allowed with allow: GET in the response header. The same code worked without any issues on v0.9.
The suggested fixes from Discussion #3434 β€” adding the Accept header and using a trailing slash β€” did not resolve the issue.


🧩 Affected Component

Select the area of the project impacted:

  • [ yes ] mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

πŸ” Steps to Reproduce

  1. Migrate MCP Gateway from v0.9 to v1.0.0-RC1
  2. Connect using langchain_mcp_adapters with streamable_http transport
  3. Call client.get_tools()

πŸ€” Expected Behavior

POST /mcp is accepted and returns tools as it did in v0.9.


πŸ““ Logs / Error Output

ExceptionGroup('unhandled errors in a TaskGroup', [HTTPStatusError("Client error 
'405 Method Not Allowed' for url '.../servers/{id}/mcp/'")])

πŸ““ Code

Original code that worked on v0.9:

client = MultiServerMCPClient(
    {
        "gateway": {
            "transport": "streamable_http",
            "url": f"{mcpgw_url}/servers/{mcp_virtual_server}/mcp",
            "headers": {"Authorization": f"Bearer {mcpgw_token}"},
        }
    }
)
tools = await client.get_tools()

Code after applying suggested fixes β€” still fails:

client = MultiServerMCPClient(
    {
        "gateway": {
            "transport": "streamable_http",
            "url": f"{mcpgw_url}/servers/{mcp_virtual_server}/mcp/",
            "headers": {
                "Authorization": f"Bearer {mcpgw_token}",
                "Accept": "application/json, text/event-stream",
            },
        }
    }
)
tools = await client.get_tools()

🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit v1.0.0-RC1
Runtime e.g. Python 3.12
Platform / OS EKS
langchain-mcp-adapters 0.2.1
mcp 1.26

🧩 Additional Context (optional)

Add any configuration details, flags, or related issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MUSTP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeapiREST API Related itembugSomething isn't workingmcp-protocolAlignment with MCP protocol or specification

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions