“Using Corsair, every weekday at 7:30am New York time write me a briefing and save it as a Gmail draft to myself. Include today's meetings with who's attending, unread emails that need a reply today, and anything from people I'm meeting today. Keep it under 200 words.”
“Using Corsair, go through my unread Gmail from the last two days. For each email that needs a reply from me, write a short draft reply in the same thread and leave it in Drafts. Don't send anything. Then list which emails you drafted replies for.”
“Using Corsair, every weekday at 8am New York time look at today's meetings in my Google Calendar with people outside my company. For each one, find the contact and company in HubSpot, any open deals, and my last email thread with them in Gmail. Save one prep note per meeting as a Gmail draft to myself: who they are, where the deal stands, and what we last talked about.”
Tools are what your agent can do in Gmail through Corsair's MCP server. Triggers are the Gmail events a routine can start from.
Messages
ListRead-only
Search messages with structured fields (keywords, from, to, subject, after, before, hasAttachment, label, in, isUnread, ...) or a raw q; no Gmail syntax needed. Returns only id and threadId per message, no subject or body. Use messages.get to read one
messages.list
Batch ModifyWrite
Add or remove labels from multiple messages in bulk
messages.batchModify
GetRead-only
Read one message. Default format is full, with body text base64url-encoded in payload.body.data, or for multipart messages in payload.parts[].body.data (parts nest); use format metadata for headers only.
messages.get
Get AttachmentRead-only
Fetch an attachment of a message by partId (shown in messages.get with format full, or in a database search of messages fetched with format full) or attachmentId. Returns the file like Drive files.download: inline when small, otherwise saved by the host and returned as fileId
messages.getAttachment
ModifyWrite
Add or remove labels from a message
messages.modify
SendWrite
Send an email to one or more recipients
messages.send
TrashWrite
Move a message to the trash
messages.trash
UntrashWrite
Restore a message from the trash
messages.untrash
Threads
GetRead-only
Get every message in a thread. format works as in messages.get
threads.get
ListRead-only
Returns thread id and snippet only, no messages. Use threads.get for the messages
threads.list
ModifyWrite
Add or remove labels from a thread
threads.modify
TrashWrite
Move a thread to the trash
threads.trash
UntrashWrite
Restore a thread from the trash
threads.untrash
Drafts
CreateWrite
Create a new draft
drafts.create
DeleteDestructive
Delete a draft
drafts.delete
GetRead-only
Get a specific draft
drafts.get
ListRead-only
Returns only draft id and message id/threadId. Use drafts.get to read subject and body
drafts.list
SendWrite
Send a draft as an email
drafts.send
UpdateWrite
Update an existing draft
drafts.update
Labels
CreateWrite
Create a new label
labels.create
DeleteDestructive
Delete a label
labels.delete
GetRead-only
Get a specific label
labels.get
ListRead-only
List all labels in the mailbox
labels.list
UpdateWrite
Update an existing label
labels.update
Connect Gmail to Claude, ChatGPT or Cursor
1
Connect Gmail in Corsair
Sign in to Gmail once in Corsair. Corsair stores the credential encrypted and makes the Gmail API calls for your agent, so it never goes into a prompt or a config file. Connect Gmail
If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs Gmail. On a ChatGPT personal plan, connect Gmail here first.
2
Add Corsair's MCP server to your agent
Every client uses the same address:
https://mcp.corsair.dev/mcp
Open Plugins → Add → Add custom connector, name it Corsair, paste the address, select Continue, then Add.
Install Corsair from ChatGPT's plugin directory, connect it and sign in. A custom MCP server with the address works too, but personal plans get its read tools only.
Add to Cursor / Grok BuildOr add this to ~/.cursor/mcp.json. It opens Corsair to sign in the first time it connects.
Run this, then run /mcp in Claude Code to sign in.claude mcp add --transport http corsair https://mcp.corsair.dev/mcp
Codex, Antigravity, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client
3
Sign in and choose what needs your approval
Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, Gmail's read and write operations run right away and its 2 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.
Install corsair and @corsair-dev/gmail, add the Gmail plugin, and connect with OAuth. Then call methods like corsair.gmail.api.drafts.create() from your app. Corsair verifies webhooks, stores tokens, and syncs data per tenant.
Yes. Gmail needs an OAuth app with scopes that match what you automate. Register the app in Gmail, configure redirect URLs, then connect through Corsair or managed OAuth in Hub.
Yes. One Corsair client can hit Gmail, GitHub, Notion, Stripe, and the rest. Trigger Gmail from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.
Teams use Corsair for google email service for sending, reading, organizing messages, labels, and inbox automation. Common builds include sync jobs, admin tooling, and agents that call Gmail APIs from your backend. Webhook handlers react to Gmail events and fan out to Slack, email, or other plugins in the same tenant. Local DB entities let you query synced Gmail records without hitting the API on every read.
The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per Gmail API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.
We maintain @corsair-dev/gmail in the open repo. When Gmail ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.
No. Corsair does not read your Gmail data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store Gmail data on your behalf.
Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.
Yes. Put Gmail on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 2 destructive Gmail operations. You can change a link's mode at hub.corsair.dev/me.