feat: reintegrate MCP server with proper session manager lifecycle, nginx /mcp proxy, docker.sock mount
This commit is contained in:
@@ -122,20 +122,7 @@ _STATIC_COMPONENTS = [
|
||||
# streamable_http_path="/" so that when mounted at /mcp the endpoint is /mcp/
|
||||
# stateless_http=True: each request is independent (no session management)
|
||||
# Disable DNS rebinding protection for Docker deployment
|
||||
try:
|
||||
from mcp.server.fastmcp.settings import TransportSecuritySettings
|
||||
_ts = TransportSecuritySettings(enable_dns_rebinding_protection=False)
|
||||
except Exception:
|
||||
_ts = None
|
||||
|
||||
_mcp_kwargs: dict[str, Any] = {
|
||||
"streamable_http_path": "/",
|
||||
"stateless_http": True,
|
||||
}
|
||||
if _ts is not None:
|
||||
_mcp_kwargs["transport_security"] = _ts
|
||||
|
||||
mcp = FastMCP("hms-cms", **_mcp_kwargs)
|
||||
mcp = FastMCP("hms-cms", streamable_http_path="/", stateless_http=True)
|
||||
|
||||
# ---------------------------------------------------------------------------#
|
||||
# Bearer token authentication wrapper
|
||||
|
||||
Reference in New Issue
Block a user