Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Agentmail MCP connector

OAuth 2.1/DCR CommunicationProductivityAI

Connect to Agentmail MCP. Manage inboxes, send and receive email, handle drafts, threads, and attachments from your AI workflows.

Agentmail MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. 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>
  3. 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.actions
    const connector = 'agentmailmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { 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 call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'agentmailmcp_list_inboxes',
    toolInput: {},
    })
    console.log(result)

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

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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
inboxId string required ID of inbox
messageId string required ID of message
addLabels array optional Labels to add
removeLabels array optional Labels to remove