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

# Adding MCP Servers

> Step-by-step guide to adding a new MCP server in Barndoor.

One of the first steps to getting started with Barndoor is to **register your MCP servers** so so its **tools can be discovered** and fine-grained access control **policies can be applied** to them. You can add servers that are built and hosted by Barndoor, curated by Barndoor but hosted by third parties, or hosted internally on your own infrastructure.

<img src="https://mintcdn.com/barndoor/S5FnpNSAJTsuXc13/images/mcp-server-activation-flow.png?fit=max&auto=format&n=S5FnpNSAJTsuXc13&q=85&s=8275966108cfd8d1f4029078334f1379" alt="MCP Server Activation" width="3600" height="1080" data-path="images/mcp-server-activation-flow.png" />

## Before You Begin

Before getting started with adding an MCP server in Barndoor, you’ll need:

* A Barndoor account with **admin privileges**
* Authentication credentials from your MCP provider (an OAuth Client ID/Secret, an API key, or another credential type, depending on the server)

<Tip>
  To learn how to authenticate Barndoor to a specific MCP provider, visit the [MCP Servers Catalog](/mcp-servers/servers), select an MCP server, and follow the **Setup Instructions**.  **For example:**  [here](/mcp-servers/atlassian#setup-instructions) is how to connect Atlassian's Rovo MCP server.
</Tip>

## Understanding MCP Server Types

Barndoor's MCP server catalog (**Admin > MCP Servers > Add MCP Server**) organizes servers into three categories, filterable via the **Custom / Barndoor / Official** chips at the top of the catalog:

| Server Type | Description |
| :- | :- |
| **Barndoor Managed** | Secure, turnkey MCP servers built, managed, and hosted by Barndoor. |
| **Official (Remote)** | Remotely hosted third-party MCP servers offered by the SaaS/platform provider. |
| **Custom Servers** | Any remotely hosted MCP servers created/registered by your organization. |

Use the search box to find a specific service by name, or the **Categories** filter to browse by use case.

<Note>
  You are allowed to create multiple instances of MCP servers within Barndoor.
</Note>

## Adding a Barndoor or Official server

1. Navigate to **Admin > MCP Servers** and click **Add MCP Server**.
2. Find your target service in the catalog and click its **Add MCP Server** button.
3. In the **Configure MCP Server Instance** dialog:
   * Confirm or edit the **MCP Server Name** (prefilled with the connector's name).
   * Optionally set a **Slug** — a URL-friendly identifier. If left blank, it's auto-generated from the name.
   * Provide **connection credentials** (OAuth, API Key, etc. - the type of credential differs by server).
     * If the provider supports OAuth Dynamic Client Registration, you can click **Register Client** to automatically register and fill in a Client ID and Secret.
4. Click **Configure MCP Server**.

## Adding a custom server

<Warning>
  Review any custom MCP server carefully with your security team before registering it. Barndoor applies your access-control policies to it but doesn't vet third-party code on your behalf.
</Warning>

Custom servers go through a short configuration wizard.

1. Navigate to **Admin > MCP Servers > Add MCP Server** and click the **Add New** tile ("Create or connect a new custom MCP server").
2. **Add Custom MCP Server** — choose the **MCP Server Source**:
   * **Internal** — hosted and managed within your own infrastructure
   * **3rd Party** — hosted externally by an outside provider
   * Enter the **MCP Server URL**, then click **Add MCP Server**.
3. **Add Custom MCP Server Details** — fill in:
   * **Name** (prefilled from the URL) and an optional **Description**
   * An optional **Icon** (JPG, PNG, GIF, or WebP, up to 10MB)
   * **MCP Server URL** (carried over from step 2; Barndoor attempts to auto-discover OAuth metadata from it)
   * **Protocol** — Choose `MCP` (Streamable HTTP) or `SSE` (Server-Sent Events). (While SSE is supported, please note that it has been deprecated.)
   * **Authentication Type** — the type you choose determines which credential fields appear:
     * **OAuth**
       * **Issuer:** The unique URL of the authorization server for this MCP server.
       * **Authorization Endpoint:** The authorization server's endpoint URL where a user will be redirected to log in and grant consent. This can either be a relative path to the Issuer URL above, or an absolute (full) endpoint URL.
       * **Token Endpoint:** The authorization server's endpoint URL that Barndoor will use to exchange an authorization code for an access token. This can either be a relative path to the Issuer URL above, or an absolute (full) endpoint URL.
       * **Allow OAuth Override:** Allows the issuer (base URL) to be overridden per instance of this MCP server.
       * **Scopes:** A list of OAuth scopes (permissions) that Barndoor will request during the authentication flow (e.g., "read:profile read:issues write:comments")
       * **Categories:** Select one or more categories for this MCP server which is used to improve server discovery.
       * **Additional Metadata (JSON):** Optional field of additional metadata to be passed between MCP clients and servers.
     * **API Key** — the key itself is supplied when configuring the instance.
     * **Bearer Token** — the token itself is supplied when configuring the instance.
     * **Basic Auth** — username and password credentials are supplied when configuring the instance.
     * **Generic** — define custom **Credential Fields** that users will need to provide when connecting. Each field is sent as an HTTP header. Fields can be edited in Form View or as raw JSON.
   * Optional **Categories**, which are used to improve server discovery.
   * Click **Update MCP Server** to continue.
4. **Configure MCP Server Instance** — name the instance, optionally set a slug, and, depending on the authentication type chosen in step 3, supply the appropriate credential values. Click **Configure MCP Server**.
5. **Connect a Service Account** — click **Connect MCP Server** to authorize the connection and let Barndoor discover the server's tools.

<Tip>
  If a server uses OAuth, confirm its OAuth client allowlists your Barndoor hostname as a valid redirect URI, or the connection step may fail with a redirect URI error.
</Tip>

## Publishing an MCP server

Successfully connecting a server doesn't make it usable right away. A newly connected server sits in a **Pending Publish** state: it's visible to admins, but end users can't see it or connect to it yet.

<Note>
  Publishing requires at least one policy to be configured first - there's no way to publish an unpoliced server.
</Note>

To make a server available to end users:

1. Configure at least one **access control policy** for the server in the **Access Control Center**, defining which AI agents and/or users are allowed to use it.
2. Once a policy is in place, open the server (from the  `⋮` menu on the MCP Servers list or its detail page) and choose **Publish**.
3. Publishing the server makes it visible to end users, who can then connect to it themselves.

## Managing an existing MCP server

From the MCP Servers list, each row has a `⋮` menu with:

* **View Details** — opens the server's detail page (actions taken, AI agent usage, tool calls, and an activity log)
* **Manage Access** — configure which AI agents and users can use the server
* **Publish** — makes the server visible and connectable to end users
* **Edit** — update the server's configuration
* **Delete** — permanently remove the server (this cannot be undone; Barndoor will warn you if any access policies still reference it)

A server's status badge reflects where it is in this lifecycle:

* **Pending Publish** (connected, but not yet visible to end users)
* **Pending Connection** or **Pending Credentials** (setup not finished)
* **Connection Error** (setup failed or credentials need attention)
* **Available** (connected, policied, and published)

<Tip>
  A Pending Connection or Error status usually means the connection setup needs to be resumed or its credentials re-entered — use **Resume Setup** from the list, or **Edit** from the MCP Server detail page.
</Tip>


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