# Integrations

MailAgent supports external integrations that give the AI access to additional context and tools when composing responses. This makes responses more accurate and relevant.

## Available Integrations

### GitBook

Connect your GitBook documentation so the AI can reference your product docs when answering emails.

**Setup:**

1. Open the MailAgent sidebar in Gmail.
2. Click **Integrations**.
3. Click **GitBook**.
4. Enter your GitBook space URL.
5. Save.

Once connected, the AI will search your documentation for relevant information before composing a response. This is especially useful for:

* Customer support — AI can reference product guides and FAQs.
* Technical support — AI can link to API docs and troubleshooting guides.
* Sales — AI can reference feature pages and pricing information.

A green checkmark appears next to GitBook in the integrations list when connected.

### MCP Servers (Model Context Protocol)

Connect any MCP-compatible server to extend the AI's capabilities with custom tools and data sources.

**What is MCP?**

The Model Context Protocol is an open standard for connecting AI models to external tools and data. MCP servers expose capabilities that the AI can invoke during email composition.

**Setup:**

1. Open the MailAgent sidebar in Gmail.
2. Click **Integrations**.
3. Click **MCP**.
4. Enter the MCP server URL (must be an HTTP endpoint).
5. Optionally add a Bearer token for authentication.
6. Save.

**Examples of MCP servers:**

* **CRM integration** — Look up customer information before responding.
* **Knowledge base** — Search internal wikis or documentation.
* **Order system** — Check order status to include in responses.
* **Calendar** — Check availability for scheduling emails.

A green checkmark appears next to MCP in the integrations list when at least one server is connected.

## Managing Integrations

You can add multiple MCP servers and connect multiple knowledge bases. To remove an integration:

1. Open the MailAgent sidebar.
2. Click **Integrations**.
3. Navigate to the integration you want to remove.
4. Click Remove / Disconnect.

## How Integrations Affect Responses

When the AI processes an email:

1. It analyzes the email content and determines what context might be needed.
2. If relevant, it queries connected integrations (GitBook docs, MCP tools).
3. The retrieved information is used as additional context for generating the response.
4. The final email incorporates both the AI's knowledge and the integration data.

This means the AI's responses become more accurate and specific to your business as you add more integrations.
