> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Google Workspace MCP Servers

> Configure Google Workspace OAuth access for Google Docs, Sheets, Slides, Drive, Gmail, and Calendar MCP servers in TrueFoundry.

Google Workspace MCP servers usually require a Google Cloud OAuth app and Workspace admin approval before employees can connect. Use this guide to prepare the OAuth app and then register each Google MCP server in TrueFoundry.

## Prerequisites

* A TrueFoundry account with permission to add MCP servers.
* Google Workspace super admin access.
* A Google Cloud project where you can create OAuth credentials.

## Create a Google OAuth Client

In Google Cloud Console, configure the OAuth consent screen for your organization and create a **Web application** OAuth client. Add this authorized redirect URI:

```txt theme={"dark"}
https://<tfy-control-plane-base-url>/api/svc/v1/llm-gateway/mcp-servers/oauth2/callback
```

Copy the Client ID and Client Secret. In Google Admin Console, open **Security** > **Access and data control** > **API controls** and mark the OAuth app as trusted, or explicitly allow only the scopes required by the Google MCP server you are deploying.

## Common Google Scopes

| Server             | Common scopes                                                                                                                                                                                             |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Docs               | `https://www.googleapis.com/auth/documents`, `https://www.googleapis.com/auth/drive.file`, `https://www.googleapis.com/auth/drive.readonly`                                                               |
| Sheets             | `https://www.googleapis.com/auth/spreadsheets`, `https://www.googleapis.com/auth/drive.file`, `https://www.googleapis.com/auth/drive.readonly`                                                            |
| Slides             | `https://www.googleapis.com/auth/presentations`, `https://www.googleapis.com/auth/drive.file`, `https://www.googleapis.com/auth/drive.readonly`                                                           |
| Drive              | `https://www.googleapis.com/auth/drive.readonly`, `https://www.googleapis.com/auth/drive.file`                                                                                                            |
| Gmail and Calendar | `https://www.googleapis.com/auth/gmail.readonly`, `https://www.googleapis.com/auth/gmail.compose`, `https://www.googleapis.com/auth/calendar.readonly`, `https://www.googleapis.com/auth/calendar.events` |

All servers typically also need `openid`, `userinfo.email`, and `userinfo.profile`.

## Register in TrueFoundry

<Steps>
  <Step title="Add a Google MCP server">
    In TrueFoundry, open **MCP Gateway**, click **Add MCP Server**, and select **Connect any Remote MCP Server**. Repeat this for each Google MCP server you are deploying, such as Docs, Sheets, Slides, Drive, Gmail, or Calendar.
  </Step>

  <Step title="Configure the server">
    Use the server URL from the Google MCP implementation you are deploying and set **Authentication** to `OAuth2`. Turn on **Auth Data**, select the **OAuth2** tab, and paste the Google OAuth Client ID and Client Secret from the previous section. Add the scopes required by the server you are registering.
  </Step>

  <Step title="Add collaborators">
    Add the users or teams that should use Google Workspace tools. Assign **MCP Server Manager** to administrators and **MCP Server User** to consumers.
  </Step>

  <Step title="Save and authorize">
    Click **Add MCP Server**. Each user should open the server's **Tools** section and click **Connect Now** to complete Google OAuth. After authorization succeeds, Google tools appear and can be tried from the **Agent Playground**.
  </Step>
</Steps>

## Security Notes

Prefer specific Google data access over marking broad scopes as trusted. Use per-user OAuth so Drive, Docs, Gmail, and Calendar access follows each user's Google Workspace permissions.
