# MCP tools

The MCP server lives at `https://mailforbots.com/mcp` and has 41 tools plus `search_tools` and `call_tool` to reach them, all scoped to the account that owns the API key (a user or a team) and to the key's scopes and inboxes. Tool errors come back as text starting with `Error:` and `isError` set; a tool the key's scopes don't allow returns `Error: This API key lacks the ... scope`.

To keep your agent's context small, the server lists only three tools by default: `search_tools`, `call_tool` and `report_issue`. The agent calls `search_tools` with what it wants to do, asks for `detail: "full"` to see a tool's arguments, then runs it with `call_tool`. Every tool can also still be called by its own name. Clients that prefer the complete list can use `https://mailforbots.com/mcp?tools=all`.

`inbox` arguments accept either an inbox id or its full email address. Arguments marked required must be provided.

- [`search_tools`](https://mailforbots.com/docs/mcp)
- [`call_tool`](https://mailforbots.com/docs/mcp)
- [`search_crm`](https://mailforbots.com/docs/mcp)
- [`get_person`](https://mailforbots.com/docs/mcp)
- [`upsert_person`](https://mailforbots.com/docs/mcp)
- [`get_company`](https://mailforbots.com/docs/mcp)
- [`upsert_company`](https://mailforbots.com/docs/mcp)
- [`add_crm_entry`](https://mailforbots.com/docs/mcp)
- [`update_crm_entry`](https://mailforbots.com/docs/mcp)
- [`delete_crm_entry`](https://mailforbots.com/docs/mcp)
- [`list_crm_tasks`](https://mailforbots.com/docs/mcp)
- [`complete_crm_task`](https://mailforbots.com/docs/mcp)
- [`list_crm_tags`](https://mailforbots.com/docs/mcp)
- [`tag_crm_record`](https://mailforbots.com/docs/mcp)
- [`untag_crm_record`](https://mailforbots.com/docs/mcp)
- [`get_email_metrics`](https://mailforbots.com/docs/mcp)
- [`list_email_sends`](https://mailforbots.com/docs/mcp)
- [`get_email_events`](https://mailforbots.com/docs/mcp)
- [`get_storage_usage`](https://mailforbots.com/docs/mcp)
- [`create_inbox`](https://mailforbots.com/docs/mcp)
- [`list_inboxes`](https://mailforbots.com/docs/mcp)
- [`list_domains`](https://mailforbots.com/docs/mcp)
- [`delete_inbox`](https://mailforbots.com/docs/mcp)
- [`list_messages`](https://mailforbots.com/docs/mcp)
- [`get_message`](https://mailforbots.com/docs/mcp)
- [`wait_for_message`](https://mailforbots.com/docs/mcp)
- [`get_thread`](https://mailforbots.com/docs/mcp)
- [`list_signatures`](https://mailforbots.com/docs/mcp)
- [`set_signature`](https://mailforbots.com/docs/mcp)
- [`delete_signature`](https://mailforbots.com/docs/mcp)
- [`send_email`](https://mailforbots.com/docs/mcp)
- [`reply`](https://mailforbots.com/docs/mcp)
- [`forward`](https://mailforbots.com/docs/mcp)
- [`search`](https://mailforbots.com/docs/mcp)
- [`list_labels`](https://mailforbots.com/docs/mcp)
- [`label_thread`](https://mailforbots.com/docs/mcp)
- [`create_draft`](https://mailforbots.com/docs/mcp)
- [`list_drafts`](https://mailforbots.com/docs/mcp)
- [`send_draft`](https://mailforbots.com/docs/mcp)
- [`get_attachment`](https://mailforbots.com/docs/mcp)
- [`get_raw_message`](https://mailforbots.com/docs/mcp)
- [`delete_message`](https://mailforbots.com/docs/mcp)
- [`report_issue`](https://mailforbots.com/docs/mcp)

## `search_tools`

Find tools by what you want to do (for example "wait for a verification code"). Only search_tools, call_tool and report_issue are listed up front; every other tool is found here and run with call_tool. Tools your key's scopes don't allow are left out. Omit query to browse the categories.

Any valid API key can call it, whatever its scopes.

| Argument | Type | Description |
| --- | --- | --- |
| `query` | `string` | What you want to do, in plain words. |
| `category` | `inboxes \| messages \| sending \| drafts \| organize \| notes \| analytics \| crm \| support` | Only tools in this category. |
| `detail` | `names \| summary \| full` | How much to return per tool: names only, name and description (default), or the full input schema and annotations. |
| `limit` | `integer (1 to 25)` | Maximum tools to return. Default 8. |

## `call_tool`

Run a tool found with search_tools, by exact name. The arguments are checked against the tool's input schema; mistakes come back as an error naming the problem (and a close tool name if the name is wrong). Results and errors are the same as calling the tool directly.

Any valid API key can call it, whatever its scopes.

| Argument | Type | Description |
| --- | --- | --- |
| `name`required | `string` | Tool name from search_tools. |
| `arguments` | `object` | The tool's arguments (see its input_schema). |

## `search_crm`

Find people and companies in the CRM by name, email, domain or other identifier, and/or by tag.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `query` | `string` |  |
| `tag` | `string` |  |
| `type` | `any \| person \| company` |  |
| `limit` | `number` |  |

## `get_person`

A person's profile, company, identifiers, tags, the notes/insights/links/tasks you may see, and your past emails with them.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `person`required | `string` | Person id or email. |

## `upsert_person`

Create a person or update the one with this id/email. People are shared with every agent of the account; fields are merged.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `email` | `string` |  |
| `name` | `string` |  |
| `title` | `string` |  |
| `company` | `string` | Company id or domain; an unknown domain creates the company. |
| `description` | `string` |  |
| `fields` | `object` |  |
| `identifiers` | `{ kind, value }[]` | email \| phone \| linkedin \| url \| domain |

## `get_company`

A company's profile, domains, people, tags and the entries you may see.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `company`required | `string` | Company id or domain. |

## `upsert_company`

Create a company or update the one with this id/domain. Shared with every agent of the account.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `domain` | `string` |  |
| `name` | `string` |  |
| `description` | `string` |  |
| `fields` | `object` |  |

## `add_crm_entry`

Record a note, insight, link or task (with due_at) about a person or company. Private to you unless shared.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `person` | `string` | Person id or email. |
| `company` | `string` | Company id or domain. |
| `kind`required | `note \| insight \| link \| task` |  |
| `title` | `string` |  |
| `body` | `string` |  |
| `url` | `string` |  |
| `due_at` | `string` |  |
| `visibility` | `private \| shared` | Private (default): only you and the account owner see it. |
| `thread_id` | `string` |  |

## `update_crm_entry`

Edit one of your entries, or share it / make it private.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `id`required | `string` |  |
| `title` | `string` |  |
| `body` | `string` |  |
| `url` | `string` |  |
| `due_at` | `string` |  |
| `visibility` | `private \| shared` | Private (default): only you and the account owner see it. |

## `delete_crm_entry`

Delete one of your entries.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `id`required | `string` |  |

## `list_crm_tasks`

Your open CRM tasks, soonest first.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `due_before` | `string` |  |
| `tag` | `string` |  |
| `include_done` | `boolean` |  |
| `all` | `boolean` | Every task you can see, not only yours. |
| `limit` | `number` |  |

## `complete_crm_task`

Mark one of your tasks done (or open again).

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `id`required | `string` |  |
| `done` | `boolean` |  |

## `list_crm_tags`

The account's shared tag vocabulary.

Needs scope `mail:read`.

No arguments.

## `tag_crm_record`

Tag a person or company; private tags track your own state, shared tags classify for everyone.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `person` | `string` | Person id or email. |
| `company` | `string` | Company id or domain. |
| `tag`required | `string` |  |
| `visibility` | `private \| shared` | Private (default): only you and the account owner see it. |

## `untag_crm_record`

Remove your tag from a person or company.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `person` | `string` | Person id or email. |
| `company` | `string` | Company id or domain. |
| `tag`required | `string` |  |
| `visibility` | `private \| shared` | Private (default): only you and the account owner see it. |

## `get_email_metrics`

Delivery and engagement statistics for a send-time cohort of up to 90 days. Recipient counts; rates are null when no eligible recipients exist.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `start_date` | `string` |  |
| `end_date` | `string` |  |
| `inbox_id` | `string` |  |
| `domain_id` | `string` |  |
| `timezone` | `string` | IANA timezone |
| `granularity` | `day \| hour` |  |

## `list_email_sends`

Durable send history, including deleted mailboxes. Paginate with next_cursor as before.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `start_date` | `string` |  |
| `end_date` | `string` |  |
| `inbox_id` | `string` |  |
| `domain_id` | `string` |  |
| `before` | `string` |  |

## `get_email_events`

Recipient outcomes and delivery/tracking event timeline. Paginate with next_cursor as cursor.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `send_id`required | `string` |  |
| `cursor` | `string` |  |

## `get_storage_usage`

Account storage used, reserved and remaining bytes. Requires an account-wide key.

Needs scope `mail:read`.

No arguments.

## `create_inbox`

Create a new inbox on the shared Mail for Bots domain or one of your verified custom domains. Returns its address. Use ttl_minutes for throwaway test inboxes.

Needs scope `inboxes:manage`.

| Argument | Type | Description |
| --- | --- | --- |
| `domain` | `string` | Verified custom domain; defaults to the shared domain. See list_domains. |
| `username` | `string` | Local part of the address; random if omitted. |
| `display_name` | `string` | Sender name shown on outgoing mail. |
| `ttl_minutes` | `integer (5 to 43200)` | Auto-delete the inbox after N minutes. |

## `list_inboxes`

List all inboxes you own, with unread counts.

Needs scope `mail:read`.

No arguments.

## `list_domains`

List your custom domains and whether they are verified (usable for create_inbox) and receiving mail.

Needs scope `mail:read`.

No arguments.

## `delete_inbox`

Permanently delete an inbox and all its messages.

Needs scope `inboxes:manage`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox`required | `string` | Inbox id or full email address |

## `list_messages`

List message summaries in an inbox, newest first.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox`required | `string` | Inbox id or full email address |
| `unread_only` | `boolean` |  |
| `direction` | `"inbound" \| "outbound"` |  |
| `limit` | `integer (1 to 100)` |  |

## `get_message`

Get a full message: plain text body, attachment list, and extracted one-time codes and links (verify, login, reset). Marks it read.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `message_id`required | `string` |  |

## `wait_for_message`

Block until an unread inbound message matching the filters exists (including ones that already arrived), then return it in full and mark it read. Returns null on timeout. Ideal after triggering a signup or password reset.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox`required | `string` | Inbox id or full email address |
| `from_contains` | `string` |  |
| `subject_contains` | `string` |  |
| `to_contains` | `string` | Match the address the mail was sent to, e.g. a +alias tag like "+github". |
| `timeout_seconds` | `integer (1 to 300)` | Default 60. |

## `get_thread`

Get every message in a conversation, oldest first.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `thread_id`required | `string` |  |

## `list_signatures`

An inbox's signature variants (name, html, text, default). Pass a name as `signature` when sending.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox`required | `string` |  |

## `set_signature`

Create or replace a signature variant (html and/or text); default: true makes it the one added automatically.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox`required | `string` |  |
| `name` | `string` | a-z 0-9 - _ (default "default") |
| `html` | `string` |  |
| `text` | `string` |  |
| `default` | `boolean` |  |

## `delete_signature`

Delete a signature variant; the oldest remaining one becomes the default.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox`required | `string` |  |
| `name`required | `string` |  |

## `send_email`

Send an email from one of your inboxes.

Needs scope `mail:send`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox`required | `string` | Sending inbox id or address |
| `to`required | `string[]` | At least one recipient. |
| `cc` | `string[]` |  |
| `bcc` | `string[]` |  |
| `subject`required | `string` |  |
| `text` | `string` |  |
| `html` | `string` |  |
| `attachments` | `{ filename, content_type?, content_base64 }[]` | Files to attach (up to 20, max 20 MB total). |
| `signature` | `boolean \| string` | Omit/true: the inbox's default signature; a variant name; false: none. |

## `reply`

Reply to a message, keeping it in the same thread.

Needs scope `mail:send`.

| Argument | Type | Description |
| --- | --- | --- |
| `message_id`required | `string` |  |
| `text` | `string` |  |
| `html` | `string` |  |
| `reply_all` | `boolean` |  |
| `quote` | `boolean` | Include the original message as a quote below your reply. |
| `attachments` | `{ filename, content_type?, content_base64 }[]` | Files to attach (up to 20, max 20 MB total). |
| `signature` | `boolean \| string` | Omit/true: the inbox's default signature; a variant name; false: none. |

## `forward`

Forward a message (including its attachments) to new recipients, with an optional note on top.

Needs scope `mail:send`.

| Argument | Type | Description |
| --- | --- | --- |
| `message_id`required | `string` |  |
| `to`required | `string[]` |  |
| `cc` | `string[]` |  |
| `text` | `string` | Your note above the forwarded message. |
| `signature` | `boolean \| string` | Omit/true: the inbox's default signature; a variant name; false: none. |

## `search`

Search your mail (subject, sender, recipients, body) with Gmail-style operators. Returns conversations, newest first.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `query`required | `string` | Free text and operators; see Search operators. |
| `inbox` | `string` | Limit to one inbox (id or address). |
| `folder` | `"inbox" \| "starred" \| "sent" \| "all" \| "trash"` | Default: all. |
| `limit` | `integer (1 to 100)` |  |

## `list_labels`

List your labels (with how many conversations each has).

Needs scope `mail:read`.

No arguments.

## `label_thread`

Add and/or remove labels on a conversation. Labels are given by name; missing names in add are created.

Needs scope `mail:write`.

| Argument | Type | Description |
| --- | --- | --- |
| `thread_id`required | `string` |  |
| `add` | `string[]` |  |
| `remove` | `string[]` |  |

## `create_draft`

Save an email as a draft instead of sending it, so a human can review and send it from the webmail. Use mode reply, replyAll or forward with original_message_id to draft a response; for replies, recipients and the Re: subject default from the original message.

Needs scope `drafts:write`.

| Argument | Type | Description |
| --- | --- | --- |
| `inbox` | `string` | Sending inbox id or address (required for new messages). |
| `mode` | `"new" \| "reply" \| "replyAll" \| "forward"` |  |
| `original_message_id` | `string` |  |
| `to` | `string[]` |  |
| `cc` | `string[]` |  |
| `bcc` | `string[]` |  |
| `subject` | `string` |  |
| `text` | `string` |  |
| `html` | `string` |  |
| `attachments` | `{ filename, content_type?, content_base64 }[]` | Files to attach (up to 20, max 20 MB total). |
| `signature` | `boolean \| string` | Omit/true: the inbox's default signature; a variant name; false: none. |

## `list_drafts`

List saved drafts (yours and ones other agents prepared).

Needs scope `mail:read`.

No arguments.

## `send_draft`

Send a saved draft.

Needs scope `mail:send`.

| Argument | Type | Description |
| --- | --- | --- |
| `draft_id`required | `string` |  |

## `get_attachment`

Get an attachment: a short-lived download URL, plus the content inline as text for small text files (csv, txt, json, and so on).

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `message_id`required | `string` |  |
| `index`required | `integer (0 or more)` | Position in the message's attachment list. |

## `get_raw_message`

Get the original source of a message (RFC 822): all headers including Received, DKIM-Signature and Authentication-Results, plus the MIME body. Large messages are truncated; size is the full length in bytes. Mail received before originals were kept returns an error.

Needs scope `mail:read`.

| Argument | Type | Description |
| --- | --- | --- |
| `message_id`required | `string` |  |
| `max_bytes` | `integer (1000 to 2000000)` | Truncate after this many bytes. Default 200000. |

## `delete_message`

Delete a message.

Needs scope `mail:write`.

| Argument | Type | Description |
| --- | --- | --- |
| `message_id`required | `string` |  |

## `report_issue`

Report a problem you ran into with Mail for Bots: a tool that failed or behaved unexpectedly, a missing capability, confusing output, or mail that was not delivered. Reports go to the Mail for Bots team. Never include secrets. Limited to 30 reports an hour.

Any valid API key can call it, whatever its scopes.

| Argument | Type | Description |
| --- | --- | --- |
| `category`required | `bug \| missing_feature \| confusing \| delivery \| other` |  |
| `summary`required | `string (max 300)` | One line: what went wrong. |
| `details` | `string (max 10000)` | What you were trying to do, what you expected, what happened. |
| `tool_name` | `string` | The MCP tool involved. |
| `context` | `object` | Arguments used, error text, message or inbox ids. |

## Guides

- [A hosted MCP email server](https://mailforbots.com/mcp-email-server)
- [Give Claude Code its own email inbox with one MCP command](https://mailforbots.com/blog/claude-code-email-mcp)
- [Email MCP setup for Cursor, Codex CLI and Gemini CLI](https://mailforbots.com/blog/cursor-codex-gemini-email-mcp-setup)
