feat: reintegrate MCP server with proper session manager lifecycle, nginx /mcp proxy, docker.sock mount

This commit is contained in:
Agent Zero
2026-07-13 03:42:13 +02:00
parent 1221350ed6
commit 6483453437
4 changed files with 21 additions and 14 deletions
+1 -14
View File
@@ -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