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

# Connect an MCP server to your AI agent

> Connect an MCP server in AI Agent Studio, choose which tools your AI agent can use, and fix connection problems.

Connect your own Model Context Protocol (MCP) server so your AI agent can use the tools it offers, such as checking a loyalty balance or finding a booking time. bitbybit connects to your server, finds its tools, and lets you choose which ones your AI agent can use in customer conversations.

Looking to let a coding agent such as Claude Code use bitbybit instead? See [Connect a coding agent to bitbybit](https://knowledge.bitbybit.studio/settings/how-to-connect-a-coding-agent.md).

## Prerequisites

* You already created an AI agent in **AI Studio**. See [Set up your AI agent in AI Studio](https://knowledge.bitbybit.studio/ai-studio/how-to-setup-ai-agent-in-ai-studio.md).
* You have the web address (URL) of your MCP server. It must be a public `https://` address on port 443.
* If your server needs a login, you have its bearer token or API key ready.
* Your role can manage AI Studio settings.

## 1. Open the Connectors tab

* Go to **AI Studio**.
* Open the AI agent you want to connect a server to.
* Open the **Connectors** tab.

  ![Connectors tab showing a connected MCP server and the Add server button](https://mintcdn.com/asmaraku/tclJ6j1czVupYqkW/images/ai-studio/mcp-servers-connectors.png?fit=max\&auto=format\&n=tclJ6j1czVupYqkW\&q=85\&s=2fd7204491b6083a6a0cdd0263785459)

If you have not connected a server yet, the tab shows **Connect your first MCP server**.

## 2. Connect a server

* Click **Add server**. If you have not connected a server yet, select **Connect your first MCP server** instead.
* Enter a **Server name** so you can recognize it later, for example `Bloom loyalty`.
* Enter the **MCP server URL**, for example `https://mcp.example.com/mcp`.
* Choose how the server checks who is connecting in **Authentication**:
  * **No authentication** — the server is open and needs no login.
  * **Bearer token** — enter the token in **Bearer token**.
  * **API key header** — enter the header name in **Header name** (for example `x-api-key`), then enter the key in **API key**. API stands for Application Programming Interface.
* Click **Connect server**.

  ![Connect MCP server form with server name, URL, and authentication fields](https://mintcdn.com/asmaraku/tclJ6j1czVupYqkW/images/ai-studio/mcp-connect-server.png?fit=max\&auto=format\&n=tclJ6j1czVupYqkW\&q=85\&s=79b30c44a4fa5688ff6bf6f9dffc75d9)

bitbybit checks the connection and finds the server's tools. This can take a few seconds. After it connects, every tool the server offers is turned on for your AI agent by default.

> [!NOTE]
>
> bitbybit only connects to public `https://` addresses on port 443. If you enter another kind of address, you see an error under the URL field.

## 3. Choose the tools your AI agent can use

Each server appears as a card with its address, its status, and a count such as **3 of 4 tools enabled**.

* Click **Manage tools** on the server card.
* Use the switch next to each tool to turn it on or off. Each tool shows a short description from your server.
* Click **Done** when you finish.

  ![Server tools panel showing tool switches, refresh, and server settings](https://mintcdn.com/asmaraku/tclJ6j1czVupYqkW/images/ai-studio/mcp-manage-tools.png?fit=max\&auto=format\&n=tclJ6j1czVupYqkW\&q=85\&s=06609e425b8908b4f89d6191917cdd98)

Changes apply immediately. Your AI agent only uses the tools that are on and available from a connected server.

> [!NOTE]
>
> If two servers offer a tool with the same name, your AI agent uses only one of them. The other tool shows a warning and does not count as enabled. Turn off one of the two tools, or ask your server's owner to rename it.

## 4. Refresh the tool list

Refresh the list when your server adds or removes tools.

* Open **Manage tools** for the server.
* Click **Refresh tools**.

Your on and off choices are kept. New tools appear in the list, and you can turn on the ones you want. Tools your server no longer offers are removed. While bitbybit checks for tools, your current list and selections stay in place. If the refresh fails, your previously discovered tools and selections remain saved, but your AI agent cannot use them until the server reconnects. Check the URL or credentials, then try again.

## 5. Turn a server off or back on

* Open **Manage tools** for the server.
* Under **Server settings**, use the **Server enabled** switch.

When the switch is off, the server shows **Disabled** and your AI agent cannot use any of its tools. Your tool choices are saved. When you turn it back on, bitbybit checks the connection first.

## 6. Edit a connection

* Open **Manage tools** for the server and click **Edit connection**.
* Change the name, URL, or authentication.
* Leave the token or key field blank to keep the one you saved. If you change the URL, enter the token or key again.
* Click **Save changes**.

After you save, bitbybit refreshes the server's tools.

## 7. Remove a server

* Open **Manage tools** for the server and click **Remove server**.
* Confirm in the window that opens.

Your AI agent loses access to the server's tools immediately. Removing a server does not delete any data in your own system. If you connect the server again later, you need to enter its credentials and choose its tools again.

## Check a server's status

| Status | What it means |
| - | - |
| **Connected** | bitbybit reached the server and found its tools. |
| **Connecting** | bitbybit is connecting or checking for tools. |
| **Error** | bitbybit could not connect or refresh. Open the server to see what happened. |
| **Disabled** | You turned **Server enabled** off. |

## Fix connection problems

If a server shows **Error**, click **View details** on its card. Your last successfully discovered tools and selections stay in place while you fix the problem, but your AI agent cannot use those tools until the server reconnects.

### Couldn't reach the server

**Cause:** The server address is wrong, or the server is not running.

**Fix:**

1. Check the **MCP server URL** with **Edit connection**.
2. Make sure your server is running.
3. Click **Retry connection**.

### Authentication failed

**Cause:** The server rejected the token or key.

**Fix:**

1. Click **Edit connection**.
2. Enter the token or key again, and check that the **Authentication** type matches what your server expects.
3. Click **Save changes**.

### Couldn't discover tools

**Cause:** The server answered, but bitbybit could not read its tools. The URL may not point to an MCP endpoint.

**Fix:**

1. Check that the URL points to your server's MCP endpoint.
2. Click **Retry discovery**.

### No tools found

**Cause:** The server connected, but it did not return any tools.

**Fix:**

1. Check that your server has tools set up and returns them from its MCP endpoint.
2. Click **Refresh tools**.

### Couldn't refresh tools

**Cause:** bitbybit could not reach the server when you refreshed.

**Fix:**

1. Check the URL and credentials with **Edit connection**.
2. Click **Refresh tools** again.

## Related articles

* [Add and manage skills](https://knowledge.bitbybit.studio/ai-studio/how-to-setup-skillset-in-ai-studio.md)
* [Set up your AI agent in AI Studio](https://knowledge.bitbybit.studio/ai-studio/how-to-setup-ai-agent-in-ai-studio.md)
* [Test your AI agent in the Playground](https://knowledge.bitbybit.studio/ai-studio/test-your-ai-agent-in-playground.md)


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