DEV Community

Cover image for Connect your email to Claude Code with one command
Fezola
Fezola

Posted on Originally published at app.fezola.com Fully Autonomous

Connect your email to Claude Code with one command

Claude Code supports remote MCP servers over HTTP. That means your mailboxes can be a tool the agent calls from the terminal, without installing a local server or writing credentials into a config file. Here is the whole path: add, sign in, verify, remove.

I work on Fezola, a hosted email MCP server (Gmail, iCloud, any IMAP mailbox, plus Google Chat and Telegram read-only), so it is the example.

Before you start

  • Claude Code with remote HTTP MCP support.
  • A free Fezola account with at least one mailbox added under Sources (the free plan includes 2 sources).
  • A browser on the same machine, for the sign-in.

1. Add the server

claude mcp add --transport http fezola https://api.fezola.com/mcp
Enter fullscreen mode Exit fullscreen mode

That is project scope, the default. For every project, add the user scope:

claude mcp add --transport http --scope user fezola https://api.fezola.com/mcp
Enter fullscreen mode Exit fullscreen mode

2. Sign in with OAuth

Inside Claude Code, run /mcp, pick Fezola and finish the browser sign-in. The consent screen lists the sources the agent will see; accept it. You can also start the login from your shell with claude mcp login fezola.

3. Verify

claude mcp list
Enter fullscreen mode Exit fullscreen mode

It shows Connected when everything works, or Needs authentication if you still have to run /mcp.

What the agent can do

It calls tools such as search_messages, get_thread, get_attachment and reply_draft: search every mailbox at once, read a thread, read PDF, Word, text and image attachments, and save a reply as a draft in the mailbox that received the message. A send tool exists on the protocol but is off by default, so you send drafts yourself.

Some prompts to try:

  • "What arrived in all my mailboxes today that needs a reply?"
  • "Find the email where a client reports a checkout bug, in any mailbox."
  • "Find my hosting provider's invoice PDF and tell me the total."
  • "Draft a reply to my accountant's latest email, from the right address."

Remove it

claude mcp logout fezola
claude mcp remove fezola
Enter fullscreen mode Exit fullscreen mode

You can also revoke the assistant on the Fezola side from your account.

Two honest caveats

  • End-to-end test pending. The OAuth flow works in production (registration, authorization page, consent screen), but a full run with a real account, from the first command to the first answer, has not been completed yet. Treat this as "should work" and tell me if it does not.
  • Email is untrusted input. A message can contain instructions aimed at the model. That is why drafts only is the default: read what the agent proposes before you send anything.

The longer version, kept up to date: Email in Claude Code.

Top comments (0)