# Custom MCP Server

> Where you connect an Agent to a remote MCP server of your choice: its name, its https address, how the Agent signs in, and what it's for.

Source: https://air.build/docs/screens/team/custom-mcp-server/

Custom MCP Server connects an Agent to a remote MCP server that isn't in AirBuild's list of services. You give the server a name and its https address, choose how the Agent signs in to it, and can add a line on what it's for. The page's footer says: "A remote MCP server the agent reaches over HTTPS."

## Open it

1. Open the Agent's [profile](https://air.build/docs/screens/team/agent-profile/).
2. Under **Connections**, tap **Add Connection**.
3. Choose **Add a Custom MCP Server…**.

**iPhone**

From a profile sheet, the page opens over the profile, with Back in the top-left corner and **Add** in the top-right. From the **Profile** tab, and on iPad, it opens as a sheet with **Cancel** and **Add**.

**Mac**

A sheet titled **Custom MCP Server**, with **Cancel** at the top left and **Add** at the top right. Esc presses **Cancel**, which closes it without adding, except while the server is being added. Return presses **Add** once it isn't dimmed.

## What's on it

Top to bottom:

| Field | What it's for | Default |
| --- | --- | --- |
| **Name** | What the Connection is called on the profile. | Empty, "Required". |
| **URL** | The server's address. It must start with `https://` and have a host. Typed as is: no autocorrect or capitals. | Empty, "https://". |
| **Sign-in** | How the Agent signs in to the server: **Sign-in Page**, **API Key** or **None**. Tap it to choose. The line under it changes with the choice (below). | **Sign-in Page** |
| **Headers** | Only with **API Key**. One row per header: **Header** (the name) and **Value** (hidden as you type), with a minus button (**Remove Header**) to remove the row. **Add Header** adds a row. | One row with **Header** set to `Authorization`. |
| What it's for | "What it's for (optional)". Up to three lines show. Footer: "The agent reads this to know when to use the server." | Empty. |
| **Add** | Adds the server to the Agent. | Dimmed until the page is filled in (see [What Add needs](https://air.build/docs/screens/team/custom-mcp-server/#what-add-needs)). |

### Sign-in choices

| Choice | Line under it | When to use it |
| --- | --- | --- |
| **Sign-in Page** | "You sign in on the server's own page once it is added." | The server has its own sign-in page that apps can use without being registered with it first. The sign-in starts as soon as you tap **Add**. |
| **API Key** | "Sent with every request the agent makes. Saved values are never shown again." | The server takes a key or token in a header. Paste the key as the **Value**, in the form the server asks for. |
| **None** | "For a server anyone can use without signing in." | Open servers. |

## What Add needs

**Add** can be tapped only when:

- **Name** isn't empty;
- **URL** is an `https://` address with a host;
- with **API Key**: at least one header is filled in, every row that isn't empty has both a name and a value, and no header name is typed twice (names that differ only in capitals count as the same).

Empty header rows are left out. The page holds up to 8 header rows; **Add Header** is dimmed after that.

## Add a server

1. Type a **Name**.
2. Type or paste the server's **URL**.
3. Choose **Sign-in**. For **API Key**, fill in the headers.
4. Optionally, type what the server is for.
5. Tap **Add**. While it works, **Add** shows a spinner and the page can't be closed: on iPhone, Back is hidden and **Cancel** is dimmed.

The page closes and the server shows under **Connections** on the profile:

| Sign-in | What happens next |
| --- | --- |
| **Sign-in Page** | The sign-in starts at once: in a sheet inside AirBuild on iPhone and iPad, in your default browser on Mac. Until it's done, the row says **Not Connected** with **Connect**. |
| **API Key** | The row shows the server's address. To change the key later, use **Update Key…** in the row's **⋯** menu, which opens [API Key](https://air.build/docs/screens/team/api-key/). |
| **None** | The row shows the server's address. |

To change a server's name, address or sign-in kind, remove it from the Agent (**⋯** › **Remove from Agent**) and add it again.

## Messages

Errors show under the last field, and go away when you change anything on the page.

| Message | What it means | What to do |
| --- | --- | --- |
| "Use the server's public https address." | The server's address was refused. | Check the URL: it must be the server's public `https://` address. |
| "A header name or value can't be used. Check them and try again." | A header was refused. | Check the header names and values. |
| "Keep the name and description to one short line." | The name or what-it's-for text was refused. | Keep each to one short line. |
| "This agent already has it." | The Agent already has this server. | Nothing; find it under **Connections**. |
| "This agent has as many connections as it can hold. Remove one first." | The Agent can't take another Connection. | Remove one from the profile, then try again. |
| Another sentence | Adding failed for another reason, for example the connection dropped. | Check your connection and tap **Add** again. |
| "Unable to open browser to sign in.", "Sign-in timed out. Try again." or "The account was not connected. Try again." | With **Sign-in Page**, the sign-in after **Add** didn't finish. Shows on the profile. | Tap **Connect** on the row. |
