> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# Connect an MCP server

> Configure an MCP server connection, add upstreams, and set the access mode.

When you set **Service type** to **MCP**, the connection editor exposes tools and resources to agents over MCP (JSON-RPC and SSE) instead of proxying REST or LLM traffic. This topic shows you how to configure an MCP server connection, add upstreams, and set the access mode.

## Prerequisites

Before you begin, make sure you have the following:

* Access to a Fabric AI Gateway organization, with permission to create connections.
* The target URL of the MCP server, and the credentials it requires.

## Configure an MCP connection

To configure an MCP connection, do the following:

1. In the sidebar, click **MCP servers** under **Gateway**, and then open the connection you want to configure, for example `linear-mcp`.
2. Under **Service type**, select **MCP**.
3. Enter the **Target URL** for the MCP server, for example `https://mcp.linear.app/mcp`.
4. Under **Upstream auth requirement**, select an **Auth type** (for example, **Bearer**) and set **Applies to** (for example, **Org/tenant**).
5. Optionally, expand **Identity binding** or **Advanced settings** to configure identity mapping.
6. Enter a **Description** and, optionally, select a **Category**.
7. Click **Save changes**.

## Add upstreams

An MCP connection can point to one or more upstreams. Each upstream has its own **Target URL**, **Weight**, and **Name**, along with a **Per-upstream OAuth / MCP discovery** checkbox.

To add an upstream, do the following:

1. In the connection editor, click **Add upstream**.
2. Enter a **Target URL**, **Weight**, and **Name** for the upstream.
3. Select a **Load balancer** strategy.

Weight controls how traffic is split across upstreams, but only load balancer strategies that support weighted splitting use it. Under **Round robin**, traffic rotates evenly across upstreams and Fabric ignores weight.

## Set the access mode

Under **Access mode**, select one of the following:

| Access mode | Behavior                                |
| ----------- | --------------------------------------- |
| **Open**    | The connection doesn't require a grant. |
| **Gated**   | The connection requires a grant.        |

For more information about access modes, see [Manage connections and routes](/fabric/gateways#set-the-access-mode).

## Next steps

* To rate limit an MCP route or add other policies, see [Control traffic with plugins](/fabric/plugins).
* To keep a large set of tools from filling a model's context, add the [**Tool Search** plugin](/fabric/plugins). It gives the model three tools (search, get, and execute) that find the others.
* To review MCP traffic, see [Review analytics](/fabric/observability/analytics).