Skip to content

astro-airflow-mcp 0.9.1

Latest

Choose a tag to compare

@kaxil kaxil released this 08 Jul 15:02
· 9 commits to main since this release
e83f757

Patch release: fixes 421 Misdirected Request on the plugin's /mcp/v1/ endpoint with FastMCP 3.4.3+, and pins fastmcp to a bounded range.

What's fixed since 0.9.0

Fix 421 Misdirected Request from FastMCP's host guard (#241)

FastMCP 3.4.3 shipped HostOriginGuardMiddleware enabled by default: it only accepts loopback Host headers (127.0.0.1/localhost/::1) plus the ASGI scope["server"] host, and returns 421 Misdirected Request for anything else. In plugin mode the MCP app is embedded in the Airflow webserver and reached over the Deployment's own hostname, so with an unpinned install that resolved fastmcp 3.4.3, every request to /mcp/v1/ was rejected with 421.

  • The plugin now keeps the guard enabled but scopes allowed_hosts to the Deployment's hostname, read from the AIRFLOW__WEBSERVER__BASE_URL env var (present at plugin import, unlike Airflow's conf). DNS-rebinding protection stays on rather than being turned off.
  • ASTRO_MCP_ALLOWED_HOSTS (comma-separated) overrides the allowlist for custom domains; the plugin falls back to disabling the guard only when no hostname is derivable (non-Astro embeddings).
  • Standalone mode (mcp.run) is unchanged — it keeps FastMCP's default loopback protection, which is what a locally-bound server needs.
  • Pins fastmcp>=3.4.3,<4 so behavior is deterministic and can't silently change on the next FastMCP default flip.

Install

uvx --from 'astro-airflow-mcp==0.9.1' af

Upgrade notes

If you pinned fastmcp<3.4.3 as an interim workaround, you can drop that pin after upgrading to 0.9.1.