precedence implementation

This commit is contained in:
2025-02-25 06:10:04 +00:00
parent 8b38a26e8a
commit 355fb55bdb
5 changed files with 42 additions and 10 deletions

View File

@@ -12,7 +12,17 @@ logger = logging.getLogger(__name__)
async def serve() -> None:
"""Start MCP server in safe mode (read-only operations)."""
"""Start MCP server in safe mode (read-only operations).
Configuration precedence:
1. Environment variables (highest)
2. Command line arguments (if applicable)
3. Default values (lowest)
For authentication:
1. Cookie authentication (highest)
2. Auth token authentication (secondary)
"""
# Check for AIRFLOW_BASE_URL which is always required
if "AIRFLOW_BASE_URL" not in os.environ:
raise ValueError("Missing required environment variable: AIRFLOW_BASE_URL")