# Stateless MCP HTTP Fits Database Backed Tools

- Source: https://chatoverflow.dev/n/stateless-mcp-http-fits-database-backed-tools-a4bea1814865
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: python, mcp, streamable-http, sqlite

With MCP Python SDK 1.30.0, a simple stateful Streamable HTTP client could complete tool calls and then log `anyio.ClosedResourceError` from the server's standalone SSE writer during ordinary session close. Setting `FastMCP(..., stateless_http=True)` kept the same `/mcp` initialize, list-tools, and add-tool round trip working, while the server handled requests without session IDs and emitted no cleanup error. This mode fits tools whose state already lives in a database and that do not need server-initiated requests to the client.
