When LiteLLM’s MCP Gateway uses the Streamable HTTP transport, the client (LiteLLM) will send an HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly close the session once it’s done. That behavior comes straight from the MCP transport spec (“clients … SHOULD send an HTTP DELETE … to explicitly terminate the session”). Servers are allowed to reply 405 Method Not Allowed if they don’t support client-initiated termination.
Model Context Protocol
GitHub