fix(mcp): disable DNS rebinding protection for LAN HTTP transport #6

Merged
user2595 merged 1 commits from fix/mcp-transport-security into main 2026-06-14 12:56:00 +00:00

View File

@@ -26,10 +26,16 @@ from __future__ import annotations
import logging
from mcp.server.fastmcp import FastMCP
from mcp.server.transport_security import TransportSecuritySettings
logger = logging.getLogger(__name__)
mcp = FastMCP("codex")
# DNS rebinding protection disabled: the server is guarded by Bearer token auth
# (mcp_server.py _TokenAuth middleware) and UFW firewall (trusted LAN IPs only).
mcp = FastMCP(
"codex",
transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False),
)
# ---------------------------------------------------------------------------