AI access (MCP)

Search your email archive with Claude – local and read-only

MCP (Model Context Protocol) is an open standard that lets AI programs use tools. Mail Archive includes an email MCP server that gives them search and read access to your archive. You bring the language model: Claude, ChatGPT or a local model. AI access is off by default.

Available on the Mac from version 1.3. The Windows version with these features is coming soon to the Microsoft Store.

Off by defaultRead-onlyShared per accountIn Pro Plus and Business
AI access settings card with status, server URL and access token
Examples

What you can ask

“What did the contractor quote me for the garden shed in 2024?”

“Which phone bills did I get in 2025, and which was the highest?”

“Summarize my email thread with Ms. Miller.”

“When did I send the cancellation to my gym?”

“Who sends me the most emails?”

“Which e-invoices came in during Q1, and what is the total?”

Limits

What the AI can do and what it can't

The AI canThe AI cannot
Search emails (full text, sender, date range, account, folder)Delete, move or send emails
Read emails and threadsChange anything in the archive
List accounts and foldersAccess accounts you haven't shared
Read text from text attachments (txt, csv, xml, html)Read attachments if you turn that off
Find and analyze e-invoicesConnect from outside without your confirmation
Statistics (emails per year, account, sender)
Privacy

Where your emails go

Mail Archive itself sends nothing to us. But whatever the connected AI reads, it passes on to its language model. With cloud models such as Claude or ChatGPT, those emails therefore reach that provider. If you don't want that, use a local model, for example with LM Studio. Then nothing leaves your computer.

  • AI access is off by default. You turn it on in Settings.
  • You share accounts one by one. Email text and attachment text can be switched off separately.
  • Every new connection over the internet has to be confirmed in the app.
  • “Recent access” shows what was requested. You disconnect programs under “Connected clients” with “Remove”.
Step 0

Turn it on in Mail Archive

  1. Open Settings

    In Mail Archive, open Settings and go to the AI access (MCP) card.

  2. Enable the server

    Switch on “Enable MCP server” and confirm the notice. The status then shows “Running”.

  3. Choose what to share

    Under “Advanced” › “Shared” you decide which accounts the AI may see and whether email text and attachment text are included.

  4. Copy address and token

    The card shows the Server URL (http://127.0.0.1:8642/mcp) and the Access token. Copying the token gives you the complete header value Bearer …. Don't share the token. “Generate new token” invalidates the old one immediately.

  5. Remote access

    For ChatGPT and Claude (options A and B), switch on “Remote access” under “Advanced”. Without it, Mail Archive rejects requests that come through a tunnel.

Step 1

Start a tunnel with cloudflared

The ChatGPT and Claude desktop apps and Claude in the browser can't reach the local http address directly. A tunnel makes it available as an https address. Your archive stays on your computer.

  1. Install cloudflared

    Once: on a Mac brew install cloudflared, on Windows winget install --id Cloudflare.cloudflared.

  2. Start the tunnel

    Run cloudflared tunnel --url http://127.0.0.1:8642 in Terminal.

  3. Note the address

    cloudflared shows an address like https://xyz-abc.trycloudflare.com. Your MCP address is that address with /mcp at the end.

  4. Keep the window open

    The tunnel runs as long as Terminal does. The address changes on every start, so add the entry in ChatGPT or Claude again with the new address. For a fixed address, use Tailscale Funnel (option B).

Terminal running cloudflared and showing the trycloudflare address
Option A

ChatGPT (desktop app)

  1. Prepare

    Complete step 0 and step 1.

  2. Add the MCP server

    In the ChatGPT app, open the Plugins page, choose the MCPs tab and click Add › Add MCP server in the top right.

  3. Fill in the form

    Name mailarchive, type Streamable HTTP, URL: your cloudflared address with /mcp. Leave the bearer token environment variable empty. Under headers, add the key Authorization with the value Bearer … from Mail Archive.

  4. Save and ask

    mailarchive appears under servers with its switch on. Start a new chat and ask, for example, “How many emails are in my mail archive?”.

ChatGPT is a cloud model. Whatever it reads from your archive goes to OpenAI.

Option B

Claude in the browser, on desktop and on your phone

A connector in Claude works in all Claude apps. Your computer and Mail Archive have to be running. We don't run a server of our own in between.

  1. Prepare

    Complete step 0 and step 1. Instead of cloudflared you can use Tailscale Funnel with a fixed address: install Tailscale, sign in and run tailscale funnel 8642 (permanently: tailscale funnel --bg 8642). The address is then https://<computer-name>.<tailnet>.ts.net/mcp.

  2. Add a connector

    In Claude, go to Settings › Connectors and click “Add custom connector”. Name mailarchive, URL: the tunnel address with /mcp at the end. Leave authentication on sign-in with an automatically registered OAuth client. Don't add a request header; the token isn't needed here.

  3. Compare the codes

    A Mail Archive page with a 6-digit code opens in your browser. At the same time, Mail Archive on your computer asks “Allow access?”. If both codes match, click Allow.

  4. Done

    Claude reports that it is connected to mailarchive. The connector is then also available in the Claude desktop app and on your phone. You can disconnect it at any time under “Connected clients” with “Remove”.

“Allow access?” dialog in Mail Archive with a 6-digit code
Option D

Claude Code, Cursor, LM Studio: directly on your computer

Programs that talk to local MCP servers directly don't need a tunnel. They connect to http://127.0.0.1:8642/mcp with the header from step 0. “Remote access” isn't needed for this.

  • Claude Code (Terminal): claude mcp add --transport http mailarchive http://127.0.0.1:8642/mcp --header "Authorization: Bearer <token>". This applies to Claude Code only, not to the Claude desktop app.
  • Cursor, LM Studio: add the entry "mailarchive": {"url": "http://127.0.0.1:8642/mcp", "headers": {"Authorization": "Bearer <token>"}} to their mcp.json.

Maximum privacy: With LM Studio and a local model, everything stays on your computer, including the AI's answers.

Troubleshooting

If something doesn't work

“Remote access is disabled” or error 403

“Remote access” is off in Mail Archive. Turn it on under AI access › Advanced.

The connector stopped connecting

With cloudflared and no account, the tunnel address has changed. Add the connector again with the new address, or use Tailscale Funnel with a fixed address.

No answer or a timeout

The computer is asleep, Mail Archive is closed or the tunnel was stopped.

“Port 8642 is in use”

Enter a different port in the card. Then change it in the tunnel command and in your AI programs' settings as well.

The AI finds nothing

Check under “Shared” that the account is shared. Ask with simple keywords, for example a company name and a year.

FAQ

Questions about AI access

Does Mail Archive need AI?

No. Mail Archive works without AI. If you like, you connect your own AI program; you bring the language model yourself.

Can the AI delete my emails?

No. Access is read-only. Deleting, moving, sending or changing anything isn't possible over MCP.

Do my emails go to Mail Archive?

No. We receive nothing. Whatever the AI reads goes to the language model you connect. With a local model, everything stays on your computer.

Does it work with ChatGPT?

Yes, tested with the ChatGPT desktop app through a tunnel. The guide is above under option A.

Does Mail Archive have to be running?

Yes. The MCP server runs inside the app, and the computer must not be asleep.

How much does AI access cost?

It is included in Pro Plus and Business, both one-time purchases with no subscription. The AI itself is subject to its provider's terms.

Ask your own archive

Get Mail Archive for free. AI access is included in Pro Plus and Business.