MCP servers
Astro provides the following MCP servers:- Astro MCP server (
astro) is an authenticated remote MCP server for reading your Astro resources, including Deployments, Workspaces, environment objects, and Organization settings, and the Dags, Dag runs, and Airflow REST API of your Deployments. It signs you in with your own Astro credentials and respects your existing permissions. This server replaces the deprecated Astro Cloud MCP server. - Astro Cloud MCP server (
astro-cloud) is deprecated and replaced by the Astro MCP server. See the following warning.
Set up the Astro MCP server
LabsThis feature is in Labs and is available to all Astro Organizations.
The Astro MCP server signs you in with your Astro credentials, so each tool returns only the resources that your existing permissions allow you to view.
The investigation tools are available only to Organizations that have Otto investigations enabled. They require permission to view task logs for the whole Deployment. A Dag-level role isn’t enough.
- Claude Code
- Cursor
- Claude, Claude Desktop, and Cowork
- VS Code
- Codex
- OpenCode
Claude Code connects to remote MCP servers natively without the To authenticate, run
mcp-remote module./mcp in Claude Code and select the astro server. Claude Code opens a browser window so you can sign in with your Astro credentials.Authenticate with an API token
Instead of signing in through a browser, you can authenticate with an Organization API token, a Workspace API token, or a Deployment API token. Use this option for automated agents and other clients that can’t complete a browser sign-in. Send the token in theAuthorization header. For example, in Claude Code:
Approve redirect URIs for MCP clients
LabsThis feature is in Labs and is available to all Astro Organizations.
Prerequisites
- Organization Owner permissions to approve or remove a redirect URI. Any Organization member can view the approved list.
Approve a redirect URI
- In the Astro UI, go to Settings, then in the Security section, click MCP Redirect URIs.
- Click + New Redirect URI.
- Enter the exact HTTPS URL that the MCP client sends users back to, then click Approve Redirect URI.
https://mcp-client.example.com/oauth/callback. Astro rejects a URL that contains a wildcard, a fragment, or user information. Each Organization can approve up to 100 redirect URIs.
To stop accepting a client, remove its redirect URI from the same page. Removing a URI immediately blocks new sign-ins through that URL, but a client that’s already signed in keeps its access until its token expires.
If a redirect URI isn’t approved
If any Organization you belong to hasn’t approved the client’s redirect URI, Astro doesn’t send the authorization code and shows you which Organizations still need to approve it. Ask an Organization Owner in each one to approve the URI, then sign in again.Airflow MCP plugin
The Airflow MCP plugin (astro-airflow-mcp) is an open-source package that installs directly into an Airflow Deployment and exposes an MCP endpoint on the webserver. This gives AI tools direct access to Airflow’s REST API — Dags, task logs, connections, variables, and more — without running a separate server.
Unlike the Astro MCP server, which provides read access across all Deployments you can access and signs you in with your Astro credentials, the Airflow MCP plugin runs inside a single Deployment and authenticates with a Deployment API token. It provides Airflow-level access for that Deployment: listing Dags, viewing task logs, inspecting connections, diagnosing failures, and more.
The plugin auto-detects the installed Airflow version and registers the appropriate integration:
- Airflow 3.x: Mounts as a FastAPI app on the API server.
- Airflow 2.x (2.4 or later): Registers as a Flask blueprint on the webserver.
Prerequisites
- An Airflow Deployment on Astro. The plugin supports Airflow 3.x (Runtime 3.1 or later) and Airflow 2.x (2.4 or later).
- A Deployment API token with a role that allows POST requests (required by the MCP protocol). See Configure authentication for role options.
Install the plugin
Addastro-airflow-mcp to your Astro project’s requirements.txt:
Set environment variables
After deploying, set the following environment variable on your Deployment to block write operations:In plugin mode, the MCP server always runs in stateless HTTP mode, so Claude Code and other MCP clients work without additional configuration. The
FASTMCP_STATELESS_HTTP environment variable applies only when running the MCP server as a standalone process.Configure authentication
The MCP protocol uses POST requests for all operations, including read-only ones. Your Deployment API token does not need write permissions for read-only MCP access: authorization is still based on the underlying Airflow permissions, so a custom role with read permissions such as*.get is sufficient. The important exception is WORKSPACE_MEMBER, which Astro’s auth proxy blocks from making the POST requests the MCP protocol requires.
Option A: Use a built-in role
Create a Deployment API token with one of the following roles:DEPLOYMENT_ADMIN— Full access (works but overprivileged)WORKSPACE_OPERATORorWORKSPACE_AUTHOR— Moderate privilege
Option B: Create a custom MCP_VIEWER role (recommended)
For least-privilege access, create a custom Deployment role that includes only read permissions. This ensures the token can use all MCP read tools but cannot modify any Airflow resources.
- In the Astro UI, go to Settings, then in the Access Management section, click Roles & Permissions, click Custom, then click + New Custom Role.
- Set the Scope to Deployment.
-
Name the role
MCP_VIEWERwith a description like “Read-only access for Airflow MCP plugin.” -
Select all
deployment.airflow.*.getpermissions. See Custom role permissions reference for the full list. The role should include these 28 permissions: - Click Create role.
Connect your MCP client
After the plugin is deployed and a token is created, the MCP endpoint is available at:- Claude Code
- Cursor
- VS Code / Other Clients