Skip to content

[cli] Can't use URLs that don't end in /mcp or /sse #594

Open
@leblancfg

Description

@leblancfg

Describe the bug
Can't use URLs that don't end in /mcp or /sse

To Reproduce
Steps to reproduce the behavior:

  1. Run a local MCP server using remote transport on a root level, e.g. http://localhost:37242
  2. Try to connect using the CLI: npx -y @modelcontextprotocol/inspector --cli --transport http http://localhost:37242 --method tools/list
  3. See it fail with:
Failed to connect to MCP server: Error POSTing to endpoint (HTTP 404): <!DOCTYPE html>
  <html lang="en">
  <head>
  <meta charset="utf-8">
  <title>Error</title>
  </head>
  <body>
  <pre>Cannot POST /</pre>
  </body>
  </html>


  Failed with exit code: 1

Expected behavior
It should be able to connect instead, and spit out a valid JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions