Creating a Google OAuth client for the Workspace MCP servers
This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.
Distilled from Google’s own documentation: Configure the Google Workspace MCP servers, Manage OAuth Clients, Google Workspace Developer Preview Program and Configure security for Google Workspace MCP servers. Retrieved 2026-11-24.
Google’s Workspace MCP servers are in Developer Preview, and they accept only an OAuth client that is marked for AI agents. That is a different client from the one Google OAuth 2.0 uses, so create a new one even if you already have a Google client.
-
Join the Developer Preview Program. Apply at Google Workspace Developer Preview Program with your Google Workspace account and the Google Cloud project you will use. Google registers the project and confirms by email; it says the whole process takes a couple of days.
-
Enable the product’s API and its MCP service in the API Library, for each server you will use:
Server API MCP service Gmail Gmail API Gmail MCP API Drive Google Drive API Drive MCP API Docs Google Docs API Docs MCP API Sheets Google Sheets API Sheets MCP API Slides Google Slides API Slides MCP API Calendar Google Calendar API Calendar MCP API Chat Google Chat API Chat MCP API People People API none: the People API serves MCP itself Classroom Google Classroom API Classroom MCP API Universal Search none Google Workspace MCP API -
Configure the consent screen (Google Auth Platform → Branding, then Audience). Choose Internal if you can. With External, add the people who will sign in under Audience → Test users.
-
Under Data Access, click Add or Remove Scopes and add the scopes of the capabilities you will use (see the per-service capability scopes in this catalog entry). Paste them under Manually add scopes, click Add to Table, then Update, then Save.
-
Go to Clients, click Create Client, and choose application type Web application.
-
Under Authorized redirect URIs, click Add URI and enter the callback URL exactly as shown on the connect form.
-
Select Use this client for an AI-powered agent. Without it, the MCP servers reject every request made with this client’s tokens.
-
Click Create and record the client ID and client secret. Copy the secret now: Google shows the full value only at creation.
What the preview allows
Section titled “What the preview allows”The program’s terms say its features may not be included in public applications before general availability, and that you may not give people outside your own domain or company access to an application built on them. Use this client for people inside your own organisation.
Keep this client apart from your other Google client
Section titled “Keep this client apart from your other Google client”Google asks for one client per kind of use: a standard client for interactive sessions and direct API calls, and an agent client used only for AI agents and MCP. Marking a client for agents gives it no extra scopes. It does let a Google Workspace administrator apply policies to agent clients separately from the rest.
Scopes that cost more than consent
Section titled “Scopes that cost more than consent”Google’s Gmail and Drive scope pages list gmail.readonly, gmail.compose, gmail.modify and drive.readonly as restricted. An External app that asks for one of them has to pass Google’s restricted-scope verification, with a security assessment that is repeated every year.
- The Gmail server’s capabilities, and the mail and files parts of Universal Search, ask for restricted scopes.
- The Drive server works on
drive.file, which is non-sensitive, for the files the app created or the person opened with it. Reading every file needsdrive.readonly. - The Docs, Sheets, Slides, Calendar, Chat, People and Classroom servers ask for no restricted scope.
Sending Chat messages
Section titled “Sending Chat messages”Reading Chat needs nothing more. To send messages, configure a Chat app in the same Google Cloud project:
- In the Google Cloud console, open Google Chat API → Manage → Configuration.
- Enter an app name, an avatar URL and a description.
- Under Functionality, turn Enable interactive features off.
- Under Logs, select Log errors to Logging, then click Save.
What Google asks of the application that runs the agent
Section titled “What Google asks of the application that runs the agent”- Screen prompts and responses. Google’s security page says you must screen prompts and responses for malicious content and prompt injection, with its Model Armor or with a solution of your own that you document so that the people using it can accept the risk.
- Expect confirmation prompts. Google’s troubleshooting section says the servers return form elicitation prompts for a person to confirm sensitive tool calls.
If requests are rejected
Section titled “If requests are rejected”Check that Use this client for an AI-powered agent is selected on the client under Google Auth Platform → Clients. If the client cannot be changed, or is also used for non-agent features, create a new client with the setting selected and connect again with it.
Connect it to Publicus
Section titled “Connect it to Publicus”Open Connections under Credentials, choose Google, and pick Google Workspace MCP servers (OAuth 2.0, AI-agent client). Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.
See also: Google in the catalog.
This guide is maintained by Publicus and published under CC BY 4.0.