Open
Description
Initial Checks
- I confirm that I'm using the latest version of MCP Python SDK
- I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue
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
Labels
No labels