Give OpenClaw a Shipmail mailbox
OpenClaw is an open-source personal agent that runs on your own machine and answers you in chat apps. It supports MCP servers natively, so you can add Shipmail with one command. It then works in a mailbox on your own domain. It drafts and sends, and you see every message in Shipmail.
Last updated
What you get
- Shipmail tools in OpenClaw, such as
shipmail_list_mailbox_inbox_messages,shipmail_get_mailbox_inbox_thread,shipmail_create_inbox_reply_draftandshipmail_send_message. - A mailbox you share with the agent. You can open a conversation, read its draft and send it, or answer yourself.
Create the mailbox and a scoped key
You need a Shipmail account with your domain added. Unlike a Gmail account made for a bot, a Shipmail mailbox is a paid business mailbox on your own domain, and giving it to an agent is what it is for. The address stays yours if you change agents later.
Create a mailbox for the agent
Under Mailboxes, create an address like
agent@yourdomain.com. You and your team can open it in Shipmail or any mail client and see every message OpenClaw reads, drafts or sends.Create an API key
Open Developer, then API keys, and create a key. Pick the Draft only preset. It grants
mailboxes:read,messages:read,messages:write,drafts:write,drafts:compose,threads:readandsuppressions:read, and nomessages:send.Limit the key to that mailbox
Choose specific resources and add only the agent's mailbox. The key then cannot read or write any other mailbox in your organization.
The key starts with sm_live_ and is shown once. The MCP server only lists the tools the key's scopes allow, so a Draft only key has no send tool at all. When the drafts are good, edit the key and switch to the Full agent preset, which adds messages:send and members:read. Scope details are on API authentication.
Add Shipmail to OpenClaw
OpenClaw stores MCP servers under mcp.servers in ~/.openclaw/openclaw.json. Headers are set with openclaw mcp set, which writes the whole entry:
openclaw mcp set shipmail '{
"url": "https://shipmail.to/api/mcp",
"transport": "streamable-http",
"headers": { "Authorization": "Bearer sm_live_..." }
}'Ask before every Shipmail tool call, then check that the server answers:
openclaw mcp configure shipmail --approval prompt
openclaw mcp doctor shipmail --probeRun openclaw mcp reload if OpenClaw was already running. The resulting entry in openclaw.json looks like this:
{
mcp: {
servers: {
shipmail: {
url: "https://shipmail.to/api/mcp",
transport: "streamable-http",
headers: { Authorization: "Bearer sm_live_..." },
},
},
},
}Run the server locally instead
OpenClaw can also start the stdio server. Its environment filter allows variables named like SHIPMAIL_API_KEY.
{
mcp: {
servers: {
shipmail: {
command: "npx",
args: ["-y", "shipmail-mcp"],
env: { SHIPMAIL_API_KEY: "sm_live_..." },
},
},
},
}First test
- "What came in at agent@yourdomain.com today that needs a reply?"
- "Reply to the email from jane@customer.com and thank her for the order. Leave it as a draft."
Stay safe
- Keep
--approval prompton and the Draft only preset on the key until you trust the drafts. - Treat email as untrusted input. OpenClaw can act on your computer and accounts, and an email can contain text written to look like an instruction. Do not let it act on mail from senders you do not know.
- Revoke the key under Developer, then API keys, to cut access at once.
More on MCP permissions and security.
Troubleshooting
- Run
openclaw mcp status --verboseto see each server and its last error. - The header is ignored: OpenClaw drops static
Authorizationheaders whileauth: "oauth"is set on the same server. Remove that line to use the key. - A tool is missing: the key does not grant its scope. Edit the key in Shipmail.
Next steps
Frequently asked questions
Should I use an MCP server or a skill for OpenClaw?
Use the MCP server. OpenClaw supports MCP servers natively under mcp.servers, and the Shipmail server already describes every tool. A skill would only repeat that.
Can OpenClaw send email from my WhatsApp or Telegram chat?
Yes. When you message OpenClaw through a chat app, it can call the same Shipmail tools. With a Draft only key it can only leave drafts, and you send them.
Why does openclaw mcp doctor warn about my key?
It warns when a secret is written as a literal value in the config. Keep the file private, or move the key to one of the secret mechanisms OpenClaw documents.
Can my team see what OpenClaw sent?
Yes. OpenClaw works in a normal Shipmail mailbox. Anyone with access to it sees every message, draft and reply in the Shipmail app or a mail client.