> ## Documentation Index
> Fetch the complete documentation index at: https://astronomer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Otto to your MCP servers

> Register your Organization's own MCP servers in Astro so that Otto investigations and Otto Routines can query systems outside Airflow, such as your data warehouse or dbt project.

Register your Organization's own Model Context Protocol (MCP) servers in Astro, and Otto can call their tools while it investigates a failure. For example, an investigation that can query your warehouse can check whether a source table landed before it recommends a fix, instead of reasoning from Airflow alone.

An Organization Owner registers each MCP server once for the whole Organization. Then each Otto feature selects which registered servers it can use:

* [Otto investigations](https://astronomer.io/docs/astro/otto/otto-investigate.md) use the servers that an Organization Owner enables in **Investigation Agent MCP Access**.
* [Otto Routines](https://astronomer.io/docs/astro/otto/otto-routines.md) use the servers that you select in each Routine.

Otto in the Astro CLI, the Astro IDE, Astro for VS Code, and the Otto chat in the Airflow UI can't use your MCP servers.

## Prerequisites

* The Organization Owner role to register, edit, or delete servers, and to enable servers for investigations. Users with the Organization Member role can view the servers and use them, but can't register, edit, or delete them.
* AI features enabled for your Organization. See [Toggle AI features for your Organization](https://astronomer.io/docs/astro/enable-disable-astro-ai.md).
* An MCP server that is reachable at a public `https` endpoint and that uses the Streamable HTTP or the Server-Sent Events (SSE) transport. Astro doesn't connect to private or internal addresses, and rejects plain `http`.
* A read-only token for the MCP server. Routines run with the token's full access. See [What MCP servers allow a run to do](https://astronomer.io/docs/astro/otto/otto-routines.md#what-mcp-servers-allow-a-run-to-do).
* If your MCP server limits access by IP address, the Astronomer egress IP addresses in its allowlist. Astronomer publishes these addresses as the DNS A records of `egress.astronomer.io`. To get the current list, run `dig +short egress.astronomer.io`.

## Register a server

**1. Open the MCP server list**

In the Astro UI, click **Organization Settings**.

In the **AI** section, click **MCP Servers**.

**2. Enter the server details and create the server**

Click **New MCP Server**, then complete the following fields:

| Field | Description |
| - | - |
| **Name** | A unique name in your Organization, with 2 to 32 characters. Use lowercase letters, numbers, and dashes. The name must start with a letter and end with a letter or number. You can't change the name after you save. Otto uses the name as the prefix of every tool that the server exposes. |
| **Description** | (Optional) What the server gives access to, with a maximum of 254 characters. Otto investigations read the description to decide when to use the server. |
| **URL** | The `https` endpoint where the MCP server listens, for example `https://mcp.example.com/mcp`, with a maximum of 2,048 characters. The URL can't include a username, password, query string, or fragment. If the URL has no path, Astro uses `/`. |
| **Transport** | **Streamable HTTP** or **Server-Sent Events**. Select **Streamable HTTP** unless your server only supports SSE. |
| **Credential** | The token for the server, with a maximum of 8,192 characters. Enter the token without the `Bearer` prefix. Astro adds the `Authorization: Bearer` header. |

Click **Create MCP Server**.

An Organization can register a maximum of 10 MCP servers.

## Check the status of a server

The **MCP Servers** list shows the status of each server. Astro checks the status when you open the list. A new server takes about a minute to become reachable. Until then, its status is **Pending** or **Not found**.

## Grant the investigation agent access

Registering a server doesn't give Otto investigations access to it. Every server starts disabled for investigations until an Organization Owner enables it.

1. In the Astro UI, click **Organization Settings**.
2. In the **AI** section, click **Investigation Agent MCP Access**.
3. Select each server that investigations can use. To select all servers, select the **Select all servers** checkbox.
4. Click **Save**.

When an investigation runs, Otto gets the tools from every enabled server.

To use a server in a Routine, select it in the Routine instead. See [Use MCP servers in a Routine](https://astronomer.io/docs/astro/otto/otto-routines.md#use-mcp-servers-in-a-routine).

## Edit a server

Go to **Organization Settings** > **MCP Servers**, click the actions menu in the server's row, then click **Edit MCP Server**.

* You can't change the name. Routines reach a server's tools by its name prefix, so a new name breaks them. To use a different name, register a new server.
* To keep the current credential, leave **Credential** blank. To replace it, enter a new credential.
* When you change the URL, you must enter the credential in the same save, even if the credential doesn't change.
* You can change the description, the transport, and investigation access separately.

## Delete a server

Go to **Organization Settings** > **MCP Servers**, click the actions menu in the server's row, then click **Delete MCP Server**.

When you delete a server, Astro deletes its credential and every tool with its name prefix. Otto features that used the server lose those tools on their next run.

You can't delete a server that one or more Routines use. The error shows the server name and the number of Routines that use it. Remove the server from those Routines first. Astro doesn't warn you when you delete a server that is enabled for investigations, so check **Investigation Agent MCP Access** before you delete a server.

## Related

* [Investigate with Otto](https://astronomer.io/docs/astro/otto/otto-investigate.md)
* [Automate work with Otto Routines](https://astronomer.io/docs/astro/otto/otto-routines.md)
* [Connect your own model provider](https://astronomer.io/docs/astro/bring-your-own-model.md)
* [MCP servers](https://astronomer.io/docs/astro/astro-mcp-server.md)
