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

# MCP servers: give your AI agent tools from any MCP server

> Connect a remote MCP server and turn the tools it offers into Actions your AI agent can call

An MCP server is a service that publishes a list of tools over the [Model Context Protocol](https://modelcontextprotocol.io). Connect one to your AI agent and pick the tools you want: each one becomes a [Custom Action](https://chatbase.co/docs/user-guides/chatbot/actions/custom-action.md) the AI agent can call during a conversation. There's no endpoint, request body, or input list to configure by hand, because the server describes its tools itself.

> [card] Best for:
>
> Giving your AI agent a whole set of tools from a product that already runs an MCP server, in a minute instead of one Custom Action at a time.

**Common Use Cases:**

* Letting the AI agent look things up in a tool your team already uses, such as a CRM, a project tracker or a knowledge base
* Exposing your own internal service to the AI agent by running an MCP server in front of it
* Trying a new integration quickly before building a dedicated Custom Action

## How to connect an MCP server

**1. Navigate to Actions**

Go to your [Chatbase dashboard](https://www.chatbase.co/dashboard/) and select your AI agent. Click **Build > Actions** in the left sidebar.

**2. Open MCP servers**

Click **Create Action**, then select **MCP servers**.

![The MCP servers card with its New badge, next to Custom actions on the Create Action tab](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/mcp-servers-card.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=e59acba4e296b0a0eb6ed89a349b625b)

**3. Paste the server URL**

Enter the server's address in **Server URL** and click **Connect**. The address must start with `https://`. Your MCP provider lists it in their docs, usually ending in `/mcp`.

![The Add MCP server dialog with a server URL entered](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/add-mcp-server.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=5f73b347e58ae80d276125cd32add6a9)

**4. Sign in, if the server asks**

If the server needs an account, the dialog changes to **Sign in to** followed by the server's name. Click **Sign in** and approve access in the window that opens, or use a token instead. See [Signing in](#signing-in) below. Servers that don't need an account, like the one in these screenshots, skip this step.

**5. Pick the tools**

The **Import tools** step lists every tool the server offers, with a badge showing what it does. Tick the tools your AI agent should be able to call, then click **Import N Actions**. See [Choosing tools](#choosing-tools) below.

This server doesn't say which of its tools only read data, so they're all marked **Unknown** and start unticked. In this example, all three are ticked by hand.

![The Import tools step with three tools ticked and an Import 3 Actions button](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/import-tools.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=0673da14c2f244b176702e8ae457ee2e)

**6. Review the new Actions**

You land on **My Actions**, where the server has its own section with one Action per imported tool, each switched on. Click **Customize** on a tool to change its name or when the AI agent uses it. See [Customize an imported tool](#customize-an-imported-tool).

![The MCP server's section in My Actions with its imported Actions switched on](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/my-actions-group.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=32d1c6d79cbae0ee2651af5e4ae539ed)

> [!NOTE]
>
> Saving puts your changes in a draft. Your customers see them once you click **Publish** in the top-right corner. A few settings go live as soon as you save. See [Drafts and versions](https://chatbase.co/docs/user-guides/chatbot/versions.md#settings-that-go-live-right-away).

**7. Test it**

Ask your AI agent something in the Playground that needs one of the tools, and check that the answer uses what the server returned.

![The Playground, where the AI agent answers using a tool from the connected MCP server](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/chat-example.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=334b0aa644806ff02b0f1dd0b23352e0)

If the AI agent refuses or answers without the tool, check its instructions: an AI agent told to answer only about your product will decline questions the tool is meant for. Add the new topic to its instructions.

> [!TIP]
>
> You can also start from the **Custom actions** card: click **Import tools from an MCP server** below **Start customizing**.

## Signing in

Chatbase connects to the server in one of three ways, depending on what the server asks for:

| How | When it's used | What you do |
| - | - | - |
| **No sign-in** | The server is public. | Nothing. Chatbase goes straight to **Import tools**. |
| **Sign in** | The server asks for an account and supports sign-in for apps like Chatbase. | Click **Sign in**, then approve access in the window that opens. Allow popups for chatbase.co if your browser blocks it. |
| **Token header** | The server gives you an API key or token instead. | Under **Use a token header instead**, enter the header name and value, for example `Authorization` and `Bearer your-token`, and click **Connect with headers**. |

![The Sign in step with a Sign in button and the option to use a token header instead](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/sign-in.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=36825e0d60351bdf400b6f6896286aee)

Chatbase stores **Secret** header values encrypted and never shows them again. To change one, enter it again.

> [!WARNING]
>
> Your AI agent calls the server **as the account you signed in with, for every visitor**. Anything that account can see or change, any customer chatting with your AI agent can ask about. Sign in with an account that only has access to what customers should reach, and import only the tools they need.

If the server doesn't let apps sign in on their own, the dialog says "This server doesn't let Chatbase sign in on its own. Use a token header instead." Ask your MCP provider for an API key and use a token header.

## Choosing tools

Each tool carries a badge that comes from the server's own description of it:

| Badge | Meaning |
| - | - |
| **Read-only** | Only reads data. |
| **Writes** | Creates or changes data, but doesn't delete it. |
| **Destructive** | Can delete or overwrite data. |
| **Unknown** | The server didn't say. Read the tool's description before importing it. |

When a server has 10 tools or fewer, its **Read-only** tools start ticked. Everything else starts unticked, so you choose each tool that can change data. Servers with more than 10 tools show a **Search tools** box and start with nothing ticked.

Each imported tool is an enabled Action and counts toward your plan's limit of Actions per AI agent. If you tick more than your plan allows, the step tells you how many more you can add and the **Import N Actions** button stays off until you untick some.

## Customize an imported tool

Click **Customize** on an imported Action to open its settings.

![The General section of an imported MCP tool, with its Action name and When to use fields](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/tool-form-general.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=0ea8d1b5c2742c53c59d90b3866f62f1)

You can change:

* **Action name**: the name shown in **My Actions**. Letters, numbers, `_` and `-`, 3 to 64 characters.
* **When to use**: when the AI agent should call the tool. It starts as the tool's own description. Or turn on [**Only use in Procedures**](https://chatbase.co/docs/user-guides/chatbot/actions/actions-overview.md#only-use-in-procedures).
* **Action type**: **Server only** calls the tool, and **Server with UI** also shows the result in a [Widget](https://chatbase.co/docs/developer-guides/widgets/overview.md).
* **Channels**: where the Action is available. **Server only** works on the same channels as a [Call API](https://chatbase.co/docs/user-guides/chatbot/actions/custom-action.md#action-types) Custom Action, and **Server with UI** on the same channels as **Call API + show Widget**. See [Channels](https://chatbase.co/docs/user-guides/chatbot/actions/actions-overview.md#channels).

![The Action type choice between Server only and Server with UI](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/tool-form-action-type.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=86e07620d7f7c7ca5756b606bf7bdc4b)

The tool's inputs are set by the server and shown read-only. To pick up changes the server made, use [**Refresh tools**](#manage-a-server).

![The read-only list of inputs an MCP tool takes, set by the server](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/tool-form-inputs.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=729abad64d0c23c2b07ea52eaf34c350)

## Manage a server

Open the **⋯** menu on the server's section in **My Actions**:

![The MCP server menu with Edit connection, Refresh tools and Remove server](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/server-menu.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=1511a1d0aab15b18c3873ca4f3afc456)

* **Edit connection**: change the server URL or its token headers, or sign in again.
* **Refresh tools**: fetch the server's current tool list. Chatbase updates imported tools to match, turns off tools the server dropped, and opens new tools in the import step so you can add them.
* **Remove server**: delete the server and every Action imported from it, and sign Chatbase out of it. This can't be undone, and it applies to your live AI agent right away, without **Publish**.

![The Remove this MCP server confirmation dialog](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/remove-server.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=c0d00d71011269a69c8e5c830524fe70)

> [!NOTE]
>
> You can't remove a server while a [Procedure](https://chatbase.co/docs/user-guides/chatbot/procedures/procedures-overview.md) uses one of its Actions. Remove those Actions from your Procedures first.

### Status badges

| Badge | What happened | What to do |
| - | - | - |
| **Needs sign-in** | The server signed Chatbase out, or the sign-in expired. The server's Actions stop working until you sign in again. | Click **Sign in again** on the section. |
| **Needs credentials** | A token header has no value, for example after copying the AI agent to another workspace. | Click **Enter credentials** and enter the token again. |
| **Removed from server** | The server no longer offers this tool, so Chatbase turned the Action off. | Click **Refresh tools** once the tool is back, or delete the Action. |

![An MCP server section with the Needs sign-in badge and a Sign in again button](https://mintcdn.com/chatbase/pQRK-gc5e6VbKojo/user-guides/chatbot/images/actions/mcp/needs-sign-in.png?fit=max\&auto=format\&n=pQRK-gc5e6VbKojo\&q=85\&s=c7c4591e7164cacd6b9421581f653c91)

## Limits and requirements

* The server must be reachable on the public internet over `https://`. Chatbase rejects private and internal addresses with "The MCP server address must be public."
* Chatbase talks to servers over Streamable HTTP. Older SSE addresses (often ending in `/sse`) and local (stdio) servers can't be connected. Use the server's Streamable HTTP address, usually ending in `/mcp`.
* A tool's response can be up to 20 KB. Larger responses reach the AI agent as an error.
* Every call has a 60 second timeout.
* Actions aren't available on the Free plan, and each imported tool counts toward your plan's Actions per AI agent.
* A tool's input schema can be up to 32 KB. Larger tools can't be imported.
* Copying an AI agent to another workspace doesn't copy sign-ins or secret tokens. The copy shows **Needs sign-in** or **Needs credentials** until someone signs in again.

## Troubleshooting

| Message | What to do |
| - | - |
| **Couldn't reach the MCP server** | Check the URL with your provider, and that the server is up and answers within 60 seconds. |
| **URL must start with https\://** | Use the server's `https://` address. Plain `http://` isn't supported. |
| **The MCP server address must be public.** | Expose the server on a public address. Chatbase can't reach private networks. |
| **The server rejected these credentials** | The token header is wrong or expired. Enter a new value. |
| **Popup was blocked.** | Allow popups for chatbase.co and click **Sign in** again. |
| **This tool is already imported from this MCP server.** | The tool already has an Action. Customize that one instead. |

## Best Practices

> [card] Import Only What You Need
>
> Every tool is another choice the AI agent has to make. A few well-described tools work better than dozens.

> [card] Use a Limited Account
>
> Sign in with an account that can only reach what your customers should, because every visitor uses the same connection.

> [card] Be Careful With Writes
>
> Read the description of every **Writes**, **Destructive** and **Unknown** tool before you import it.

> [card] Sharpen When to use
>
> Server descriptions are written for developers. Rewrite **When to use** in plain words about when customers need the tool.

## Frequently asked questions

> [accordion] How is this different from a Custom Action?
>
> A [Custom Action](https://chatbase.co/docs/user-guides/chatbot/actions/custom-action.md) calls one API endpoint you describe by hand: method, URL, inputs and headers. An MCP server describes its own tools, so you only paste a URL and tick the tools you want. Each imported tool is still listed as a Custom Action.

> [accordion] Can I connect more than one MCP server?
>
> Yes. Each server gets its own section in **My Actions**. All their tools together count toward your plan's Action limit.

> [accordion] Does each visitor sign in to the server?
>
> No. The AI agent uses the one account that connected the server, for every conversation.

> [accordion] What happens when the server adds or changes a tool?
>
> Nothing changes until you click **Refresh tools**. Chatbase then updates existing Actions, turns off removed tools, and opens new tools in the import step.

> [accordion] Can I edit a tool's inputs?
>
> No. The server defines them. You can change the Action's name, **When to use**, type and channels.

> [accordion] Is this the same as Chatbase's own MCP server?
>
> No. This page is about your AI agent using other MCP servers. To manage Chatbase from Claude, ChatGPT or another AI assistant, see [MCP](https://chatbase.co/docs/developer-guides/mcp.md).


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