Agentmail MCP connector
OAuth 2.1/DCRCommunicationProductivityAIConnect 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.
inboxIdstringrequiredID of inboxattachmentsarrayoptionalAttachmentsbccarrayoptionalBCC recipientsccarrayoptionalCC recipientshtmlstringoptionalHTML bodyinReplyTostringoptionalMessage ID this draft is replying tolabelsarrayoptionalLabelsreplyToarrayoptionalReply-to addressessendAtstringoptionalISO 8601 datetime to schedule sending (e.g. 2026-04-01T09:00:00Z)subjectstringoptionalSubjecttextstringoptionalPlain text bodytoarrayoptionalRecipientsagentmailmcp_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.
displayNamestringoptionalDisplay namedomainstringoptionalDomainusernamestringoptionalUsernameagentmailmcp_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.
draftIdstringrequiredID of draftinboxIdstringrequiredID of inboxagentmailmcp_delete_inbox#Permanently delete an inbox and all its associated messages.1 param
Permanently delete an inbox and all its associated messages.
inboxIdstringrequiredID of inboxagentmailmcp_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.
inboxIdstringrequiredID of inboxmessageIdstringrequiredID of messagetoarrayrequiredRecipientsattachmentsarrayoptionalAttachmentsbccarrayoptionalBCC recipientsccarrayoptionalCC recipientshtmlstringoptionalHTML bodylabelsarrayoptionalLabelssubjectstringoptionalSubjecttextstringoptionalPlain text bodyagentmailmcp_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.
attachmentIdstringrequiredID of attachmentinboxIdstringrequiredID of inboxthreadIdstringrequiredID of threadagentmailmcp_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.
draftIdstringrequiredID of draftinboxIdstringrequiredID of inboxagentmailmcp_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.
inboxIdstringrequiredID of inboxagentmailmcp_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.
inboxIdstringrequiredID of inboxthreadIdstringrequiredID of threadagentmailmcp_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.
inboxIdstringrequiredID of inboxafterstringoptionalFilter items after datetimebeforestringoptionalFilter items before datetimelabelsarrayoptionalLabels to filter items bylimitnumberoptionalMax number of items to returnpageTokenstringoptionalPage token for paginationagentmailmcp_list_inboxes#List all inboxes with pagination support.2 params
List all inboxes with pagination support.
limitnumberoptionalMax number of items to returnpageTokenstringoptionalPage token for paginationagentmailmcp_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.
inboxIdstringrequiredID of inboxafterstringoptionalFilter items after datetimebeforestringoptionalFilter items before datetimelabelsarrayoptionalLabels to filter items bylimitnumberoptionalMax number of items to returnpageTokenstringoptionalPage token for paginationagentmailmcp_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.
inboxIdstringrequiredID of inboxmessageIdstringrequiredID of messageattachmentsarrayoptionalAttachmentshtmlstringoptionalHTML bodylabelsarrayoptionalLabelsreplyAllbooleanoptionalReply to all recipientstextstringoptionalPlain text bodyagentmailmcp_send_draft#Send a draft immediately, converting it to a sent message.2 params
Send a draft immediately, converting it to a sent message.
draftIdstringrequiredID of draftinboxIdstringrequiredID of inboxagentmailmcp_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.
inboxIdstringrequiredID of inboxtoarrayrequiredRecipientsattachmentsarrayoptionalAttachmentsbccarrayoptionalBCC recipientsccarrayoptionalCC recipientshtmlstringoptionalHTML bodylabelsarrayoptionalLabelssubjectstringoptionalSubjecttextstringoptionalPlain text bodyagentmailmcp_update_draft#Update a draft's content, recipients, or scheduled send time.10 params
Update a draft's content, recipients, or scheduled send time.
draftIdstringrequiredID of draftinboxIdstringrequiredID of inboxbccarrayoptionalBCC recipientsccarrayoptionalCC recipientshtmlstringoptionalHTML bodyreplyToarrayoptionalReply-to addressessendAtstringoptionalISO 8601 datetime to reschedule sendingsubjectstringoptionalSubjecttextstringoptionalPlain text bodytoarrayoptionalRecipientsagentmailmcp_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.
inboxIdstringrequiredID of inboxmessageIdstringrequiredID of messageaddLabelsarrayoptionalLabels to addremoveLabelsarrayoptionalLabels to remove