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

# MCP Servers

> Connect remote Model Context Protocol (MCP) servers so your AI assistant can use external tools during voice and chat conversations

> [!NOTE]
>
> MCP servers let your AI assistant pull live data and trigger actions in
> external systems — like HubSpot, your internal APIs, or knowledge tools —
> right in the middle of a conversation. Connect a server once, assign it to any
> assistant, and its tools become available to the AI automatically.

For connecting Claude or ChatGPT to your Lacy.ai account, see [Connect AI](https://docs.lacy.ai/automation/connect-ai.md).

## What is an MCP server?

The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) is an open
standard for exposing tools to AI models. An **MCP server** is simply a remote
HTTP endpoint that speaks this protocol. You don't install anything — you enter
the server's URL (and optional authentication headers), and the assistant can
call its tools while talking to your customer.

> [card] Why use MCP servers?
>
> * Add whole toolsets (e.g. a HubSpot or Notion integration) in one step instead of building tools one by one
> * Tools, descriptions and parameters are discovered automatically from the server
> * Works across voice calls, the web widget, and chat
> * Reuse one server across many assistants

## Mid-call tools and MCP servers

Both are managed under **Mid call tools / MCP** in the Lacy.ai dashboard.

> [card] Mid-call tools
>
> A single custom HTTP endpoint you define by hand (URL, method, parameters).
> Best for one-off calls to your own API. See [Custom Mid-Call Tools](https://docs.lacy.ai/ai-assistants/custom-tools.md).

> [card] MCP servers
>
> A remote server that exposes **many** tools at once, discovered
> automatically. Best for connecting to a platform or a shared integration.

## Connecting a server

**1. Open the Tools page**

Go to **Mid call tools / MCP** in the dashboard sidebar and switch to the **MCP servers** tab, then click **New MCP server**.

**2. Fill in the details**

* **Display name**: a friendly name shown when assigning the server (e.g. `HubSpot CRM`)
* **Identifier**: an internal id, lowercase letters and underscores only (e.g. `hubspot`)
* **Description**: optional, for your own reference
* **Server URL**: the remote MCP endpoint
* **Timeout**: how long to wait when connecting to the server

**3. Choose the transport**

Leave this on **Auto-detect** unless you know otherwise. Auto-detect picks the
right transport from the URL:

```yaml theme={null}
URL ends with /mcp  →  Streamable HTTP
URL ends with /sse  →  SSE (Server-Sent Events)
```

**4. Add authentication headers (optional)**

If the server requires a token, add it as a header. Headers are **stored encrypted**.

```yaml theme={null}
Authorization: Bearer your_token_here
```

When you save, the server is tested automatically and a notification lists the
tools it exposes.

### Test a public MCP server

> [!TIP]
>
> Want to test MCP without any setup? Connect the public **DeepWiki** server (no
> authentication required):
>
> * **Display name**: `DeepWiki`
> * **Identifier**: `deepwiki`
> * **Server URL**: `https://mcp.deepwiki.com/mcp`
>
> Then ask your assistant something like *"Use DeepWiki to summarize the
> facebook/react repository."*

## Connection status & discovered tools

Each server is shown as a card with a live connection status.

> [card] Connected
>
> The server is reachable. Its available tools are listed on the card.

> [card] Disconnected
>
> The server couldn't be reached. The error is shown so you can fix the URL or headers.

> [card] Not tested
>
> The server hasn't been checked yet.

Use **Test connection** at any time to re-check a server and refresh its tool list.

## Choosing which tools are exposed

By default, **all** of a server's tools are available to your assistants. Open
**Manage tools** (on the server's edit page) to view each tool's description and
parameters, and enable or disable individual tools.

> [!NOTE]
>
> Disabled tools are hidden from the AI. To expose **no** tools at all, simply
> remove the server from the assistant instead.

## Assigning a server to an assistant

**1. Open your assistant**

Edit an assistant and go to the **Prompt & Tools** step.

**2. Assign MCP servers**

In the **MCP servers** section, select one or more servers. The list shows
each server's connection status and tool count.

**3. Save**

The assistant can now use the server's enabled tools during voice calls, the
web widget, and chat.

## Authentication

The integration sends **static headers** with each request. It does not perform
an interactive OAuth login.

| Server authentication | Supported | How |
| - | - | - |
| No authentication | ✅ | Nothing to configure |
| API key / token | ✅ | Add an `Authorization` (or custom) header |
| Token embedded in the URL (e.g. Zapier, Composio) | ✅ | Paste the full URL |
| Interactive OAuth login | ❌ | Use a personal access token in a header instead |

## Real-world examples

> [accordion] Documentation lookup (DeepWiki)
>
> ```yaml theme={null}
> Display name: DeepWiki
> Identifier: deepwiki
> Server URL: https://mcp.deepwiki.com/mcp
> Headers: (none)
> Tools: read_wiki_structure, read_wiki_contents, ask_question
> ```
>
> The assistant can answer questions about any public GitHub repository.

> [accordion] CRM access (HubSpot-style)
>
> ```yaml theme={null}
> Display name: HubSpot CRM
> Identifier: hubspot
> Server URL: https://your-mcp-host.example.com/mcp
> Headers:
>   Authorization: Bearer pat-xxxxxxxx
> ```
>
> The assistant can look up contacts, create deals, or update records during a call.

## Best practices & security

> [!WARNING]
>
> Only connect MCP servers you trust. The tools and the data they return are
> provided by the remote server and are passed to the AI during live
> conversations.

* Keep tokens scoped to the minimum permissions the assistant needs.
* Use **Manage tools** to expose only the tools an assistant actually requires.
* Give each tool a clear name and description on the server so the AI knows when to use it.
* Mention the available capabilities in your assistant's [system prompt](https://docs.lacy.ai/ai-assistants/system-prompt.md) so it uses them at the right moments.

> [!TIP]
>
> Test with simple conversations first and confirm the assistant calls the right
> tool with the right parameters before going live.


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