Skip to content
Agent Identities / Connect Claude

Connect Claude

Connect Claude to your Agent Identity.

Give Claude a way to use your agent’s email, domains and phone number by signing in with your Mailrun account. No API key to copy, permissions you can see, and a Disconnect button when you’re done.

Request access

What the Mailrun connector does

The Mailrun Agent Identity connector lets Claude work through the identities on your Mailrun account: create and manage identities, set up domains, read and send email, create drafts, give an identity a phone number, place calls, and see usage and events. Claude does the asking; Mailrun does the sending, calling and record keeping.

It works in claude.ai on the web, the Claude desktop and mobile apps, and Claude Code. All of them connect the same way: you sign in to Mailrun once, see what Claude is asking for, and allow it. Nothing about your Mailrun account changes until you say so.

You need a Mailrun Agent Identities account. If you’re already using an API key with Claude, that keeps working; sign-in is the simpler option, and you can use either.

Connect from claude.ai or the Claude apps

Connecting takes about a minute:

  1. In Claude, open Settings, then Connectors.
  2. Choose Agent Identity by Mailrun from the directory. If it isn’t listed, choose Add custom connector and enter https://agent-api.mailrun.ai/mcp as the server URL.
  3. Click Connect. A Mailrun window opens.
  4. Sign in with your Mailrun customer account if you aren’t already.
  5. Read the list of what Claude will be able to do, then click Allow access. The window closes on its own and Claude shows the connector as connected.

Then just ask. “List my Mailrun agent identities.” “Create an identity called Sara.” “Send an email from Sara to me saying hello.” Claude uses the Mailrun tools the same way it uses any other connector.

Connect from Claude Code

  1. In a terminal, add the server with the command below.
  2. Start Claude Code and run the /mcp command, then choose Mailrun and sign in.
  3. Your browser opens the same Mailrun sign-in and permission page. Approve it and return to the terminal.

Claude Code signs in through a local callback on your computer, so the permission page tells you the app runs on your machine (localhost). That is expected for Claude Code. If you did not start a sign-in yourself, close the window.

claude mcp add --transport http mailrun https://agent-api.mailrun.ai/mcp
claude
> /mcp

What each permission means

The first time you connect, Claude asks only to read: your identities, email, domains, usage and events. When you ask it to do something that needs more — create an identity, send an email, add a domain, give an identity a phone — Claude asks you to allow that permission before it continues. You see exactly which one, and you can say no.

  • See your agent identities (agent:identities.read): list identities and their status.
  • Create and change agent identities (agent:identities.write): create, rename, release, attach or detach an email address, upload knowledge files.
  • See your domains (agent:domains.read): list domains and the nameservers Mailrun needs.
  • Add and change domains (agent:domains.write): add or remove a domain, set where its website redirects, manage TXT records.
  • Read email (agent:email.read): messages, threads, attachments and bounces for an identity.
  • Send email (agent:email.send): send a message or a draft.
  • Create drafts (agent:email.draft): create, edit and delete drafts without sending.
  • See phone numbers and calls (agent:phone.read): the identity’s number, call history and voicemail greeting.
  • Place and receive phone calls (agent:phone.voice): give an identity a number, release it, place calls, set its voicemail greeting.
  • See account events (agent:events.read): the account’s event log.
  • See webhooks and Create and change webhooks (agent:webhooks.read, agent:webhooks.write): list, create, change and delete webhooks and see their deliveries.
  • See usage and limits (agent:usage.read): current usage against your package allowances.

There is no permission that lets Claude manage your API keys, billing or account settings; those stay in the portal.

Claude still asks before it acts

Permissions are the outer limit. Inside them, Claude follows its own rules about confirming actions with you: tools that send mail, place calls, remove a domain or release an identity are marked as destructive, so Claude confirms them before running. Tools that only read run without a prompt.

Removing a domain, releasing an identity, detaching an email address and releasing a phone number take two steps on Mailrun’s side as well: Claude first receives a preview of what will happen and must confirm it. Nothing is removed on the first call.

Your account limits apply exactly as they do through the API: daily sending caps, package allowances, phone and voice limits. A connected Claude can’t exceed them.

See and disconnect connected apps

Open Agent Identity in the Mailrun portal. The Connected apps section lists every app connected by sign-in, with what it’s allowed to do and when it last used your account. Click Disconnect to revoke it. Revocation is immediate: the next thing Claude tries to do with that connection is refused, and Claude will offer to connect again.

Disconnecting doesn’t undo anything Claude already did; sent email stays sent. It also doesn’t touch API keys, which you manage separately on the same page.

A connection stays valid as long as Claude keeps using it. One that goes unused for 30 days expires on its own, and every connection is renewed by a fresh sign-in after 180 days at most.

Open Agent Identity in the portal

What Mailrun stores about the connection

When you connect, Mailrun records which app connected (claude.ai or Claude Code), which permissions you allowed, when you connected and when the connection was last used. Mailrun keeps a secret-free log of sign-in events, token renewals and disconnects for security review.

Sign-in tokens are stored only as one-way hashes, so they can’t be read back by anyone, including us. The one-time code and ticket used during sign-in never appear in a web address or a log. Mailrun never sees your Anthropic password, and Anthropic never sees your Mailrun password.

Everything Claude reads or sends through the connection — identities, email, calls — is the same data your account already holds, handled under the Mailrun Privacy Policy. What Claude keeps from those conversations is governed by Anthropic’s policies for your Claude plan.

Read the Mailrun Privacy Policy

If something doesn’t work

  • “That application is not allowed to connect to Mailrun”: the app that opened the sign-in isn’t one Mailrun recognises. Only Claude’s official apps and Claude Code can connect today. Start again from Claude.
  • “This sign-in was started in a different browser”: the sign-in has to finish in the same browser window Claude opened. Close the window and click Connect again. If a company policy blocks pop-ups or third-party cookies, allow them for app.mailrun.ai and agent-api.mailrun.ai.
  • “This sign-in request has expired”: each sign-in is valid for ten minutes. Click Connect again.
  • “Your account cannot connect new apps right now”: new connections need an active Mailrun account. Existing connections can still be denied or disconnected. Contact support to reactivate.
  • Claude says the tool needs more permission: approve the step-up prompt it shows. If it keeps asking, disconnect in the portal and connect again.
  • Claude says it couldn’t reach the server: check status with your own browser at https://agent-api.mailrun.ai/.well-known/oauth-authorization-server (it should show a short JSON document). If it does and Claude still can’t connect, contact support with the time and what you asked.

Support

Use the contact form and include the identity or request involved. For a failed tool call, Claude can tell you the request_id in the error; include it and we can find the exact call.

Rate limits: the connector shares your account’s API limits. If Claude reports a rate-limited error, it also says how long to wait; nothing is lost by waiting.

Contact Mailrun

LET’S BUILD SOMETHING USEFUL

Bring us your workflow.

Our team will confirm availability and arrange onboarding individually.

Request access
Connect Claude to your Agent Identity. · Mailrun.ai