feat: support stateless mcp

This commit is contained in:
Sun-ZhenXing
2026-02-08 15:28:37 +08:00
parent ac1de02173
commit f7051ac028
7 changed files with 287 additions and 244 deletions

View File

@@ -14,17 +14,20 @@ class MCPSettings(BaseSettings):
default_mcp: str = "math"
"""Default MCP to be used by the application."""
stateless_http: bool = True
"""Whether the MCP server should operate in stateless mode."""
instructions: str | None = None
"""Instructions to be used by the MCP server, defaults to None."""
enable_helpers_router: bool = True
"""Enable the helpers router for the MCP server."""
enable_sse: bool = True
enable_sse: bool = False
"""Enable Server-Sent Events (SSE) for the MCP server."""
enable_streamable_http: bool = True
"""Enable streamable HTTP for the MCP server."""
enable_dns_rebinding_protection: bool = True
enable_dns_rebinding_protection: bool = False
"""Enable DNS rebinding protection for MCP server."""