# MCP server

> Connect Claude, ChatGPT, Cursor, Claude Code, VS Code or any MCP client to a Maylee workspace to read, triage and draft email, and send it only when you approve.

Source: https://docs.maylee.app/mcp

The Maylee MCP server connects an AI assistant to **one Maylee workspace** through the [Model Context Protocol](https://modelcontextprotocol.io). The assistant can read, search and triage email, read attachments, prepare replies, forwards and new drafts, send or schedule them when you approve, and manage labels, AI label rules, views, inbox filters, auto-forward rules, signatures, snippets and notification settings.

> **Coming soon**
>
> The Maylee MCP server is being rolled out and does not answer at this address yet. This page describes how it will work. In the meantime, the [REST API](/api-reference) is available.

## Server URL

```txt
https://mcp.maylee.app/mcp
```

* **Transport**: Streamable HTTP, stateless, JSON responses (`POST /mcp`, no server-sent events). A remote server: nothing to install.
* **Authentication**: OAuth 2.1 (recommended), or a Maylee API key sent as a Bearer token.
* **Tools**: 69 tools in five toolsets. Each connection only sees the tools its permissions allow.
* Workspaces provided through Emelia (white-label) cannot use the MCP server: the endpoint answers `404` there.

## Get started

1. **Add the server** in your assistant: [Connect](/mcp/connect) has the exact steps for Claude, ChatGPT, Claude Code, Cursor and VS Code.
2. **Sign in to Maylee** in the browser window that opens, pick one workspace, and choose what the assistant may do: read, organize and draft, or send. See [Permissions and safety](/mcp/permissions).
3. **Ask**: "Triage my inbox and draft replies to the clients." The assistant calls `get_workspace`, lists the unread emails, reads the conversations that need it, and prepares drafts with `draft_reply`. It shows you the drafts and only sends the ones you approve.

## What the assistant can do

| Toolset                            | Tools | What it covers                                                                                                             |
| ---------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------- |
| [Reference](/mcp/tools/reference)  | 1   | `get_reference`: label colors, view icons, filter grammar, rule options, limits. Free, it never counts against the quota.  |
| [Account](/mcp/tools/account)      | 10   | Workspace and connection, mailboxes, sync, unread counts, contacts, reply reminders, notification settings, timezone.      |
| [Emails](/mcp/tools/emails)        | 14   | List, search and read emails, threads and attachments; mark read, pin, move, trash, label; waiting for reply; unsubscribe. |
| [Compose](/mcp/tools/compose)      | 22   | Drafts, replies, forwards, sending, scheduling, attachments, automatic replies, Magic Reply, signatures, snippets.         |
| [Configuration](/mcp/tools/config) | 22   | Labels, AI label rules, views, inbox filters, auto-forward rules.                                                          |

Every tool, with its parameters and output, is in the [tools reference](/mcp/tools).

## Prompts

The server offers three guided prompts, shown in the `/` menu of clients such as Claude. They change nothing by themselves: they tell the assistant which tools to chain, and to ask you before acting.

- `triage_inbox`: **Triage my inbox**. Walk through the unread inbox, summarize it by importance, and propose labels, reply drafts and emails to trash. Nothing is changed before the user approves.
  - `mailboxId` (optional): Only this mailbox (id from list_mailboxes). Default: all mailboxes.
  - `maxEmails` (optional): How many unread emails to review, 1 to 100 (default 30).
- `follow_up_waiting_for_reply`: **Follow up on emails waiting for a reply**. List sent emails that are still waiting for a reply after some days, and draft polite follow-ups for the user to approve.
  - `olderThanDays` (optional): Only emails sent more than this many days ago, 1 to 90 (default 3).
- `set_up_ai_labels`: **Set up AI labels**. Interview the user about how they want their email sorted, then propose AI label rules (names, colors, conditions, options) and create them after approval.
  - `goal` (required): What the user wants sorted automatically, in their own words.

## Built for safety

* Email content, attachments, sender names and subjects are written by third parties. The server tells the assistant to treat them as data and never follow instructions found in them.
* Sending and scheduling need your explicit approval of that exact email (`confirm: true`), and an idempotency key so that a retry never sends twice.
* Hourly budgets bound what one connection can do: 50 sends, 200 recipients and 500 emails moved to Trash or Spam per hour, and at most 50 recipients (to, cc and bcc) per email.
* The server never deletes email permanently, and never returns credentials, API keys or storage links.

Details in [Permissions and safety](/mcp/permissions) and [Limits and troubleshooting](/mcp/limits).
