Skip to content

SSE MCP server fails when URL contains subpaths #490

Open
@gzchen008

Description

@gzchen008

问题描述

当SSE MCP服务器的URL包含子路径时(例如:a.com/mcp/a/sse),使用Cline或Cherry Studio客户端会报错:"error posting to endpoint http 404 could not find session"。仅使用域名(不含子路径)时工作正常。

重现步骤

  1. 部署一个SSE MCP服务器,配置子路径(如/mcp/a/sse)
  2. 使用Cline或Cherry Studio客户端连接该URL
  3. 观察到"could not find session"的404错误

预期行为

客户端应能正常连接到带子路径的SSE MCP服务

环境信息

  • MCP版本: [请填写]
  • 操作系统: [请填写]

Problem Description

When the SSE MCP server's URL contains subpaths (e.g. a.com/mcp/a/sse), using Cline or Cherry Studio clients results in error: "error posting to endpoint http 404 could not find session". Works fine with domain-only URLs (no subpaths).

Reproduction Steps

  1. Deploy an SSE MCP server with subpath (e.g. /mcp/a/sse)
  2. Connect using Cline or Cherry Studio client
  3. Observe "could not find session" 404 error

Expected Behavior

Client should be able to connect to SSE MCP service with subpaths

Environment Information

  • MCP Version: [please specify]
  • OS: [please specify]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions