AnyMail MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_accountsA | List the configured Gmail accounts (no secrets), showing which is default and which are read-only. |
| search_messagesA | Search a Gmail account with native Gmail query syntax (e.g. 'from:alice newer_than:7d has:attachment', 'in:anywhere subject:invoice'). Returns summaries with gmMsgId/gmThrId. Note: All Mail excludes Trash/Spam unless you add 'in:anywhere'. |
| get_messageA | Fetch a full message: headers, plain-text and HTML bodies, and attachment metadata (use get_attachment for bytes). |
| get_threadA | Fetch all messages in a Gmail thread (by gmThrId), oldest first. |
| list_labelsA | List all labels/mailboxes for the account, including special-use flags. |
| get_attachmentA | Download one attachment from a message by index. Provide savePath to write it to disk (required for files >5MB); otherwise returns base64. |
| send_messageA | Send an email from the account via Gmail SMTP. A copy is filed in Sent automatically. This delivers real mail — confirm before running. |
| create_draftA | Compose a draft and save it to the Drafts mailbox (does not send). |
| create_labelB | Create a new Gmail label (nested labels use '/', e.g. 'Clients/Acme'). |
| modify_labelsA | Add and/or remove Gmail labels on a message. System labels use a backslash prefix (\Inbox, \Starred, \Important); custom labels use their plain name. Removing \Inbox archives. |
| mark_readB | Mark a message as read (\Seen). |
| mark_unreadB | Mark a message as unread. |
| starC | Star a message. |
| unstarA | Remove the star from a message. |
| archiveC | Archive a message (remove it from the Inbox). |
| trash_messageA | Move a message to Trash (reversible for ~30 days). |
| move_messageA | Move a message to a label: applies the target label and removes it from the Inbox. |
| delete_messageA | PERMANENTLY delete a message (moves to Trash then expunges). Irreversible. Requires confirm:true. Prefer trash_message for a reversible delete. |
| mark_all_readA | Mark every message matching a query as read in one pass — e.g. {query:'is:unread', mailbox:'[Gmail]/Spam'}. Reaches Spam/Trash via the mailbox param. Use dryRun:true to preview the count; confirm:true for batches over 100. |
| bulk_modify_labelsB | Add and/or remove labels on every message matching a query (Gmail only). Provide add and/or remove. dryRun:true previews; confirm:true runs batches over 100. |
| bulk_moveA | File every message matching a query under a target label (Gmail: adds the label and removes it from the Inbox; other providers: moves to the folder). |
| bulk_trashA | Move every message matching a query to Trash (reversible ~30 days). Requires a query or mailbox. dryRun:true previews; confirm:true runs batches over 100. |
| bulk_deleteA | PERMANENTLY delete every message matching a query in an explicit mailbox. On Gmail this only works inside Trash or Spam (use empty_trash / empty_spam, or bulk_trash then empty_trash). Irreversible; requires confirm:true (dryRun:true to preview). |
| empty_spamA | PERMANENTLY delete everything in the Spam/Junk mailbox (optionally narrowed by query). Irreversible; requires confirm:true. Use dryRun:true to see the count first. |
| empty_trashA | PERMANENTLY delete everything in the Trash mailbox (optionally narrowed by query). Irreversible; requires confirm:true. Use dryRun:true to see the count first. |
| add_accountA | Add and verify a mail account, storing its App Password in the macOS Keychain (never in the registry or logs). provider: gmail (default) | icloud | fastmail | imap. For 'imap' pass imapHost + smtpHost (ports default to 993 / 465, or 587 with smtpStartTls). SECURITY: the App Password is an argument to this call, so it passes through the agent's context and the MCP client's logs. For the most private path, add accounts in the app's GUI instead — there the password goes straight to the local engine and the model never sees it. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarcinWalendowski/anymail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server