---
title: "Gmail MCP server for AI agents - actionlake"
description: "Give Claude 79 Gmail actions through one MCP server: messages, users, threads, drafts. Your agent never holds the credential. 100,000 calls a month free."
canonical: https://actionlake.com/connectors/gmail
updated: 2026-10-11
---

Connectors · Email & messaging

# Gmail MCP server for AI agents.

actionlake is an MCP gateway: one remote MCP server that connects Claude and other MCP clients to Gmail and the rest of your systems. It gives your agent 79 Gmail actions (30 reads, 33 writes and 16 that wait for a confirmation) and holds the Gmail credential itself, so the agent never does. It paces Gmail's limits and records every call. Connecting Gmail needs your own Gmail OAuth app and one admin sign-in.

[Connect Gmail free](https://actionlake.com/console?start=sandbox) [See pricing](https://actionlake.com/pricing)

100,000 free calls a month. No card, no email, no password: press Start a free sandbox on the next screen and keep the key it shows you.

`claude mcp add --transport http actionlake https://connect.actionlake.com/mcp`

the first call

```
do {
  action: "gws_gmail.messages.list",
  intent: "check which Gmail account is connected"
}
# List Gmail messages · read · 1 upstream call
```

- 79 actions in one signed file
- 30 read look, never change
- 33 write create and update
- 16 wait for a yes destructive, confirmed first

Set up

## Connect Gmail in three steps.

1. 01
   ### Add actionlake to Claude.
   Run the command once in Claude Code; its consent page can create a free sandbox: 100,000 calls a month, no card. In the Claude app, add a custom connector with the URL below and paste your key on the consent page. Creating a new sandbox from the Claude app is not yet tested by us.
   `https://connect.actionlake.com/mcp`
2. 02
   ### Connect Gmail.
   OAuth 2.0, authorization code with PKCE. You register your own OAuth app with Gmail, an admin signs in once, and you paste the app's client id and secret and the tokens from that sign-in; actionlake renews the access token from then on. actionlake stores what you paste write-only, sealed under your tenant's key.
   Before the first sign-in, Gmail needs an OAuth app of your own, registered in its developer portal. actionlake has no Gmail app to lend you.
   - `access_token` Access token from one sign-in with your own OAuth app
   - `refresh_token` Refresh token from the same sign-in; the access token is renewed from it
   - `client_id` Google OAuth client id
   - `client_secret` Google OAuth client secret
   ```
   account { op: "connections.requirements", service: "gws_gmail" }
   # free: exactly what to paste, and what is found for you
   ```
3. 03
   ### Make the first call. Check before a write.
   Ask in plain words; Claude picks the action. Before anything changes, `check` validates the call and prices it, for free.
   ```
   do    { action: "gws_gmail.messages.list" }
   # list gmail messages · read · 1 upstream call
   check { action: "gws_gmail.messages.send", input: { … } }
   # free: inputs, permissions, cost and confirmations, nothing sent
   ```

Gmail at a glance

**Sign-in**

OAuth 2.0, authorization code with PKCE. You register your own OAuth app with Gmail, an admin signs in once, and you paste the app's client id and secret and the tokens from that sign-in; actionlake renews the access token from then on.

**You provide**

`access_token` `refresh_token` `client_id` `client_secret`

**Limits we pace to**

6,000 calls a minute, per connection

**API covered**

Gmail API 1`gmail.googleapis.com/gmail/v1`

**Built from**

Gmail's documentation, read 8 September 2026[developers.google.com](https://developers.google.com/workspace/gmail/api/reference/rest)

**Service file**

Version 1.0.0, signed (Ed25519)

**Cached reads**

28 of 30 reads, for up to an hour; a write clears what it affects

**Ready-made plans**

6 in the store

**Shared entities**

4, so ask can line Gmail up with your other systems

**Data**

Processed and stored in Sydney, Australia. No US region yet

Capabilities

## What an AI agent can do in Gmail.

79 actions in 1 area. Every one carries its effect, so a key can allow the reads and hold the rest.

- **30** read look, never change
- **33** write create and update
- **16** destructive wait for a confirmation

1. ### Email
   79
   30 read · 33 write · 16 destructive
   Get one Gmail message · Get a Gmail profile · Send a Gmail message · List Gmail messages

Top actions

## The Gmail API, shaped for agents.

The ids your agent types, what each does, and the one name it shares with other systems. 54 of Gmail's 59 action names are shared with at least one other connector, so an agent learns them once.

| Action | What it does | Effect | Same name in |
| --- | --- | --- | --- |
| `gws_gmail.messages.get` Get one Gmail message | Fetch a single message with its headers and body. | read | `comm.email.get` 26 connectors |
| `gws_gmail.users.get_profile` Get a Gmail profile | Fetch the mailbox's email address, message and thread totals, and current history id. | read | `comm.mailbox.get` 13 connectors |
| `gws_gmail.messages.send` Send a Gmail message | Send an email composed as a base64url-encoded RFC 2822 message. | write | `comm.email.send` 32 connectors |
| `gws_gmail.threads.get` Get one Gmail thread | Fetch a whole conversation with every message in it. | read | `comm.email_thread.get` 7 connectors |
| `gws_gmail.threads.list` List Gmail threads | List conversation thread ids matching a Gmail search query. | read | `comm.email_thread.list` 7 connectors |
| `gws_gmail.message_attachments.get` Get a Gmail message attachment | Download one attachment's bytes by its attachment id. | read | `comm.email_attachment.get` 5 connectors |
| `gws_gmail.messages.delete` Permanently delete a Gmail message | Permanently and irreversibly delete one message. | destructive | `comm.email.delete` 15 connectors |
| `gws_gmail.drafts.create` Create a Gmail draft | Save a new unsent draft from a base64url RFC 2822 message. | write | `comm.email_draft.create` 5 connectors |
| `gws_gmail.labels.list` List Gmail labels | List every label in a mailbox, system and user-created. | read | `comm.email_folder.list` 4 connectors |
| `gws_gmail.labels.create` Create a Gmail label | Create a new user label, optionally nested and coloured. | write | `comm.email_folder.create` 4 connectors |
| `gws_gmail.drafts.send` Send a Gmail draft | Send an existing draft and remove it from the drafts list. | write | `comm.email_draft.send` 3 connectors |
| `gws_gmail.filters.create` Create a Gmail filter | Create a server-side rule that labels, archives or forwards matching mail. | write | `comm.mailbox_rule.create` 5 connectors |

Try it

## Prompts to paste into Claude.

Each one names the Gmail actions it will call, so you know what it reads and what it changes before you send it.

1. Read read
   List Gmail messages and tell me what stands out.
   calls `gws_gmail.messages.list`
2. Plan destructive
   Revoke a delegate and the forwarding that follows them in Gmail. Ask me before anything is sent or changed.
   calls `gws_gmail.delegates.get` `gws_gmail.settings.get_auto_forwarding` `gws_gmail.settings.update_auto_forwarding` `gws_gmail.forwarding_addresses.delete` `gws_gmail.delegates.delete` +1 more
3. Plan write
   Draft a reply, hold it for review, then send in Gmail. Ask me before anything is sent or changed.
   calls `gws_gmail.threads.get` `gws_gmail.drafts.create` `gws_gmail.drafts.get` `gws_gmail.drafts.send` `gws_gmail.threads.modify`
4. Write write
   Send a Gmail message in Gmail. Show me exactly what you will send before you save it.
   calls `gws_gmail.messages.send`

The plan store

## Ready-made plans for Gmail.

6 plans in the store. Install one and your agent runs it by name; the reply says which connections are still missing. A schedule can run a plan on a timetable. There are no triggers or webhooks, by design.

1. ### File a sender's mail under a new label from now on
   Use it when An agent should make all mail from one sender file itself under a label, past and future.
   **Effect**
   write
   **Steps**
   5
   **Needs**
   label name and sender
   **Install**
   `gws_gmail-filter-sender-to-new-label`
2. ### Triage unread inbox mail onto a label
   Use it when An agent needs to sort a run of incoming mail onto a triage label without deleting anything.
   **Effect**
   write
   **Steps**
   5 · loops
   **Needs**
   label id, mark read and query
   **Install**
   `gws_gmail-triage-inbox-to-label`
3. ### Turn on a vacation auto-reply for a date window
   Use it when Someone is going away and wants an out-of-office reply switched on for a fixed window.
   A person decides Auto-reply from _emailAddress_ to every sender between _start time_ and _end time_ with subject '_subject_'.
   **Effect**
   write
   **Steps**
   5
   **Needs**
   body, end time, start time and subject
   **Install**
   `gws_gmail-vacation-autoreply-window`
4. ### Draft a reply, hold it for review, then send
   Use it when A reply needs writing to an existing thread but a human must read it before it goes out.
   A person decides Send the drafted reply on thread '_snippet_' to its recipients.
   **Effect**
   write
   **Steps**
   6
   **Needs**
   done label id, raw and thread id
   **Install**
   `gws_gmail-draft-review-and-send`
5. ### Purge old mail after human approval
   Use it when Someone wants to permanently clear out a large body of old mail and a human must sign off first.
   A person decides Permanently delete _number of items_ messages older than _cutoff_ matching '_query_'. This cannot be undone.
   **Effect**
   destructive
   **Steps**
   5 · loops
   **Needs**
   query
   **Install**
   `gws_gmail-purge-old-mail-with-approval`
6. ### Revoke a delegate and the forwarding that follows them
   Use it when Someone leaves and their delegated access and mail forwarding must both be removed.
   A person decides Revoke delegate _delegate email_ and remove the forwarding address pointing at them. They lose all access to this mailbox.
   **Effect**
   destructive
   **Steps**
   7
   **Needs**
   delegate email
   **Install**
   `gws_gmail-revoke-delegate-and-forwarding`

install a plan

```
account { op: "plans.install", slug: "gws_gmail-filter-sender-to-new-label" }
# then ask for it by name; a schedule can run it on a timetable
```

Governance for Gmail

## Destructive actions wait for a yes.

16 Gmail actions are destructive. These are all of them:

- Permanently delete a Gmail message `gws_gmail.messages.delete`
- Permanently delete many Gmail messages `gws_gmail.messages.batch_delete`
- Permanently delete a Gmail thread `gws_gmail.threads.delete`
- Update Gmail automatic forwarding settings `gws_gmail.settings.update_auto_forwarding`
- Delete a Gmail label `gws_gmail.labels.delete`
- Create a Gmail forwarding address `gws_gmail.forwarding_addresses.create`
- Delete a Gmail filter `gws_gmail.filters.delete`
- Stop watching a Gmail mailbox `gws_gmail.users.stop`
- Delete a Gmail draft `gws_gmail.drafts.delete`
- Delete a Gmail send-as alias `gws_gmail.send_as.delete`
- Delete a Gmail forwarding address `gws_gmail.forwarding_addresses.delete`
- Delete an S/MIME certificate `gws_gmail.smime_info.delete`
- Remove a Gmail mailbox delegate `gws_gmail.delegates.delete`
- Disable a client-side encryption key pair `gws_gmail.cse_keypairs.disable`
- Delete a client-side encryption identity `gws_gmail.cse_identities.delete`
- Obliterate a client-side encryption key pair `gws_gmail.cse_keypairs.obliterate`

A destructive action runs only with `confirm: true`. Under the `human` policy the agent cannot confirm for itself: the run stops until a named person approves, in the console or from a signed link in an email. The cap on a key is refused before the call is sent, never after.

do gws_gmail.messages.delete confirm_policy: **human**

Permanently delete a Gmail message?

**intent:** the user asked me to permanently delete a Gmail message

run suspended · waiting for a named person · key _gws-gmail-agent_ cannot confirm itself

In the console, or from an emailed signed link.

a key for this connector

```
account {
  op: "keys.create", name: "gws-gmail-agent",
  allowed_actions: ["gws_gmail.*"], cap_calls: 2000,
  confirm_policy: "human_for_writes",
  approval_rules: [
    { match: "gws_gmail.messages.delete", approver: "lead@example.com" },
    { match: "gws_gmail.messages.batch_delete", approver: "lead@example.com" },
    { match: "gws_gmail.threads.delete", approver: "lead@example.com" }
  ]
}
```

Illustrative. Scoped to Gmail only, capped at 2,000 upstream calls, every write confirmed, and the destructive ones approved by a named person.

Cost

## What Gmail costs on actionlake.

Every Gmail action is one upstream call, the only thing actionlake bills. Searching, `check`, `cost`, `account` and any call Gmail refused with 401, 403, 429 or a 5xx are free. Paid plans start at US$49 a month for 250,000 calls, with overage from US$0.30 down to US$0.18 per 1,000.

- 1 upstream call per action all 79 Gmail actions
- 12 actions page each page of a long list is one call
- 28 reads can be cached a cache hit costs nothing
- 100,000 calls a month, free paid plans from US$49 a month for 250,000

[See pricing](https://actionlake.com/pricing)

Action index

## Every Gmail action.

79 actions by area: the id your agent calls, what it does, and its effect.

**Email 79**

- `gws_gmail.cse_identities.create` Create a client-side encryption identity write
- `gws_gmail.cse_identities.delete` Delete a client-side encryption identity destructive
- `gws_gmail.cse_identities.get` Get one client-side encryption identity read
- `gws_gmail.cse_identities.list` List client-side encryption identities read
- `gws_gmail.cse_identities.patch` Patch a client-side encryption identity write
- `gws_gmail.cse_keypairs.create` Create a client-side encryption key pair write
- `gws_gmail.cse_keypairs.disable` Disable a client-side encryption key pair destructive
- `gws_gmail.cse_keypairs.enable` Enable a client-side encryption key pair write
- `gws_gmail.cse_keypairs.get` Get one client-side encryption key pair read
- `gws_gmail.cse_keypairs.list` List client-side encryption key pairs read
- `gws_gmail.cse_keypairs.obliterate` Obliterate a client-side encryption key pair destructive
- `gws_gmail.delegates.create` Add a Gmail mailbox delegate write
- `gws_gmail.delegates.delete` Remove a Gmail mailbox delegate destructive
- `gws_gmail.delegates.get` Get one Gmail mailbox delegate read
- `gws_gmail.delegates.list` List Gmail mailbox delegates read
- `gws_gmail.drafts.create` Create a Gmail draft write
- `gws_gmail.drafts.delete` Delete a Gmail draft destructive
- `gws_gmail.drafts.get` Get one Gmail draft read
- `gws_gmail.drafts.list` List Gmail drafts read
- `gws_gmail.drafts.send` Send a Gmail draft write
- `gws_gmail.drafts.update` Update a Gmail draft write
- `gws_gmail.filters.create` Create a Gmail filter write
- `gws_gmail.filters.delete` Delete a Gmail filter destructive
- `gws_gmail.filters.get` Get one Gmail filter read
- `gws_gmail.filters.list` List Gmail filters read
- `gws_gmail.forwarding_addresses.create` Create a Gmail forwarding address destructive
- `gws_gmail.forwarding_addresses.delete` Delete a Gmail forwarding address destructive
- `gws_gmail.forwarding_addresses.get` Get one Gmail forwarding address read
- `gws_gmail.forwarding_addresses.list` List Gmail forwarding addresses read
- `gws_gmail.history.list` List Gmail mailbox history read
- `gws_gmail.labels.create` Create a Gmail label write
- `gws_gmail.labels.delete` Delete a Gmail label destructive
- `gws_gmail.labels.get` Get one Gmail label read
- `gws_gmail.labels.list` List Gmail labels read
- `gws_gmail.labels.patch` Patch a Gmail label write
- `gws_gmail.labels.update` Replace a Gmail label write
- `gws_gmail.message_attachments.get` Get a Gmail message attachment read
- `gws_gmail.messages.batch_delete` Permanently delete many Gmail messages destructive
- `gws_gmail.messages.batch_modify` Modify labels on many Gmail messages write
- `gws_gmail.messages.delete` Permanently delete a Gmail message destructive
- `gws_gmail.messages.get` Get one Gmail message read
- `gws_gmail.messages.import` Import a Gmail message write
- `gws_gmail.messages.insert` Insert a Gmail message write
- `gws_gmail.messages.list` List Gmail messages read
- `gws_gmail.messages.modify` Modify a Gmail message's labels write
- `gws_gmail.messages.send` Send a Gmail message write
- `gws_gmail.messages.trash` Trash a Gmail message write
- `gws_gmail.messages.untrash` Untrash a Gmail message write
- `gws_gmail.send_as.create` Create a Gmail send-as alias write
- `gws_gmail.send_as.delete` Delete a Gmail send-as alias destructive
- `gws_gmail.send_as.get` Get one Gmail send-as alias read
- `gws_gmail.send_as.list` List Gmail send-as aliases read
- `gws_gmail.send_as.patch` Patch a Gmail send-as alias write
- `gws_gmail.send_as.update` Replace a Gmail send-as alias write
- `gws_gmail.send_as.verify` Send a Gmail send-as verification email write
- `gws_gmail.settings.get_auto_forwarding` Get Gmail automatic forwarding settings read
- `gws_gmail.settings.get_imap` Get Gmail IMAP settings read
- `gws_gmail.settings.get_language` Get Gmail language settings read
- `gws_gmail.settings.get_pop` Get Gmail POP settings read
- `gws_gmail.settings.get_vacation` Get Gmail vacation responder settings read
- `gws_gmail.settings.update_auto_forwarding` Update Gmail automatic forwarding settings destructive
- `gws_gmail.settings.update_imap` Update Gmail IMAP settings write
- `gws_gmail.settings.update_language` Update Gmail language settings write
- `gws_gmail.settings.update_pop` Update Gmail POP settings write
- `gws_gmail.settings.update_vacation` Update Gmail vacation responder settings write
- `gws_gmail.smime_info.delete` Delete an S/MIME certificate destructive
- `gws_gmail.smime_info.get` Get one S/MIME certificate read
- `gws_gmail.smime_info.insert` Upload an S/MIME certificate write
- `gws_gmail.smime_info.list` List S/MIME certificates for a send-as alias read
- `gws_gmail.smime_info.set_default` Set the default S/MIME certificate write
- `gws_gmail.threads.delete` Permanently delete a Gmail thread destructive
- `gws_gmail.threads.get` Get one Gmail thread read
- `gws_gmail.threads.list` List Gmail threads read
- `gws_gmail.threads.modify` Modify a Gmail thread's labels write
- `gws_gmail.threads.trash` Trash a Gmail thread write
- `gws_gmail.threads.untrash` Untrash a Gmail thread write
- `gws_gmail.users.get_profile` Get a Gmail profile read
- `gws_gmail.users.stop` Stop watching a Gmail mailbox destructive
- `gws_gmail.users.watch` Watch a Gmail mailbox write

Questions

## The Gmail MCP server, answered.

**Is there a Gmail MCP server for Claude?**

Yes. actionlake is an MCP gateway: a remote MCP server that gives Claude, or another MCP client, 79 Gmail actions, through the same eight tools it uses for every other connector. actionlake is independent; it is not made or endorsed by Gmail.

**What do I need to connect Gmail?**

Your own Gmail OAuth app, registered with Gmail (its client id and client secret), and the access and refresh tokens from one admin sign-in. actionlake has no Gmail app of its own, so this is not a one-step consent. actionlake renews the access token as it expires. The free call account { op: "connections.requirements", service: "gws_gmail" } lists exactly what to paste.

**Can an AI agent delete or change things in Gmail?**

Only if its key allows it, and only with an explicit confirmation. 16 Gmail actions are destructive, including permanently delete a Gmail message, permanently delete many Gmail messages and permanently delete a Gmail thread. Each runs only with confirm: true. Under the human confirm policy, or an approval rule on the key, the run waits until a named person approves it.

**Will an AI agent use up my Gmail API limit?**

actionlake paces every call to the limits in the Gmail service file: 6,000 calls a minute per connection. Repeated reads are answered from cache (28 Gmail actions can be), which never reaches Gmail.

**What does a Gmail action cost?**

One upstream call, the only unit actionlake bills. A list that pages bills one call per page (12 Gmail actions page). Cache hits, searches, dry runs and calls Gmail refused with 401, 403, 429 or a 5xx are free. The Free plan includes 100,000 calls a month with no card. Paid plans start at US$49 a month for 250,000 calls, with overage from US$0.30 down to US$0.18 per 1,000.

**Which Gmail API does it cover?**

The Gmail API 1 at gmail.googleapis.com/gmail/v1. It is built from Gmail's documentation as read on 8 September 2026. 79 actions in 1 area, each one in the signed service file (version 1.0.0).

**Does actionlake keep my Gmail data, and where?**

actionlake processes and stores data in Sydney, Australia; there is no US region yet. Reads may be cached for up to an hour, and a write clears the reads it affects. Each run's request and response is kept, sealed, for your plan's trace window: 1 day on Free, 3 days on Starter, 7 days on Pro, 14 days on Team, 30 days on Business and 30 days on Enterprise. Your Gmail credential is sealed under your tenant's key, never logged and never returned. Your traffic is not used to train models.

**Which AI clients can use it?**

Claude Code, tested by us end to end, and the Claude app as a custom connector, tested by us with an existing key. Other MCP clients that support remote servers over Streamable HTTP (MCP revisions 2025-06-18 and 2025-11-25) and OAuth dynamic client registration, or a bearer header, should connect the same way; we have not tested them. Or plain REST, under the same action names.

## More connectors like Gmail

Shares the most action names with

- [Nylas 29](https://actionlake.com/connectors/nylas)
- [Microsoft 365 Mail 19](https://actionlake.com/connectors/microsoft-365-mail)
- [Mailtrap 10](https://actionlake.com/connectors/mailtrap)
- [Bird 10](https://actionlake.com/connectors/bird)
- [MailerSend 9](https://actionlake.com/connectors/mailersend)
- [Gandi 8](https://actionlake.com/connectors/gandi)

Joins with, on shared entities

- [Instantly 2](https://actionlake.com/connectors/instantly)
- [HubSpot CRM 1](https://actionlake.com/connectors/hubspot-crm)
- [CIPP 1](https://actionlake.com/connectors/cipp)
- [Microsoft Dynamics 365 1](https://actionlake.com/connectors/microsoft-dynamics-365)
- [Hostinger 1](https://actionlake.com/connectors/hostinger)
- [Reply.io 1](https://actionlake.com/connectors/reply-io)

Browse

- [All Email & messaging connectors](https://actionlake.com/connectors/category/email-and-messaging)
- [All connectors](https://actionlake.com/connectors)
- [How actionlake compares](https://actionlake.com/compare)

actionlake is independent. It is not made or endorsed by Gmail; the name is the vendor's own. Counts are from the Gmail service file, version 1.0.0.

## Give your agent Gmail today.

[Connect Gmail free](https://actionlake.com/console?start=sandbox) [See pricing](https://actionlake.com/pricing)

Start free - 100,000 calls/month, no card. No signup. Hard caps on every key. Cached answers are free.

---

Source: https://actionlake.com/connectors/gmail
More: https://actionlake.com/llms.txt
