> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

Google Workspace offers remote
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)
servers that allow AI agents to securely interact with Google Workspace data.
By configuring the Google Workspace MCP servers, you enable AI applications
like Google Antigravity and Claude to perform actions
in Google Workspace applications like Gmail, Google Drive,
Google Docs, Google Sheets, Google Slides, Google Calendar,
Google Chat, and Google Classroom. Each Google Workspace product
has its own dedicated MCP server.

The Google Workspace MCP servers provide a standardized way for AI agents to:

- **Read data**: Search emails, retrieve files, and list calendar events.
- **Take action**: Create draft emails, upload files, and schedule meetings.
- **Respect security**: Inherit the same permissions and data governance controls as the user.

## Prerequisites

- Membership in the
  [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview).

- A Google Cloud project. To create a project, see
  [Create a project](https://developers.google.com/workspace/guides/create-project).

- An MCP client, like [Google Antigravity](https://antigravity.google/).

- To run the commands on this page, set up the gcloud CLI in a local
  development environment by following these steps:

  1. [Install the Google Cloud CLI](https://cloud.google.com/sdk/docs/install). If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.
  2. If you're using an external identity provider (IdP), sign in to the gcloud CLI with your federated identity. For more information, see [Sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud).
  3. [Initialize the gcloud CLI](https://docs.cloud.google.com/sdk/docs/initializing).
- If configuring the Google Classroom MCP server, a Google Classroom test
  class with at least one test student account. If you don't have a
  Google Classroom class that you can use for testing, [create one in the
  UI](https://support.google.com/edu/classroom/answer/6020273?co=GENIE.Platform%3DDesktop) and [add a test student](https://support.google.com/edu/classroom/answer/6020282?co=GENIE.Platform%3DDesktop).

## Configure the Google Workspace MCP servers

To use the Google Workspace MCP servers, you must enable them in your
Google Cloud project and then configure your MCP client to connect to them.

### Enable the APIs

To use the Google Workspace MCP servers, you must enable the following APIs
in your Google Cloud project:

- Gmail API
- Google Drive API
- Google Docs API
- Google Sheets API
- Google Slides API
- Google Calendar API
- Google Chat API
- People API
- Google Classroom API

### CLI

    gcloud services enable gmail.googleapis.com \
    drive.googleapis.com \
    docs.googleapis.com \
    sheets.googleapis.com \
    slides.googleapis.com \
    calendar-json.googleapis.com \
    chat.googleapis.com \
    people.googleapis.com \
    classroom.googleapis.com --project=PROJECT_ID

Replace `PROJECT_ID` with your Google Cloud project ID.

### Console

Enable the APIs in the Google Cloud console:

[Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=gmail.googleapis.com,drive.googleapis.com,docs.googleapis.com,sheets.googleapis.com,slides.googleapis.com,calendar-json.googleapis.com,chat.googleapis.com,classroom.googleapis.com,people.googleapis.com)

### Enable the MCP services

To enable the MCP components for each Google Workspace product, you must
enable the following services in your Google Cloud project:

- Gmail MCP API
- Google Drive MCP API
- Google Docs MCP API
- Google Sheets MCP API
- Google Slides MCP API
- Google Calendar MCP API
- Google Chat MCP API
- People MCP API
- Google Classroom MCP API

### CLI

    gcloud services enable gmailmcp.googleapis.com \
    drivemcp.googleapis.com \
    docsmcp.googleapis.com \
    sheetsmcp.googleapis.com \
    slidesmcp.googleapis.com \
    calendarmcp.googleapis.com \
    chatmcp.googleapis.com \
    people.googleapis.com \
    classroommcp.googleapis.com --project=PROJECT_ID

Replace `PROJECT_ID` with your Google Cloud project ID.

### Console

Enable the MCP services in the Google Cloud console:

[Enable the MCP services](https://console.cloud.google.com/flows/enableapi?apiid=gmailmcp.googleapis.com,drivemcp.googleapis.com,docsmcp.googleapis.com,sheetsmcp.googleapis.com,slidesmcp.googleapis.com,calendarmcp.googleapis.com,chatmcp.googleapis.com,classroommcp.googleapis.com,people.googleapis.com)

### Configure the Chat app

To use the Google Chat MCP server, you must configure a
Chat app in your Google Cloud project.

1. In the Google Cloud console, search for **Google Chat API** , and click
   **Google Chat API** \> **Manage**
   \> **Configuration**.

   [Go to Google Chat API](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat)
2. Set up the Chat app:

   1. In **App name** field, enter `Chat MCP`.
   2. In **Avatar URL** field, enter `https://developers.google.com/chat/images/quickstart-app-avatar.png`.
   3. In **Description** , enter `Chat MCP server`.
   4. Under **Functionality** , turn off interactive features by toggling **Enable interactive features** off.
   5. Under **Logs** , select **Log errors to Logging**.
3. Click **Save**.

To learn more about building a Chat app, see
[Choose a Google Chat app architecture](https://developers.google.com/workspace/chat/structure).

### Set up the OAuth consent screen

The Google Workspace MCP servers use OAuth 2.0 for authentication and authorization.
You must configure the OAuth consent screen before you can create an OAuth client ID.

1. In the Google Cloud console, go to **Google Auth Platform**
   \> **Branding**.

   [Go to Branding](https://console.cloud.google.com/auth/branding)
2. If you have already configured the **Google Auth Platform** , you can configure
   the following OAuth Consent Screen settings in
   [Branding](https://console.cloud.google.com/auth/branding),
   [Audience](https://console.cloud.google.com/auth/audience),
   and [Data Access](https://console.cloud.google.com/auth/scopes).
   If you see a message that says **Google Auth Platform not configured yet** ,
   click **Get Started**:

   1. Under **App Information** , in **App name** , type `Workspace MCP Servers`.
   2. In **User support email**, select your email address or an appropriate Google group.
   3. Click **Next**.
   4. Under **Audience** , select **Internal** . If you can't select **Internal** , select **External**.
   5. Click **Next**.
   6. Under **Contact Information** , enter an **Email address** where you can be notified about any changes to your project.
   7. Click **Next**.
   8. Under **Finish** , review the [Google API Services User Data Policy](https://developers.google.com/terms/api-services-user-data-policy) and if you agree, select **I agree to the Google API Services: User Data Policy**.
   9. Click **Continue**.
   10. Click **Create**.
   11. If you selected **External** for user type, add test users:
       1. Click **Audience**.
       2. Under **Test users** , click **Add users**.
       3. Enter your email address and any other authorized test users, then click **Save**.
3. Click **Data Access** \>
   **Add or Remove Scopes**. A panel appears with a list of scopes for each
   API that you've enabled in your Google Cloud project.

   1. Under **Manually add scopes**, paste the scopes for the MCP servers
      you want to use:

      - **Gmail** :
        - `https://www.googleapis.com/auth/gmail.readonly`
        - `https://www.googleapis.com/auth/gmail.compose`
      - **Google Drive** :
        - `https://www.googleapis.com/auth/drive.readonly`
        - `https://www.googleapis.com/auth/drive.file`
      - **Google Docs** :
        - `https://www.googleapis.com/auth/drive.readonly`
        - `https://www.googleapis.com/auth/drive.file`
        - `https://www.googleapis.com/auth/documents.readonly`
        - `https://www.googleapis.com/auth/documents`
      - **Google Sheets** :
        - `https://www.googleapis.com/auth/drive.readonly`
        - `https://www.googleapis.com/auth/drive.file`
        - `https://www.googleapis.com/auth/spreadsheets.readonly`
        - `https://www.googleapis.com/auth/spreadsheets`
      - **Google Slides** :
        - `https://www.googleapis.com/auth/drive.readonly`
        - `https://www.googleapis.com/auth/drive.file`
        - `https://www.googleapis.com/auth/presentations.readonly`
        - `https://www.googleapis.com/auth/presentations`
      - **Google Calendar** :
        - `https://www.googleapis.com/auth/calendar.calendarlist.readonly`
        - `https://www.googleapis.com/auth/calendar.events.freebusy`
        - `https://www.googleapis.com/auth/calendar.events.readonly`
      - **Google Chat** :
        - `https://www.googleapis.com/auth/chat.spaces.readonly`
        - `https://www.googleapis.com/auth/chat.memberships.readonly`
        - `https://www.googleapis.com/auth/chat.messages.readonly`
        - `https://www.googleapis.com/auth/chat.messages.create`
        - `https://www.googleapis.com/auth/chat.users.readstate`
        - `https://www.googleapis.com/auth/chat.users.spacesettings`
      - **People API** :
        - `https://www.googleapis.com/auth/directory.readonly`
        - `https://www.googleapis.com/auth/userinfo.profile`
        - `https://www.googleapis.com/auth/contacts.readonly`
      - **Google Classroom** :
        - `https://www.googleapis.com/auth/classroom.announcements`
        - `https://www.googleapis.com/auth/classroom.courses.readonly`
        - `https://www.googleapis.com/auth/classroom.coursework.students`
        - `https://www.googleapis.com/auth/classroom.courseworkmaterials`
        - `https://www.googleapis.com/auth/classroom.rosters.readonly`
        - `https://www.googleapis.com/auth/classroom.student-submissions.students.readonly`
        - `https://www.googleapis.com/auth/classroom.topics.readonly`
   2. Click **Add to Table**.

   3. Click **Update**.

   4. After selecting the scopes required by your app, on the **Data Access** page, click **Save**.

### Configure your MCP client

To add the Google Workspace remote MCP servers to your MCP client,
follow the instructions for your client.

User-delegated OAuth 2.0 client IDs that call the Google Workspace MCP
servers must have **Use this client for an AI-powered agent** selected in
**Google Auth Platform** \> **Clients** . To
update an existing OAuth 2.0 client ID, select this setting in
**Google Auth Platform** \> **Clients** , as
described in
[Manage OAuth Clients](https://support.google.com/cloud/answer/15549257).
If you can't change this setting on an existing client, or if the client also
supports non-agent features, create a new OAuth 2.0 client ID for your AI
agent. For rejected requests, service accounts with domain-wide delegation, or
Google Apps Script, see [Troubleshooting](https://developers.google.com/workspace/guides/configure-mcp-servers#troubleshooting).

### Antigravity

To add the Google Workspace remote MCP servers to Antigravity,
add the server configuration to your `mcp_config.json` file. These
instructions support Antigravity 2.0, Antigravity IDE, and Antigravity CLI.

1. Create an OAuth 2.0 client ID and secret:

   1. In the Google Cloud console, go to **Google Auth Platform**
      \> **Clients**
      \> **Create Client**.

      [Go to Create Client](https://console.cloud.google.com/auth/clients/create)
   2. Select **Web application** as the application type.

   3. Enter a **Name**.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** ,
      and then add `https://antigravity.google/oauth-callback` in the
      **URIs** field.

   5. Select **Use this client for an AI-powered agent**.

   6. Click **Create** and copy your **Client ID** and **Client Secret**.

2. Open or create the configuration file `~/.gemini/config/mcp_config.json`.

3. Add the `mcpServers` configuration to `mcp_config.json`:

       {
         "mcpServers": {
           "gmail": {
             "serverUrl": "https://gmailmcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "drive": {
             "serverUrl": "https://drivemcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "docs": {
             "serverUrl": "https://docsmcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "sheets": {
             "serverUrl": "https://sheetsmcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "slides": {
             "serverUrl": "https://slidesmcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "calendar": {
             "serverUrl": "https://calendarmcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "chat": {
             "serverUrl": "https://chatmcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "people": {
             "serverUrl": "https://people.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           },
           "classroom": {
             "serverUrl": "https://classroommcp.googleapis.com/mcp/v1",
             "oauth": {
               "clientId": "OAUTH_CLIENT_ID",
               "clientSecret": "OAUTH_CLIENT_SECRET"
             }
           }
         }
       }

   Replace the following:
   - `OAUTH_CLIENT_ID`: The client ID you created.
   - `OAUTH_CLIENT_SECRET`: The client secret you created.
4. Save `mcp_config.json`.

5. Authenticate the MCP servers. You can authenticate using either the
   GUI settings or the CLI:

   - **For Antigravity IDE or GUI (Antigravity 2.0):**

     1. Open your settings screen (e.g., click **Settings** at the bottom-left or open **Antigravity User Settings**).
     2. Navigate to **Customizations**.
     3. Under **Installed MCP Servers** , click **Refresh**.
     4. For each server listed (`gmail`, `drive`, `docs`, `sheets`, `slides`, `calendar`, `chat`, `people`, and `classroom`), click **Authenticate** , sign in to your Google Account, copy the authorization code, paste it into the input dialog, and click **Submit**.
   - **For Antigravity CLI:**

     1. Start Antigravity CLI:

            agy

     2. Open the interactive MCP management panel by running:

            /mcp

     3. Authenticate each MCP server:

        1. Use the arrow keys to select the server, move to the **Authenticate** action, and press **Enter** . Complete the sign-in flow in your browser, copy the authorization code, paste it into the terminal prompt, and press **Enter**.
        2. Repeat these steps for each server you configured (`gmail`, `drive`, `docs`, `sheets`, `slides`, `calendar`, `chat`, `people`, and `classroom`).
6. Verify that the servers are correctly configured and running:

   - **For Antigravity IDE or GUI:** A **Sign out** button is displayed next to each server under **Customizations** \> **Installed MCP Servers**.
   - **For Antigravity CLI:** Open the `/mcp` panel to view your configured MCP servers. Verified and authenticated servers display **Authed** next to their names inside the interactive TUI panel. You can select any server under the dashboard view to inspect its status and list all of its available tools.

The remote MCP servers are ready to use in Antigravity.

### Claude

To use the Google Workspace remote MCP servers with Claude.ai or Claude Desktop, you must have the
Claude Enterprise, Pro, Max, or Team plan.

To add the Google Workspace remote MCP servers to Claude, configure a
custom connector with an OAuth client ID and secret.

1. Create an OAuth 2.0 client ID and secret:

   1. In the Google Cloud console, go to **Google Auth Platform**
      \> **Clients**
      \> **Create Client**.

      [Go to Create Client](https://console.cloud.google.com/apis/credentials/oauthclient)
   2. Select **Web application** as the application type.

   3. Enter a **Name**.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      add `https://claude.ai/api/mcp/auth_callback` in the **URIs** field.

   5. Select **Use this client for an AI-powered agent**.

   6. Click **Create** and copy your **Client ID** and **Client Secret**.

2. Configure the MCP server in Claude:

   1. In Claude.ai or Claude Desktop, go to **Settings** \> **Connectors** or **Admin settings** \> **Connectors**.
   2. Click **Add custom connector**.
   3. Enter the connection details for the Google Workspace product you want to add:

      - **Server name** : A name for the server, like `Gmail`.
      - **Remote MCP server URL** : The URL for the Google Workspace product, such as one of the following:
        - Gmail: `https://gmailmcp.googleapis.com/mcp/v1`
        - Google Drive: `https://drivemcp.googleapis.com/mcp/v1`
        - Google Docs: `https://docsmcp.googleapis.com/mcp/v1`
        - Google Sheets: `https://sheetsmcp.googleapis.com/mcp/v1`
        - Google Slides: `https://slidesmcp.googleapis.com/mcp/v1`
        - Google Calendar: `https://calendarmcp.googleapis.com/mcp/v1`
        - Google Chat: `https://chatmcp.googleapis.com/mcp/v1`
        - People API: `https://people.googleapis.com/mcp/v1`
        - Google Classroom: `https://classroommcp.googleapis.com/mcp/v1`
   4. In **Advanced settings** , enter your **OAuth client ID** and **OAuth client secret**.

   5. Click **Add**.

   6. Repeat these steps for each Google Workspace product you want to add.

### Others

Many AI applications have ways to connect to a remote MCP server. You typically
need to enter details about the server, like its name, endpoints, transport
protocol, and authentication method. For the Google Workspace remote MCP
servers, enter the following:

- **Server name** : `googleworkspace`

- **Servers**: Each Google Workspace product has its own server URL:

  - Gmail: `https://gmailmcp.googleapis.com/mcp/v1`
  - Google Drive: `https://drivemcp.googleapis.com/mcp/v1`
  - Google Docs: `https://docsmcp.googleapis.com/mcp/v1`
  - Google Sheets: `https://sheetsmcp.googleapis.com/mcp/v1`
  - Google Slides: `https://slidesmcp.googleapis.com/mcp/v1`
  - Google Calendar: `https://calendarmcp.googleapis.com/mcp/v1`
  - Google Chat: `https://chatmcp.googleapis.com/mcp/v1`
  - People API: `https://people.googleapis.com/mcp/v1`
  - Google Classroom: `https://classroommcp.googleapis.com/mcp/v1`
- **Transport** : [Streamable HTTP](https://modelcontextprotocol.io/specification/latest/basic/transports/streamable-http)

- **Authentication** : The Google Workspace remote MCP server
  uses OAuth 2.0. When creating your OAuth 2.0 client, select
  **Use this client for an AI-powered agent** . For details, see
  [Learn about authentication and authorization](https://developers.google.com/workspace/guides/auth-overview).

  Your MCP client needs a refresh token to keep users from having to sign in
  again about every hour. Google's OAuth 2.0 server issues a refresh token
  only when the authorization request includes `access_type=offline`.
  Requesting only the OpenID Connect (OIDC) `offline_access` scope doesn't
  return one. If your MCP client supports custom authorization parameters,
  add `access_type=offline` to the authorization request. To get a new
  refresh token for a user who already granted access, also add
  `prompt=consent`. If your MCP client doesn't support custom authorization
  parameters, users must sign in again each time the access token expires.
  For details, see
  [Refresh an access token](https://developers.google.com/identity/protocols/oauth2/web-server#offline).

For more details on connecting different types of clients, see
[Configure MCP in an AI application](https://docs.cloud.google.com/mcp/configure-mcp-ai-application).

### Add the Developer Knowledge MCP server

The
[Developer Knowledge MCP server](https://developers.google.com/knowledge/mcp)
is a remote server that searches live, official Google developer
documentation, including `developers.google.com/workspace`, so your AI agent
can look up current API methods, OAuth scopes, and code samples rather than
relying only on its training data. This server provides the
`search_documents`, `get_documents`, and `answer_query` tools and complements
the Google Workspace MCP servers, which let your agent act on
Google Workspace data. Adding the Developer Knowledge MCP server alongside
them helps your agent answer questions about building with
Google Workspace APIs from current documentation.

To add this server to your AI application, follow
[Configure your IDE or coding agent](https://developers.google.com/knowledge/mcp?tab=google-antigravity#configure-ide)
and select your client. To help your agent decide when to search the
documentation and which tool to use, also install the
[`retrieving-developer-knowledge` agent skill](https://developers.google.com/knowledge/mcp#agent-skill).

## Test the Google Workspace MCP servers

After you configure the MCP client, you can verify the connection by
running some test prompts.

Try asking your MCP client the following questions:

- **"What did Ariel say in her last email about our marketing plan?"**

  The client filters for emails from Ariel using `gmail.search_threads`,
  retrieves the latest thread's content with `gmail.get_thread`, and then
  summarizes it for you.
- **"Draft an email to ariel@example.com saying that I approve the marketing plan."**

  The client uses `gmail.create_draft` to create an email in your drafts
  folder, allowing you to review and send it from Gmail.
- **"Summarize the file Marketing Plan."**

  The client calls `drive.search_files` to locate "Marketing Plan", then uses
  `drive.read_file_content` to retrieve and summarize its content.
- **"Show me the structural contents of Google Doc Meeting Notes."**

  The client fetches the document structure and contents using `docs.read_doc`.
- **"Read sheet Sheet1 from Google Sheet Quarterly Sales."**

  The client fetches grid values using `sheets.get_values`.
- **"Show me the verbalized layout of Google Slides presentation Product Overview."**

  The client fetches presentation visual layout structures using `slides.read_presentation`.
- **"When is my next meeting with Ariel?"**

  The client checks your schedule using `calendar.list_events` and details
  your next meeting with Ariel.
- **"According to my Google Profile, what's my name?"**

  The client uses `people.get_user_profile` to retrieve your
  Google Workspace profile information.
- **"What classes am I currently teaching?"**

  The client checks your schedule using `classroom.list_course_summaries` and
  summarizes the active courses where you have the teacher role.
- **"For my geology class, draft an announcement about the upcoming field trip."**

  The client uses `classroom.create_announcement` to draft the announcement,
  which you can review and post in the Google Classroom app.
- **"Check the official Google Workspace docs for the OAuth scope that the
  Gmail `create_draft` tool requires, then draft an email to
  ariel@example.com confirming the marketing plan."**

  If you added the Developer Knowledge MCP server, the client calls
  `search_documents` to find the scope in the Gmail MCP reference
  documentation, and then uses `gmail.create_draft` to create the draft.

If the tools execute successfully and you receive relevant responses, your
Google Workspace MCP servers are correctly configured.

## Troubleshooting

Use the following sections to resolve common authentication and connection
issues with the Google Workspace MCP servers.

### Check OAuth log events

If you encounter issues connecting to the MCP servers, check for errors in the
OAuth logs. Ask your Google Workspace administrator to review the
**OAuth log events** in the [security investigation
tool](https://knowledge.workspace.google.com/admin/security/about-the-security-investigation-tool).

### Rejected requests from user-delegated OAuth clients

If your requests to the MCP servers are rejected, verify that the
user-delegated OAuth 2.0 client ID for your 3-legged OAuth flow has **Use this
client for an AI-powered agent** selected in **Google Auth Platform**
\> **Clients**:

- **Existing client supports the setting** : Select **Use this client for an
  AI-powered agent** on your existing OAuth client.
- **Existing client can't be updated** : Create a new OAuth client with **Use
  this client for an AI-powered agent** selected and update your app to use it.
- **Existing client also supports non-agent features**: Create a separate OAuth client for the AI agent and keep the existing client for your non-agent features.

For instructions, see [Configure your MCP client](https://developers.google.com/workspace/guides/configure-mcp-servers#configure-mcp-client) and
[Manage OAuth Clients](https://support.google.com/cloud/answer/15549257).

### Service accounts with domain-wide delegation

If your app uses a service account with domain-wide delegation for 2-legged
OAuth, you can't select **Use this client for an AI-powered agent** because
service accounts aren't managed in **Google Auth Platform**
\> **Clients**:

- **Access control** : Requests to the MCP servers from these service accounts aren't rejected for missing the agent setting. Instead, access is governed by the domain-wide delegation settings that your Google Workspace administrator manages. For details on administrator settings, see [Control
  API access with domain-wide
  delegation](https://knowledge.workspace.google.com/admin/apps/control-api-access-with-domain-wide-delegation).
- **Sensitive actions**: Google Workspace MCP servers still return form elicitation prompts for human-in-the-loop confirmation on sensitive tool calls made through domain-wide delegation user impersonation.

### Requests from Apps Script

If you call the MCP servers from Apps Script, you can't select
**Use this client for an AI-powered agent** on the default OAuth client that
Apps Script creates and manages for your script. This applies
even if your script uses a [standard Google Cloud
project](https://developers.google.com/apps-script/guides/cloud-platform-projects#standard_cloud_platform_projects).

To call the MCP servers from Apps Script, do the following:

1. In the Google Cloud console, go to **Google Auth Platform** \> **Clients** , create an OAuth client, and select **Use this client for an AI-powered agent**.
2. In your script, use the [OAuth2 for Apps Script
   library](https://github.com/googleworkspace/apps-script-oauth2) to authorize users with that OAuth client.
3. When you call the MCP servers, send the access token that the library returns instead of the token from `ScriptApp.getOAuthToken`.

Apps Script projects that don't call the MCP servers aren't
affected.

### Repeated hourly sign-in prompts

If you're prompted to sign in again about every hour, your MCP client isn't
receiving a refresh token. Google's OAuth 2.0 server issues a refresh token
only when the authorization request includes `access_type=offline`. Requesting
only the OIDC `offline_access` scope doesn't return one.

Check whether your MCP client supports custom authorization parameters:

- **Client supports custom authorization parameters** : Add `access_type=offline` to the authorization request. To get a new refresh token for a user who already granted access, also add `prompt=consent`.
- **Client doesn't support custom authorization parameters**: Sign in again each time the access token expires.

For details, see [Refresh an access
token](https://developers.google.com/identity/protocols/oauth2/web-server#offline).

## Supported products

The following Google Workspace products support Google Workspace MCP servers
and offer the following tools:

- [**Gmail**](https://developers.google.com/workspace/gmail/api/reference/mcp)
  - [`create_draft`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/create_draft)
  - [`get_message`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/get_message)
  - [`get_thread`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/get_thread)
  - [`label_message`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/label_message)
  - [`label_thread`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/label_thread)
  - [`list_drafts`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/list_drafts)
  - [`list_labels`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/list_labels)
  - [`search_threads`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/search_threads)
  - [`unlabel_message`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/unlabel_message)
  - [`unlabel_thread`](https://developers.google.com/workspace/gmail/api/reference/mcp/tools_list/unlabel_thread)
- [**Google Drive**](https://developers.google.com/workspace/drive/api/reference/mcp)
  - [`copy_file`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/copy_file)
  - [`create_file`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/create_file)
  - [`download_file_content`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/download_file_content)
  - [`get_file_metadata`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/get_file_metadata)
  - [`get_file_permissions`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/get_file_permissions)
  - [`list_recent_files`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/list_recent_files)
  - [`read_file_content`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/read_file_content)
  - [`search_files`](https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/search_files)
- [**Google Docs**](https://developers.google.com/workspace/docs/api/reference/mcp)
  - [`read_doc`](https://developers.google.com/workspace/docs/api/reference/mcp/tools_list/read_doc)
  - [`update_doc`](https://developers.google.com/workspace/docs/api/reference/mcp/tools_list/update_doc)
- [**Google Sheets**](https://developers.google.com/workspace/sheets/api/reference/mcp)
  - [`get_values`](https://developers.google.com/workspace/sheets/api/reference/mcp/tools_list/get_values)
  - [`get_spreadsheet`](https://developers.google.com/workspace/sheets/api/reference/mcp/tools_list/get_spreadsheet)
  - [`update_spreadsheet`](https://developers.google.com/workspace/sheets/api/reference/mcp/tools_list/update_spreadsheet)
  - [`update_values`](https://developers.google.com/workspace/sheets/api/reference/mcp/tools_list/update_values)
  - [`update_formulas`](https://developers.google.com/workspace/sheets/api/reference/mcp/tools_list/update_formulas)
  - [`insert_dimension`](https://developers.google.com/workspace/sheets/api/reference/mcp/tools_list/insert_dimension)
- [**Google Slides**](https://developers.google.com/workspace/slides/api/reference/mcp)
  - [`read_presentation`](https://developers.google.com/workspace/slides/api/reference/mcp/tools_list/read_presentation)
  - [`update_presentation`](https://developers.google.com/workspace/slides/api/reference/mcp/tools_list/update_presentation)
- [**Google Calendar**](https://developers.google.com/workspace/calendar/api/v3/reference/mcp)
  - [`create_event`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/create_event)
  - [`delete_event`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/delete_event)
  - [`get_event`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/get_event)
  - [`list_calendars`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/list_calendars)
  - [`list_events`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/list_events)
  - [`respond_to_event`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/respond_to_event)
  - [`search_events`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/search_events)
  - [`suggest_time`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/suggest_time)
  - [`update_event`](https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/update_event)
- [**Google Chat**](https://developers.google.com/workspace/chat/api/reference/mcp)
  - [`search_conversations`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/search_conversations)
  - [`list_messages`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/list_messages)
  - [`search_messages`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/search_messages)
  - [`send_message`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/send_message)
  - [`mark_as_read`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/mark_as_read)
  - [`mark_as_unread`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/mark_as_unread)
  - [`list_memberships`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/list_memberships)
  - [`get_notification_settings`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/get_notification_settings)
  - [`update_notification_settings`](https://developers.google.com/workspace/chat/api/reference/mcp/tools_list/update_notification_settings)
- [**People API**](https://developers.google.com/people/api/mcp)
  - [`get_user_profile`](https://developers.google.com/people/api/mcp/tools_list/get_user_profile)
  - [`search_contacts`](https://developers.google.com/people/api/mcp/tools_list/search_contacts)
  - [`search_directory_people`](https://developers.google.com/people/api/mcp/tools_list/search_directory_people)
- [**Google Classroom**](https://developers.google.com/workspace/classroom/reference/mcp)
  - [`create_announcement`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/create_announcement)
  - [`create_course_work`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/create_course_work)
  - [`create_course_work_rubric`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/create_course_work_rubric)
  - [`create_topic`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/create_topic)
  - [`get_announcements`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_announcements)
  - [`get_course_roster`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_roster)
  - [`get_course_work`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work)
  - [`get_course_work_rubric`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work_rubric)
  - [`get_courses`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_courses)
  - [`get_guardian_info`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_guardian_info)
  - [`list_announcement_summaries`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/list_announcement_summaries)
  - [`list_course_summaries`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/list_course_summaries)
  - [`list_course_work_submissions`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/list_course_work_submissions)
  - [`list_course_work_summaries`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/list_course_work_summaries)
  - [`list_topics`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/list_topics)
  - [`update_course_work`](https://developers.google.com/workspace/classroom/reference/mcp/tools_list/update_course_work)
- [**Universal Search**](https://developers.google.com/workspace/reference/mcp)
  - [`search_corpus`](https://developers.google.com/workspace/reference/mcp/tools_list/search_corpus)

## Important security consideration: Indirect prompt injection

When you expose a language model to untrusted data, there is a risk of an
[indirect prompt injection attack](https://en.wikipedia.org/wiki/Prompt_injection).
Because MCP clients like Google Antigravity have access to
powerful tools and APIs through the Google Workspace MCP servers, they can
read, modify, and delete data in your Google Account.

To mitigate these risks, follow these best practices:

- **Only use trusted tools.** Never connect Google Workspace MCP servers to untrusted or unverified applications.
- **Be cautious with untrusted inputs.** Avoid asking your MCP client to process emails, documents, or other resources from unverified sources. These inputs may contain hidden instructions that can hijack your session, allowing an attacker to modify, steal, or delete your data.
- **Review all actions.** Always carefully review the actions taken by your AI client on your behalf to ensure they are correct and align with your intentions.

## Related topics

- [Google Workspace MCP servers in Antigravity (codelab)](https://codelabs.developers.google.com/google-workspace-mcp-antigravity)
- [Build a Google Workspace AI Agent with ADK and MCP](https://codelabs.developers.google.com/google-workspace-mcp-adk)
- [Google Workspace MCP server connectors in Gemini Enterprise apps](https://codelabs.developers.google.com/google-workspace-ge)