8000 404 Not Found on /invoke endpoint with FastMCP streamable-http (even with minimal tool) · Issue #994 · modelcontextprotocol/python-sdk · GitHub
[go: up one dir, main page]

Skip to content
404 Not Found on /invoke endpoint with FastMCP streamable-http (even with minimal tool) #994
Open
@AineshGupta

Description

@AineshGupta

Initial Checks

Description

Expected
Should get a response from the registered tool.

Actual
Always get 404 Not Found on /invoke, even with minimal tool.

Run: $env:PORT=8005; python test.py
See debug print and server log: Uvicorn running on http://127.0.0.1:8005
Test:
Invoke-WebRequest -Uri "http://localhost:8005/invoke" -Method POST -Headers @{ "Content-Type" = "application/json" } -Body '{ "tool": "ping", "args": {} }'
Always get 404 Not Found.

Example Code

## Minimal test code

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("Test")

@mcp.tool()
def ping():
    return "pong"

if __name__ == "__main__":
    mcp.run("streamable-http")

Python & MCP Python SDK

## Environment
- Windows 10/11
- Python 3.13 (also tried 3.12)
- MCP version: 1.9.4 (also tried 1.9.2 and latest)
- Using virtual environment

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

      0