Give OpenClaw its own email address
Connect OpenClaw to a Mailly inbox over Remote MCP with OAuth, so your assistant can read mail, save reply drafts and send after your approval.
OpenClaw can work from a real inbox: search threads, read incoming mail, save reply drafts and send once you approve the final text. Mailly gives it an address such as your-name@mailly.site and connects over Remote MCP, saved under mcp.servers in your OpenClaw config.
What you get
- A two-way inbox on
@mailly.site, or on your own domain on the Developer plan. - About 70 typed MCP tools for threads, drafts, sending, domains, contacts, templates, campaigns and workflows, limited to the permissions you grant.
- Sending under your control: OpenClaw shows the exact text and recipients, and Mailly sends only after you confirm.
Get an inbox
Already have a Mailly account? Skip to the next step.
Send this prompt to your OpenClaw assistant. It reads Mailly's setup instructions, asks for the name you want, reserves it over HTTP and gives you a verification link.
Read https://mailly.site/auth.md
and set up a Mailly inbox for me over HTTP.
Ask me for the name if unknown; if taken, ask for another,
with no blind retries.
Send me the verification link.
After I confirm the inbox in my browser,
store the API key securely, tell me the address,
and ask me before sending any email.Open the link, sign in or register with your own verified email, and confirm the inbox. OpenClaw then receives the address and your account's API key. You can also start at mailly.site/onboard. See Let an agent set up an inbox for the rules.
Add the Mailly MCP server
openclaw mcp add mailly \
--url https://mcp.mailly.site/mcp \
--transport streamable-http \
--auth oauthSet the transport explicitly: when it's omitted, OpenClaw uses SSE. You can also add Mailly in the Control UI under Settings → MCP (Configured servers → Add server, transport Streamable HTTP), or save the definition as JSON:
openclaw mcp set mailly '{"url":"https://mcp.mailly.site/mcp","transport":"streamable-http","auth":"oauth"}'Sign in and choose permissions
openclaw mcp login maillyOpen the printed authorization URL and sign in to Mailly. OpenClaw normally captures the loopback redirect and saves the credentials. If your browser can't reach the callback listener, for example on a remote host, run the --code command OpenClaw prints. On Mailly's consent page, choose what OpenClaw may do:
| Permission | What OpenClaw can do |
|---|---|
mail:read | Read your inboxes, threads, sent mail, drafts and settings. Always granted. |
mail:draft | Save, edit and discard reply drafts. No sending. |
mail:send | Send replies, forwards and new emails you have reviewed. |
workspace:manage | Manage addresses, domains, templates, contacts, campaigns, workflows and webhooks. |
A Gateway that's already running may need a reload or restart before it picks up the new server. With Gateway hot reload enabled, the next turn uses it.
Use an API key instead
Where OAuth isn't an option, leave out auth and send your Mailly API key in a header that references an environment variable. OpenClaw ignores static Authorization headers while auth is oauth.
openclaw mcp set mailly '{"url":"https://mcp.mailly.site/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer ${MAILLY_API_KEY}"}}'An API key carries full account access; permission scopes don't apply to it. Keep it in an environment variable, never in chat or a literal config value. Find it under Integration in the workspace.
Verify the connection
- Run
openclaw mcp doctor mailly --probe. It validates the saved definition, opens a live connection and lists Mailly's tools.openclaw mcp status --verbosesummarizes what's saved without connecting. - Ask your assistant: "Use Mailly to list my inbox addresses and my five most recent threads." It should call
mailly_list_inbox_addressesandmailly_list_threads. - Send an email from your personal account to your Mailly address, then ask: "Read my latest Mailly thread and save a reply draft. Show me the exact text and don't send it." OpenClaw calls
mailly_read_threadandmailly_save_draft. Approve or discard the draft in the conversation.
To keep OpenClaw to reading and drafting, don't grant mail:send. You can also hide tools on the OpenClaw side, for example openclaw mcp tools mailly --exclude 'mailly_send_email,mailly_approve_draft,mailly_forward_message'.
Use the CLI instead
OpenClaw can also run mailly-cli through its shell tools. Every command accepts --json.
npm install -g mailly-cli # Node.js 18+
mailly login --no-browser # prints the sign-in URL
mailly inbox addresses list --json
mailly inbox threads list --jsonTroubleshooting
openclaw mcp statusreportsauthorization-required: runopenclaw mcp login maillyagain.- Sign-in is stuck or tokens were rotated: run
openclaw mcp logout mailly, thenopenclaw mcp login mailly. Logout keeps the saved server definition. - The probe fails to connect: check that
transportisstreamable-http. Without it, OpenClaw tries SSE. - A tool you expected is missing: it needs a permission you didn't grant, or an
openclaw mcp toolsfilter hides it. Log out, log in again and grant the permission. Mailly never widens an existing grant on its own. - No mail arrives: check the address in the workspace and look in the inbox's Spam folder.