> For the complete documentation index, see [llms.txt](https://support.mailagent.email/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.mailagent.email/gmail-addon/integrations.md).

# 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.mailagent.email/gmail-addon/integrations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
