Skip to content

Client CLI --transport is not reliably honored for URL targets #5525

Description

@mikamikasuki

What happened?

fastmcp list and fastmcp call can choose a transport different from the one explicitly requested:

  • With --transport sse, https://example.test/mcp?token=abc is rewritten to https://example.test/mcp?token=abc/sse. The path stays /mcp, the token is changed to abc/sse, and FastMCP infers HTTP.
  • With --transport http, https://example.test/sse is passed through unchanged, then FastMCP infers SSE from the /sse path.

The CLI documentation says --transport forces http or sse for URL targets. Could the explicit choice be passed through to the selected client transport, with any SSE path adjustment applied only to the parsed URL path and the query preserved?

Example Code

Version Information

- FastMCP main: `5baeacfe20eca735cb949564b4915f93a622b916`
- Python: 3.12.15
- OS: macOS 15.0.1 arm64

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

    bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.cliRelated to FastMCP CLI commands (run, dev, install) or CLI functionality.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions