move stateless_http transport kwarg to http_app as FastMCP constructor no longer supports stateless_http as kwarg (#3510)

This commit is contained in:
Matt Hallowell 2026-03-15 08:51:43 -07:00 committed by GitHub
commit 943af98b0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -630,13 +630,13 @@ For horizontally scaled deployments, enable stateless HTTP mode. In stateless mo
```python
from fastmcp import FastMCP
mcp = FastMCP("My Server", stateless_http=True)
mcp = FastMCP("My Server")
@mcp.tool
def process(data: str) -> str:
return f"Processed: {data}"
app = mcp.http_app()
app = mcp.http_app(stateless_http=True)
```
**Option 2: Via `run()`**