Skip to main content

BTC.email / Connect · Claude Code · Codex

Your inbox, in your agent.

Bitcoin and email in the tools you already use. Connect Claude Code, Codex, or another MCP client with a browser sign-in, choose what it can do, and revoke it any time.

On this page

How it works

  1. Add the BTC.email server address to your client. This grants nothing.
  2. Sign in to BTC.email in your browser when the client asks, as you do for any website.
  3. Choose the permissions and mailboxes, set an expiry, and approve with your password.
  4. Ask your agent to work. Sending, scheduling, and discarding wait for your approval in Settings, and wallet actions finish only in the web app.

You need an approved BTC.email account and a client that supports MCP over HTTP. BTC.email adds no AI model; your client brings its own.

Server address

One address is all a client needs to find BTC.email.

MCP server address

https://btc.email/api/mcp

Claude Code

  1. Add the server. This only saves the address and the sign-in client; it grants nothing.
  2. Start claude, run /mcp, choose btc-email, and authenticate. From a shell, claude mcp login btc-email does the same.
  3. Your browser opens BTC.email. Sign in if asked, choose the permissions and mailboxes, and approve with your password.

Add the server

claude mcp add --transport http --client-id claude-code --callback-port 8765 btc-email https://btc.email/api/mcp

Add --scope user to use it in every project; the default keeps it in the current project. The callback port 8765 must be free on your machine.

Optional: request read access up front

claude mcp add-json btc-email '{"type":"http","url":"https://btc.email/api/mcp","oauth":{"clientId":"claude-code","callbackPort":8765,"scopes":"mail.read offline_access"}}'

Codex

  1. Add this to ~/.codex/config.toml, or to .codex/config.toml in a trusted project. BTC.email never edits your configuration.
  2. Run codex mcp login btc-email. Your browser opens BTC.email.
  3. Sign in if asked, choose the permissions and mailboxes, and approve with your password.

config.toml

mcp_oauth_callback_port = 8766

[mcp_servers.btc-email]
url = "https://btc.email/api/mcp"

[mcp_servers.btc-email.oauth]
client_id = "codex"
callback_url = "http://127.0.0.1:8766/callback"

Keep the callback exactly http://127.0.0.1:8766/callback; another port or a suffix is refused.

Optional: request read access for one login

codex mcp login btc-email --scopes mail.read

Other clients and remote machines

Any connection uses the same address, https://btc.email/api/mcp, and browser sign-in with PKCE. BTC.email registers its sign-in clients itself: dynamic registration is off, and only the clients above are accepted today. A custom script or another MCP client cannot sign in until it is added, and no shared key or token can be created by hand.

On a remote or headless machine the sign-in still needs a browser. Claude Code can print the sign-in link instead of opening one: run claude mcp login btc-email --no-browser, open the link on your own computer, then paste the final address back. Codex needs a browser that can reach 127.0.0.1:8766 on the machine it runs on, for example through an SSH port forward.

Permissions and approvals

The approval page lists every permission a client asks for and starts with only the read-only ones selected. Start with mail.read, then add one permission at a time. Reading, drafting, organizing, and sending are separate permissions.

Sending, scheduling, and discarding a draft always wait for your approval under Send approvals, bound to the exact message. A client cannot approve for you. Wallet transfers, purchases, address changes, and security changes finish only in the web app.

You choose the mailboxes, an expiry of one day at most or about one hour, and whether the client may keep access after your browser session ends. Access still follows your account status and each feature’s own limits.

First prompts

Start read-only. Each prompt names the permission it needs, so the approval you grant matches what you ask.

  • Read only

    Grant mail.read

    Using btc-email, list my 5 most recent mail threads (subject and sender only). Do not change anything.

    Run this first. It changes nothing.

  • Create a draft

    Grant mail.drafts.write

    Using btc-email, create a draft to myself with the subject "Agent test" and the body "hello". Do not send it.

    Open BTC.email to see the saved draft.

  • Send with approval

    Grant mail.drafts.read, mail.send

    Using btc-email, send the "Agent test" draft.

    The send waits for your approval under Settings > Connections > Send approvals. Nothing sends before you approve.

Rotate or revoke access

Rotate. A connection cannot be extended in place. To rotate, revoke it, run the login again in the client, and approve a new connection with a fresh label and expiry. Use a label you will recognize, such as the device name.

Revoke. Review a connection below and revoke it, or revoke all of them. Revocation stops future access; the client gets an authentication error on its next request. It cannot undo what a client already read or did, or erase what it stored on its own machine.

Clean up the client. Revoking here is what ends access. Then clear the client’s saved sign-in: claude mcp logout btc-email in Claude Code, which clears local tokens only, or claude mcp remove btc-email to remove the server. In Codex, delete the [mcp_servers.btc-email] block from config.toml.

If you suspect a leak. Revoke all connections first. Then review Devices in Settings for sign-ins you do not recognize and change your password.

Troubleshooting

  • The browser shows a redirect or port error. The callback port must be free and exact: 8765 for Claude Code and 8766 for Codex.
  • You cannot approve. New connections need a fresh password check, so an account that signs in only with Lightning cannot approve one yet.
  • A tool is missing or refused. The connection lacks that permission. Revoke it and connect again with the permission added.
  • The client says it is unauthorized. The connection expired or was revoked. Run the login again.
  • A send does nothing. It is waiting for you under Settings > Connections > Send approvals.
  • Check what the client saved. claude mcp get btc-email shows the Claude Code entry.

Still stuck? Read the Support questions or write to support@btc.email. Never send a password or sign-in code.

Questions

The basics

What is MCP, and what can an agent do with my mailbox?

MCP is a standard way for an AI tool to use another service. A connected client can use only the permissions you approve: find and read mail, read and write drafts, organize conversations, and read your mailbox settings. Anything you do not grant stays closed.

Which clients can I use?

Claude Code and Codex have setup steps, and BTC.email registers a sign-in client for each. Another MCP client cannot sign in until it is added, because clients cannot register themselves. A client’s pricing, availability, and data terms belong to its maker.

Do I need an AI account?

You need whatever the client you connect needs. BTC.email adds no AI model and provides no key. Connecting only lets that client use your mailbox with the permissions you choose.

Is adding the server the same as giving access?

No. Adding the address only tells your client where BTC.email is. Access begins when you sign in to BTC.email in your browser, choose permissions and mailboxes, and approve with your password. BTC.email never edits your client’s configuration.

Which addresses and aliases can a client use?

You choose the mailboxes when you approve. Include your main address: a connection for an alias alone is not supported yet. Sending follows the same rules as the web app.

Permissions and approvals

Can an agent send or delete anything without asking me?

No. Sending, scheduling, and discarding a draft, deleting a label, bulk changes to conversations, and edits such as mail filters, sender rules, and Community posts wait for your approval in Settings. Each approval names the exact items, so a draft changed after the request cannot be approved, and a request you ignore expires and does nothing. A discarded draft cannot be undone, which is why each discard needs you. Moving mail to Trash works as in the browser; nothing is permanently deleted.

Can an agent move my bitcoin or buy a name?

No. Wallet actions, payments, marketplace purchases and listings, address changes, and password and security changes finish only in the web app, with your own password or wallet signature. A client never holds those proofs, and it cannot approve its own requests.

What can’t a connected agent do?

It cannot create sender access codes, upload attachments to outgoing mail, export or delete your account, or approve anything for you. Reading attachments is a separate permission. Features that are off or paused for your account answer as unavailable.

How do I choose permissions?

The approval page lists every permission in plain words and starts with only the read-only ones selected. Reading, drafting, organizing, and sending are separate. Start with read access, then add one permission at a time.

Can an agent change who is allowed to email me?

Only with your approval. Sender allow, block, and expected-sender changes appear in Settings for you to approve, and a payment never admits a sender on its own.

Security and control

How is a connection kept safe?

You sign in to BTC.email in your browser, so your client never sees your password. Approving needs a fresh password check, covers only the permissions and mailboxes you choose, and expires within a day at most. There is no shared key, and a token cannot be created by hand.

Who sees my mail when a client reads it?

BTC.email hosts your messages, and they are not end-to-end encrypted. Once a client reads a message, that client and its model provider handle it under their own terms, which BTC.email does not control. Grant the narrowest permission that does the job. The Privacy Policy and Sub-Processors describe BTC.email’s own handling.

How do I revoke access, and what does that not undo?

Open Settings, then Connections, review a connection, and revoke it, or revoke all of them. The client’s next request fails. Revoking cannot undo what a client already read or did, or erase what it saved on its own machine. Then sign the client out or remove its entry. If you suspect a leak, revoke all first.

What happens when a connection expires or I reconnect?

The client gets an authentication error. Run its login again and approve a new connection. Rotating works the same way: revoke the old connection, connect again, and use a label you will recognize.

Limits

Are there limits on what a client can do?

Yes. Connected clients share request limits, so a busy agent may be told to wait, and sending follows the same sender, recipient, and send limits as the web app. Large files do not fit the connection yet.

Does this add IMAP or support for other mail apps?

No. Agent access is separate from IMAP, POP, JMAP, and native mail apps, which BTC.email does not offer. There is no mobile app, and the Claude Code and Codex sign-in is the supported path; no command-line tool exists.