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

# MCP server authentication

> Connect MCP servers to Upsun Dispatch with key authentication or OAuth sign-in, so your agents can use the tools and data your team already uses.

Use this page to connect MCP servers to Upsun Dispatch with key authentication or OAuth sign-in.

## What Upsun Dispatch uses MCP servers for

An MCP server gives your agents access to your own systems. An agent uses a server to get information that is not in the repository, or to take an action in another tool.

For example:

* A code review agent reads your internal service catalog to find who owns a service.
* An Issue to code agent reads the error details for a bug, and then creates a follow-up ticket.

You connect a server once for the whole organization. Every workflow whose agents can use MCP servers gets it, in the mode you choose for that workflow.

During a run, MCP tool calls appear in the run activity as `server · tool`.

### Which agents use your servers

| Workflow | Tools the agent can use |
| - | - |
| **Code review** | Read-only tools |
| **Issue to code** and **Autofix** | All tools, if you allow write tools for the server |
| Prompt steps in custom workflows, such as **Troubleshooting** | Read-only tools |

### How Upsun Dispatch controls access

* **Write tools are off by default.** You can allow them for a server. You can also allow them, or turn a server off, for one workflow or one repository.
* **Read-only tools are the tools the server labels as read-only.** Upsun Dispatch uses the server's own labels. A tool without the read-only label is treated as a write tool, so a read-only agent does not get it. If a server labels a write tool as read-only, a read-only agent can use it.
* **The agent never sees the credential.** Upsun Dispatch adds the credential to each call outside the agent's sandbox.

> [!WARNING]
>
> Every call to a server uses the one credential you give for it. With **Sign in**, every call uses the account that signed in. A user who starts a run can make the agent read data that this user cannot read. Use a dedicated service account with the smallest possible scope, and a read-only account when the server supports it.

### Choose servers for each workflow

Each workflow's settings page has an **MCP servers** card with one select per server:

| Option | What the workflow's agents get |
| - | - |
| **Server setting** | What the server allows: read-only tools, or all tools if write tools are allowed for the server. |
| **Off** | Nothing from this server. |
| **Read-only** | Only the server's read-only tools. |
| **Write tools allowed** | All the server's tools. Not offered for **Code review**. Choosing it asks you to confirm in **Allow write tools?**. |

Choices on the organization's workflow page apply to every repository. On a repository's workflow page, you can override them for that repository. The override shows a **Custom** badge, and **Reset** removes it.

## Before you connect an MCP server

Only organization owners and admins can connect, edit, sign in to, and remove MCP servers.

Every **URL** must meet these requirements:

* It uses HTTPS.
* It includes a host.
* It has no user info.
* It has no URL fragment.

On **Settings > MCP servers**, select **Connect server** to open the **Connect MCP server** dialog. The **Connect with** selector offers two options:

| Connect with option | Use when |
| - | - |
| **Sign in** | The MCP server supports OAuth sign-in. |
| **Credential** | The MCP server uses a key-based credential in a request header. |

## Connect with a credential

Choose **Credential** when the MCP server expects a static credential in a request header.

1. On **Settings > MCP servers**, select **Connect server**.
2. In **Connect MCP server**, enter a **Name** and the **URL**.
3. For **Connect with**, choose **Credential**.
4. In **Header**, enter a header name, such as `Authorization` or `X-API-Key`.
5. In **Value**, enter the header's full value.
6. To let agents built to write use the server's write tools, select **Allow write tools**. It is off by default.
7. Select **Connect server**.

To update an existing connection, open the MCP server page and select **Edit**. The value is never shown again. Leave it as it is to keep the current value, or enter a new one to replace it.

### Header requirements

For bearer tokens, enter `Authorization` in **Header**. In **Value**, include the `Bearer ` prefix before the token, for example `Bearer abc123`.

For a custom credential header, enter the header name in **Header** and the secret value in **Value**. HTTP and MCP protocol headers cannot be used as credential headers.

## Connect with OAuth sign-in

Choose **Sign in** when the MCP server supports OAuth sign-in.

A server connected with **Sign in** has no stored credential. Upsun Dispatch can't list its tools, and agents don't get it, until someone signs in.

1. On **Settings > MCP servers**, select **Connect server**.
2. In **Connect MCP server**, enter a **Name** and the **URL**.
3. For **Connect with**, choose **Sign in**.
4. Select **Connect and sign in**.
5. Complete sign-in on the provider's page that opens in your browser.

Finish sign-in in the same browser, signed in to Upsun Dispatch as the same user who started it.

To sign in to an existing server, open the MCP server page. Select **Sign in** if no one has signed in yet, or **Sign in again** to replace the current sign-in.

### After sign-in

Upsun Dispatch returns you to the **MCP servers** page, which shows **Signed in to** followed by the server name. The server's page shows when you signed in, the provider account when the provider names it, and when the sign-in ends if the provider limits it. Sign in again before that date.

If the provider later refuses the sign-in, the server moves under **Needs attention** and its **Sign-in** row shows **Sign-in ended**. Agents get no tools from the server until someone selects **Sign in again**.

### If the provider needs your own app

Some providers only accept sign-in through an app your organization creates with them. Upsun Dispatch has no screen to add that app yet. To connect one of these servers, contact support.

If the provider refuses your organization's app, the server's **Sign-in** row shows **The provider refused the app**. Fix the app with the provider, then select **Sign in again**.

## Change an existing MCP server

* You choose **Connect with** only when you connect a server. To switch between **Credential** and **Sign in**, remove the server and connect it again with the other option.
* You can change the path of a server's URL, but not its host. To move a server to another host, remove it and connect it again.
* Changing the URL of a server connected with **Sign in** ends its sign-in. Sign in again afterward.
* If a server doesn't offer OAuth sign-in, sign-in is refused. Connect it with **Credential** instead.

## Remove an MCP server

Open the MCP server page and select **Remove server**.

* For a server connected with **Credential**, the credential is deleted and agents stop getting the server from the next run.
* For a server connected with **Sign in**, the sign-in is deleted, and revoked at the provider where the provider supports that. Agents lose the server right away, even in runs that already started.

## Servers added by an integration

When you connect [Linear](https://developer.upsun.com/dispatch/docs/integrations/linear.md) or [Jira](https://developer.upsun.com/dispatch/docs/integrations/jira.md), Upsun Dispatch adds that tool's MCP server for you. Its page shows **Comes from your Linear connection** (or Jira). You can't edit its URL or credential, or remove it from **Settings > MCP servers**. You can only turn it off with **Use this server**, or change **Allow write tools**. To remove it, disconnect the integration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.