Claude Code + email

Connect your inbox to Claude Code
with one command

Give the CLI you already live in a real mailbox. Triage overnight mail before standup, mail a release note, or turn a thread into an issue, without leaving the terminal.

Run claude mcp add --transport http mcpemails https://mcpemails.com/api/mcp, then authenticate in the browser when Claude Code prompts you. That is the whole setup: no API key, no config file to hand-edit.

1 inbox free, forever OAuth in the terminal, no API key Email fetched live, never stored

How Claude Code connects: OAuth, no API key

Claude Code runs the standard MCP OAuth flow against this server. It registers itself with RFC 7591 dynamic client registration, so there is no client ID to create, and authorizes with authorization code plus PKCE using S256. No client secret is ever transmitted, and the token carries only the scopes you approve on our consent screen. The access token it receives lasts an hour and refreshes itself; it is listed in Dashboard, API Keys as OAuth: followed by the client name, which is where you revoke the connection.

The one value you need

Everything on this page is a way of getting this URL into Claude Code.

FieldValue
MCP server URLhttps://mcpemails.com/api/mcp
TransportStreamable HTTP (MCP 2025-06-18)
AuthenticationOAuth 2.1, authorization code with PKCE. No API key.
Setup

How to connect Claude Code to your inbox

Four steps. The first two are the same for every client, the rest are specific to this one.

01

Create a free account and connect a mailbox

Sign up at mcpemails.com, no card required, then go to Dashboard, Inboxes, Connect Inbox. Gmail connects with one-click Google sign-in; iCloud, Fastmail, Yahoo, Zoho and Yandex take an app-specific password; anything else connects over plain IMAP and SMTP. The free plan holds one inbox, forever.

02

Add the server

Run the command below. --transport http is the Streamable HTTP transport, which is what this server speaks.

03

Authenticate

Run /mcp inside a Claude Code session, pick this server and follow the browser flow. If the browser does not open by itself, copy the URL it prints.

04

Ask for something

Try "summarise anything unread from today". Claude Code calls inbox_list first to discover your mailboxes, so there are no ids to paste.

terminal
claude mcp add --transport http mcpemails https://mcpemails.com/api/mcp
Before you start

What trips people up in Claude Code

Claude Code defers MCP tool definitions, which is a feature here

By default Claude Code loads only tool names and the server instructions at session start, then fetches a full schema when it needs one. The practical effect is that adding this server costs a fraction of the context a naive MCP server would, and that a tool you never use never costs you its schema.

Scope the connection to what the session is for

The OAuth consent screen decides what the CLI can do for the life of the token. A coding session that should read mail but never send it is a token without send:email. If you later want more, reconnect and approve the wider set; nothing escalates on its own.

An agent loop and a send scope are a combination worth thinking about

Claude Code runs unattended for long stretches, which is exactly when an accidental send hurts most. Two switches exist for that: leave send:email off the token, or turn on human approval in the dashboard so every send, reply, forward and scheduled send waits for a person. Approval is per inbox and applies whatever client made the call.

Limits worth knowing

  • Requests are rate limited to 100 per minute, 1,000 per hour and 10,000 per day per key, plus your plan ceiling on billable actions.
  • The server is request and response only. There are no webhooks and no server-initiated events, so new mail never wakes your agent by itself. To react to arriving mail, poll on a schedule.
  • Mail is fetched live from your provider on every call and never stored. Only the encrypted OAuth token or app password is kept, so a revoked token or a changed mailbox password ends access immediately.
  • The OAuth flow needs a browser once. On a headless box, add the server with an API key in an Authorization header instead and skip the flow entirely. If you do want OAuth there, --callback-port pins the callback to a port you can forward.
FAQ

Claude Code and email, answered

How do I connect email to Claude Code?

Add this MCP server by URL: claude mcp add --transport http mcpemails https://mcpemails.com/api/mcp. Then run /mcp in a session and complete the browser sign-in. Claude Code then has tools for reading, searching, sending, replying, forwarding, organizing and scheduling mail.

Can I use an API key instead of OAuth?

Yes. Claude Code accepts a header on the add command, so passing an Authorization header with a bearer key from Dashboard, API Keys skips the browser entirely. That is the right choice on a headless machine or in CI, where there is nowhere to complete a sign-in.

Does it work in a devcontainer or over SSH?

Yes, with the caveat that the OAuth flow wants a browser once. Either complete the login where a browser exists, or add the server with a bearer API key header and skip the flow. Everything after that is plain HTTPS to one endpoint.

Which mailboxes can Claude Code reach this way?

Gmail over Google sign-in, iCloud, Fastmail, Yahoo, Zoho and Yandex with an app-specific password, and any other mailbox that speaks IMAP and SMTP on the standard ports. The client sees them all through the same connection: your agent calls inbox_list first to discover every connected mailbox and its id, so there are no UUIDs to paste anywhere.

Can Claude Code send email without me seeing it?

Only if you let it. Sending is gated on the send:email scope, so a key or a token without that scope cannot send at all. On top of that, an inbox owner can require human approval in the dashboard, which holds every send, reply, forward, draft send and scheduled send until a person releases it.

Is my email stored on your servers?

No. Every message is fetched live from your provider for the request that asked for it and handed straight to your client. Only the encrypted OAuth token or app password is kept, so future calls can authenticate. Deleting the inbox in the dashboard, or revoking access at your provider, ends the connection at once.

Put your inbox in the terminal

One command, one browser sign-in. One inbox free forever, no card required.