Skip to main content

Overview

Use the Email MCP server from your ATXP-powered agent to send and receive emails. Each ATXP user gets a unique email address in the format {user_id}@atxp.email.

Example prompts

  • “Check my email inbox and summarize any new messages.”
  • “Send an email to jane@example.com letting her know the meeting has been rescheduled to 3pm.”
  • “Read the latest message from support@company.com.”

Pricing

OperationCost
Check inboxFree
Read messageFree
Send email$0.01 per email

Tools

Check your email inbox for new messages. Returns a list of message summaries with sender, subject, and date.

Arguments

This tool takes no arguments.

Response

Returns a JSON object with the following properties:
status
string
The status of the operation. Returns “success” when completed successfully, otherwise returns “error”.
errorMessage
string?
The error message if the operation fails. Only returned when status === "error".
inboxAddress
string?
Your unique ATXP email address. Only returned when status === "success".
messages
array?
List of messages in your inbox. Only returned when status === "success".
Read the full content of a specific email message.

Arguments

Accepts a JSON object with the following properties:
messageId
string
required
The unique identifier of the message to read. Get this from email_check_inbox.

Response

Returns a JSON object with the following properties:
status
string
The status of the operation. Returns “success” when completed successfully, otherwise returns “error”.
errorMessage
string?
The error message if the operation fails. Only returned when status === "error".
inboxAddress
string?
Your unique ATXP email address.
message
object?
The full message content. Only returned when status === "success".
Send an email from your ATXP email address.

Arguments

Accepts a JSON object with the following properties:
to
string
required
The recipient’s email address.
subject
string
required
The email subject line.
body
string
required
The email body content.

Response

Returns a JSON object with the following properties:
status
string
The status of the operation. Returns “success” when the email is sent, otherwise returns “error”.
errorMessage
string?
The error message if the operation fails. Only returned when status === "error".
inboxAddress
string?
Your ATXP email address (the sender address).
messageId
string?
Unique identifier for the sent message.

Usage

1

Define the Email service

Create a reusable service configuration that points to the MCP server.
const emailService = {
    mcpServer: 'https://email.mcp.atxp.ai/',
    tools: {
      checkInbox: 'email_check_inbox',
      getMessage: 'email_get_message',
      sendEmail: 'email_send_email'
    },
    description: 'ATXP Email MCP server',
    getResult: (result: any) => JSON.parse(result.content[0].text)
  };
2

Create an ATXP client

Create a client using an ATXP account.
import { atxpClient, ATXPAccount } from '@atxp/client';

const atxpConnectionString = process.env.ATXP_CONNECTION;

const client = await atxpClient({
  mcpServer: emailService.mcpServer,
  account: new ATXPAccount(atxpConnectionString),
});
3

Check your inbox

Call the inbox tool to see your messages.
const result = await client.callTool({
    name: emailService.tools.checkInbox,
    arguments: {},
});
const inbox = emailService.getResult(result);

console.log('Your email:', inbox.inboxAddress);
console.log('Messages:', inbox.messages);
4

Read a message

Get the full content of a specific message.
const result = await client.callTool({
    name: emailService.tools.getMessage,
    arguments: { messageId: 'msg_abc123' },
});
const email = emailService.getResult(result);

console.log('From:', email.message.from);
console.log('Subject:', email.message.subject);
console.log('Body:', email.message.text);
5

Send an email

Send an email to any recipient.
const result = await client.callTool({
    name: emailService.tools.sendEmail,
    arguments: {
      to: 'recipient@example.com',
      subject: 'Hello from my agent',
      body: 'This email was sent by an AI agent using ATXP!'
    },
});
const response = emailService.getResult(result);

if (response.status === 'success') {
  console.log('Email sent! Message ID:', response.messageId);
}
Your email will be sent from your unique ATXP email address.