Skip to content

Gmail MCP: an inbox that sorts itself every morning

Connect Whenever's MCP server to Claude Code, Cursor or Codex, describe what should happen in your inbox every day, and your agent builds, tests and deploys the workflow: a morning digest of what needs a reply, supplier invoices filed to Drive, follow-up drafts for threads that went quiet. The deployed workflow reaches Gmail through Whenever's managed Gmail connection and runs on a schedule, on a webhook or on demand, while your chat and your laptop are closed.

No credit card needed.

Connect Whenever to Claude Code

claude mcp add --transport http whenever https://mcp.whenever.dev

Using Cursor, Codex or another client? See the setup for every client.

The Gmail API works with the same objects you see in Gmail: messages, threads, labels and drafts. A workflow searches with Gmail's own query syntax, such as is:unread newer_than:1d or has:attachment filename:pdf from:billing@supplier.com, so a brief that names senders, labels and time windows turns directly into searches. Labels are the safest way to record what a workflow has done, because a message that already carries the label is skipped on the next run.

A workflow acts as the Google account that connected Gmail, with the access that account granted. It can read mail, add and remove labels, create drafts and send messages from that address. Drafting instead of sending keeps a person in the loop: the workflow writes the follow-up into the original thread and you press Send. Google applies daily sending limits to every account, which matter for anything that sends mail in bulk.

Sorting mail into Needs reply, FYI and Newsletters uses AI, and AI output can vary between runs. Keep the digest short, link each line to its thread, and leave anything the workflow is unsure about in the inbox rather than archiving it. Attachments can be large, so filing them to Drive by sender and month keeps the mailbox and the folder both searchable.

Gmail jobs to ask your agent for

Starter briefs to configure with your accounts, not preconfigured workflows.

Morning triage digest

Labels yesterday’s unread mail and sends you one digest, archiving nothing.

Build this workflow

File supplier invoices to Drive

Saves PDF attachments from known senders into a folder per month.

Build this workflow

Follow-up drafts for quiet threads

Writes drafts in the original thread; you decide what gets sent.

Build this workflow

Gmail workflow templates

Gmail MCP FAQs

Is Whenever the official Gmail MCP server?

No. Whenever is not affiliated with Gmail and is not its MCP server. Whenever's MCP server lets your coding agent build, test and deploy workflows. Each workflow reaches Gmail through Whenever's managed Gmail connection.

Does the Gmail workflow keep running after I close the chat?

Yes. Once deployed, it runs on Whenever on its schedule, webhook or when you start it. No chat open, laptop closed. Connection requirements, Gmail permissions and any AI usage still apply.

Will the workflow send email without me checking it?

Only if your brief asks it to. A workflow can create drafts instead, in the original thread, so you read and send each one yourself. The follow-up example above sends nothing.

How does it avoid handling the same message twice?

By labels. The workflow adds a label such as Triaged or Filed when it finishes with a message and searches only for messages without it, so the next run skips what is done.

More about Gmail on Whenever