Skip to main content

How to Connect Google Workspace

πŸ”§ Tools Β· MCP

Google publishes a family of hosted MCP servers under https://*mcp.googleapis.com/mcp/v1, one per product. They share a single OAuth client: register one Web OAuth client in Google Cloud, enable the APIs, then use the same client ID and secret on every server.

Developer Preview

Google Workspace MCP servers are part of the Google Workspace Developer Preview Program. Your Google Cloud project must be enrolled before the MCP services become available.

Sheets, Docs, and Slides were added to the program separately from Gmail/Drive/Calendar/People/Chat. A project enrolled for the other five is not automatically enrolled for Sheets/Docs/Slides. Check enrollment per product, and expect to create a separate OAuth client for Sheets/Docs/Slides unless your existing client's project is also enrolled for them.

ProductMCP URLRequired scopes (prefix every entry with https://www.googleapis.com/auth/)
Gmailhttps://gmailmcp.googleapis.com/mcp/v1gmail.readonly, gmail.compose
Drivehttps://drivemcp.googleapis.com/mcp/v1drive.readonly, drive.file
Calendarhttps://calendarmcp.googleapis.com/mcp/v1calendar.calendarlist.readonly, calendar.events.freebusy, calendar.events.readonly
Peoplehttps://people.googleapis.com/mcp/v1directory.readonly, userinfo.profile, contacts.readonly
Chathttps://chatmcp.googleapis.com/mcp/v1chat.spaces.readonly, chat.memberships.readonly, chat.messages.readonly, chat.messages.create, chat.users.readstate.readonly
Sheetshttps://sheetsmcp.googleapis.com/mcp/v1spreadsheets.readonly, drive.readonly
Docshttps://docsmcp.googleapis.com/mcp/v1documents.readonly, drive.readonly
Slideshttps://slidesmcp.googleapis.com/mcp/v1presentations.readonly, drive.readonly

1. Set Up Google Cloud​

In Google Cloud Console, with a project selected:

  1. APIs & Services β†’ Library: enable the product APIs you plan to use: Gmail API, Google Drive API, Google Calendar API, Google Chat API, People API, Google Sheets API, Google Docs API, Google Slides API.
  2. Enable the MCP services for each product: Gmail MCP API, Drive MCP API, Google Calendar MCP API, Chat MCP API, Sheets MCP API, Docs MCP API, Slides MCP API. These are separate entries in the API Library.
  3. (Chat only) Open Google Chat API β†’ Manage β†’ Configuration. Set App name to Chat MCP, Avatar URL to https://developers.google.com/chat/images/quickstart-app-avatar.png, Description to Chat MCP server, toggle Enable interactive features off, enable Log errors to Logging, and click Save.
  4. APIs & Services β†’ OAuth consent screen: click Get started:
    • App name: Workspace MCP Servers. Select a User support email.
    • Audience: Internal if every user belongs to your Workspace, otherwise External.
    • Contact Information: enter an email address.
    • Agree to the terms, click Continue, then Create.
    • Open Data Access β†’ Add or Remove Scopes and add every scope from the table above that you intend to use. Click Update, then click Save.
    • If you chose External, add test users under Audience β†’ Test users until you publish.
  5. APIs & Services β†’ Clients β†’ Create client:
    • Application type: Web application.
    • Name: Zeta Alpha MCP.
    • Authorized redirect URIs: https://api.zeta-alpha.com/v0/service/mcp/oauth/callback/, with a trailing slash. Google rejects the URL otherwise.
  6. Copy the Client ID and Client secret.

Google Cloud Create OAuth client ID dialog with Authorized redirect URI ending in /callback/

2. Add the Servers to the Tenant​

Each product is a separate server. Add one under the tenant's MCP Servers per product you use (see Adding a Server to the Tenant):

FieldValue
Namegoogle-gmail, google-drive, google-calendar, google-people, google-chat, google-sheets, google-docs or google-slides
URLThe product's MCP URL from the table above
OAuth client IDThe client's Client ID
OAuth client secretNew secret… with the client's Client secret for the first server; pick that stored secret for the others
ScopesThe product's scopes from the table above, prefixed and space-separated, e.g. for Gmail https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.compose
Redirect URIhttps://api.zeta-alpha.com/v0/service/mcp/oauth/callback/, with the trailing slash Google requires

Sheets, Docs and Slides need their own OAuth client unless your project is enrolled for them too (see the note above). Repeat step 1's client creation in a project enrolled for these three, and use its client ID and secret on their servers.

3. Mount Them and Connect​

Mount the servers on the agent (Mounting a Server on an Agent):

{
"mcp_tools_provider_configuration": {
"enabled": true,
"mounts": [{ "name": "google-gmail" }, { "name": "google-drive" }, { "name": "google-calendar" }]
}
}

Each user connects every product separately, from Connected apps in the chat or through the Authorize button the agent shows when a request needs it (e.g. "Summarize my unread emails"). See Connecting from the Navigator.

Troubleshooting​

SymptomCause
Error 400: redirect_uri_mismatchAlmost always the trailing slash. The server's Redirect URI must match the one in Google Cloud exactly. Also check that the URI is registered at all: a newly created client (e.g. the separate one for Sheets/Docs/Slides) starts with an empty Authorized redirect URIs list.
Access blocked: this app's request is invalidConsent screen is in Testing and the user is not a test user, or a scope is missing from the Data Access list.
MCP services not found in API LibraryThe project is not enrolled in the Google Workspace Developer Preview Program.
insufficient authentication scopes at tool-call timeUser authorized before a new scope was added. Reauthorize.
Calls succeed but return empty dataThe product API or MCP service is not enabled on the project.