Give Cursor its own email address
Add Mailly's Remote MCP server to Cursor so its agent can read your inbox, save reply drafts and send after you approve.
Cursor's agent 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 with OAuth.
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.
- Two layers of control: Cursor asks for approval before it uses MCP tools by default, and Mailly sends only text and recipients you have reviewed.
Get an inbox
Already have a Mailly account? Skip to the next step.
Paste this prompt into Cursor's agent. 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. Cursor 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
Create or edit ~/.cursor/mcp.json to use Mailly in every project, or .cursor/mcp.json in a project to use it there only:
{
"mcpServers": {
"mailly": {
"url": "https://mcp.mailly.site/mcp"
}
}
}Sign in and choose permissions
Cursor supports OAuth for remote servers. When it connects to Mailly, sign in on Mailly's page in your browser and choose what the agent may do:
| Permission | What Cursor 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. |
You can switch Mailly on or off from Customize in Cursor's sidebar.
Use an API key instead
Where OAuth isn't an option, send your Mailly API key as a header. Cursor resolves ${env:NAME} in headers:
{
"mcpServers": {
"mailly": {
"url": "https://mcp.mailly.site/mcp",
"headers": { "Authorization": "Bearer ${env: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 committed files. Find it under Integration in the workspace.
Verify the connection
- Check that Mailly is enabled under Customize and that its tools are listed as available in chat.
- Ask the agent: "Use Mailly to list my inbox addresses and my five most recent threads." It should call
mailly_list_inbox_addressesandmailly_list_threads. Click the arrow next to a tool name to see its arguments. - 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." The agent calls
mailly_read_threadandmailly_save_draft. Approve or discard the draft in the conversation.
Use the CLI instead
Cursor's agent can also drive mailly-cli in the terminal. Every command accepts --json.
npm install -g mailly-cli # Node.js 18+
mailly login # browser sign-in; --no-browser on remote machines
mailly inbox addresses list --json
mailly inbox threads list --jsonTroubleshooting
- Mailly doesn't connect: open the Output panel (Cmd+Shift+U on macOS), choose MCP Logs and look for initialization or authorization errors.
- Mailly tools don't appear in chat: disabled servers don't load. Turn Mailly on under Customize.
- A tool you expected is missing: it needs a permission you didn't grant. Sign in to Mailly again and grant the permission on the consent page. 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.
- A send is refused: check your balance and limits with
mailly_account. The Free plan allows 100 send recipients per rolling 24 hours; see pricing.