from ai_infra.mcp import MCPSecuritySettingsSecurity settings for MCP servers with automatic environment detection. By default, auto-detects the deployment environment and configures appropriate security settings. Works with Railway, Render, Fly.io, Heroku, Vercel, and other platforms. Examples: # Auto-detect (recommended - works everywhere) mcp = mcp_from_functions(name="my-mcp", functions=[my_tool]) # Disable security for development security = MCPSecuritySettings(enable_security=False) # Custom domains (overrides auto-detection) security = MCPSecuritySettings(domains=["api.example.com"])