Skip to content

Package entrypoint allows inherited FastMCP transport and ignores CLI flags #72

Description

@tony

Problem

The package entrypoint calls server.run() without pinning the transport. FastMCP uses settings.transport when no transport is passed, so an inherited FASTMCP_TRANSPORT=http starts an HTTP server instead of stdio.

The entrypoint also ignores --help and --version; both start the MCP server.

Minimal local reproduction

$ FASTMCP_TRANSPORT=http timeout 3 uv run libtmux-mcp

Expected today: FastMCP starts an HTTP listener.

$ timeout 2 uv run libtmux-mcp --help

Expected today: starts the MCP server instead of printing help.

Upstream mechanism

Minimal fix

  • Call server.run(transport="stdio") in the package entrypoint.
  • Add a minimal argparse wrapper for --help and --version.

Acceptance criteria

  • FASTMCP_TRANSPORT=http uv run libtmux-mcp still starts stdio, not HTTP.
  • uv run libtmux-mcp --help prints usage and exits 0.
  • uv run libtmux-mcp --version prints the package version and exits 0.
  • Existing FastMCP manifest behavior remains unchanged.

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