Agentmail MCP connector
OAuth 2.1/DCR CommunicationProductivityAIConnect to Agentmail MCP. Manage inboxes, send and receive email, handle drafts, threads, and attachments from your AI workflows.
Agentmail MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'agentmailmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Agentmail MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'agentmailmcp_list_inboxes',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "agentmailmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Agentmail MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="agentmailmcp_list_inboxes",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Update message, draft — Update a message’s labels by adding or removing label values
- Send message, draft — Send a new email message from an inbox to one or more recipients
- Message reply to, forward — Reply to a specific message, optionally replying to all recipients
- List threads, inboxes, drafts — List message threads in an inbox with optional label filtering and pagination
- Get thread, inbox, draft — Retrieve a message thread by ID, including all messages in the conversation
- Delete inbox, draft — Permanently delete an inbox and all its associated messages
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
agentmailmcp_create_draft
#
Create a draft email in an inbox, optionally scheduling it to send at a future time. 12 params
Create a draft email in an inbox, optionally scheduling it to send at a future time.
inboxId string required ID of inbox attachments array optional Attachments bcc array optional BCC recipients cc array optional CC recipients html string optional HTML body inReplyTo string optional Message ID this draft is replying to labels array optional Labels replyTo array optional Reply-to addresses sendAt string optional ISO 8601 datetime to schedule sending (e.g. 2026-04-01T09:00:00Z) subject string optional Subject text string optional Plain text body to array optional Recipients agentmailmcp_create_inbox
#
Create a new inbox with a given username and domain for sending and receiving email. 3 params
Create a new inbox with a given username and domain for sending and receiving email.
displayName string optional Display name domain string optional Domain username string optional Username agentmailmcp_delete_draft
#
Delete a draft by ID. Also cancels any scheduled send for that draft. 2 params
Delete a draft by ID. Also cancels any scheduled send for that draft.
draftId string required ID of draft inboxId string required ID of inbox agentmailmcp_delete_inbox
#
Permanently delete an inbox and all its associated messages. 1 param
Permanently delete an inbox and all its associated messages.
inboxId string required ID of inbox agentmailmcp_forward_message
#
Forward an existing message to one or more recipients, optionally adding extra content. 10 params
Forward an existing message to one or more recipients, optionally adding extra content.
inboxId string required ID of inbox messageId string required ID of message to array required Recipients attachments array optional Attachments bcc array optional BCC recipients cc array optional CC recipients html string optional HTML body labels array optional Labels subject string optional Subject text string optional Plain text body agentmailmcp_get_attachment
#
Retrieve a specific attachment from a message thread by attachment ID. 3 params
Retrieve a specific attachment from a message thread by attachment ID.
attachmentId string required ID of attachment inboxId string required ID of inbox threadId string required ID of thread agentmailmcp_get_draft
#
Retrieve a draft by ID, including its content, status, and scheduled send time. 2 params
Retrieve a draft by ID, including its content, status, and scheduled send time.
draftId string required ID of draft inboxId string required ID of inbox agentmailmcp_get_inbox
#
Retrieve inbox details by ID, including its email address and configuration. 1 param
Retrieve inbox details by ID, including its email address and configuration.
inboxId string required ID of inbox agentmailmcp_get_thread
#
Retrieve a message thread by ID, including all messages in the conversation. 2 params
Retrieve a message thread by ID, including all messages in the conversation.
inboxId string required ID of inbox threadId string required ID of thread agentmailmcp_list_drafts
#
List drafts in an inbox with optional label filtering and pagination. 6 params
List drafts in an inbox with optional label filtering and pagination.
inboxId string required ID of inbox after string optional Filter items after datetime before string optional Filter items before datetime labels array optional Labels to filter items by limit number optional Max number of items to return pageToken string optional Page token for pagination agentmailmcp_list_inboxes
#
List all inboxes with pagination support. 2 params
List all inboxes with pagination support.
limit number optional Max number of items to return pageToken string optional Page token for pagination agentmailmcp_list_threads
#
List message threads in an inbox with optional label filtering and pagination. 6 params
List message threads in an inbox with optional label filtering and pagination.
inboxId string required ID of inbox after string optional Filter items after datetime before string optional Filter items before datetime labels array optional Labels to filter items by limit number optional Max number of items to return pageToken string optional Page token for pagination agentmailmcp_reply_to_message
#
Reply to a specific message, optionally replying to all recipients. 7 params
Reply to a specific message, optionally replying to all recipients.
inboxId string required ID of inbox messageId string required ID of message attachments array optional Attachments html string optional HTML body labels array optional Labels replyAll boolean optional Reply to all recipients text string optional Plain text body agentmailmcp_send_draft
#
Send a draft immediately, converting it to a sent message. 2 params
Send a draft immediately, converting it to a sent message.
draftId string required ID of draft inboxId string required ID of inbox agentmailmcp_send_message
#
Send a new email message from an inbox to one or more recipients. 9 params
Send a new email message from an inbox to one or more recipients.
inboxId string required ID of inbox to array required Recipients attachments array optional Attachments bcc array optional BCC recipients cc array optional CC recipients html string optional HTML body labels array optional Labels subject string optional Subject text string optional Plain text body agentmailmcp_update_draft
#
Update a draft's content, recipients, or scheduled send time. 10 params
Update a draft's content, recipients, or scheduled send time.
draftId string required ID of draft inboxId string required ID of inbox bcc array optional BCC recipients cc array optional CC recipients html string optional HTML body replyTo array optional Reply-to addresses sendAt string optional ISO 8601 datetime to reschedule sending subject string optional Subject text string optional Plain text body to array optional Recipients agentmailmcp_update_message
#
Update a message's labels by adding or removing label values. 4 params
Update a message's labels by adding or removing label values.
inboxId string required ID of inbox messageId string required ID of message addLabels array optional Labels to add removeLabels array optional Labels to remove