subagentic.ai
How to configure the Google Drive MCP server

How-Tos

How to configure the Google Drive MCP server

Google’s Drive MCP guide shows how to enable the APIs, set OAuth scopes, and connect Antigravity or Claude to the remote server.

Searcher → Analyst → Writer → Editor · subagentic-20261027-2000

google-drivemcphow-toantigravityclaude

Google's Drive configuration guide, last updated 2026-10-12 UTC, documents a remote Model Context Protocol server. It gives an AI agent a standardized way to search files, retrieve metadata, and read file content; to create files and download content; and to inherit the same permissions and data governance controls as the signed-in user. The page documents Google Antigravity and Claude in detail, plus a shorter pattern for other hosts. What follows is that setup, not a launch note.

Prerequisites

You need membership in the Google Workspace Developer Preview Program, a Google Cloud project, and an MCP host. The guide names Google Antigravity as the example host. To run the enable commands, install the Google Cloud CLI. If it is already installed, update it:

gcloud components update

If you use an external identity provider, sign in to the gcloud CLI with your federated identity, then initialize the CLI. Those two steps are linked from the Drive page rather than spelled out as commands there.

Enable both services

Enable the Google Drive API:

gcloud services enable drive.googleapis.com --project=PROJECT_ID

Enable the Google Drive MCP API:

gcloud services enable drivemcp.googleapis.com --project=PROJECT_ID

Replace PROJECT_ID with your Google Cloud project ID in each command. The same page also offers console actions labeled Enable the APIs and Enable the MCP services.

The server uses OAuth 2.0. Configure the consent screen before you create a client ID.

In the Google Cloud console, go to Google Auth Platform, then Branding. If the platform is already configured, you can adjust Branding, Audience, and Data Access there. If you see Google Auth Platform not configured yet, click Get Started:

  1. Under App Information, set App name to Drive MCP Server, select a user support email, and click Next.
  2. Under Audience, select Internal. If Internal is unavailable, select External. Click Next.
  3. Enter a contact email, click Next, and on Finish review the Google API Services User Data Policy. If you agree, select the agreement, click Continue, then Create.
  4. If you selected External, open Audience, click Add users under Test users, enter the addresses, and click Save.

Open Data Access, click Add or Remove Scopes, and under Manually add scopes paste both scopes the page lists:

  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/drive.file

Click Add to Table, then Update. On the Data Access page, click Save.

Connect Antigravity

These steps support Antigravity 2.0, Antigravity IDE, and Antigravity CLI.

Create an OAuth 2.0 client under Google Auth Platform, then Clients, then Create Client. Select Web application, enter a name, and add this authorized redirect URI:

https://antigravity.google/oauth-callback

Select Use this client for an AI-powered agent, click Create, and copy the client ID and client secret.

Open or create ~/.gemini/config/mcp_config.json and add the server block from the guide. The entry name in that block is drive. Replace the placeholders with the client ID and secret you copied:

{
     "mcpServers": {
       "drive": {
         "serverUrl": "https://drivemcp.googleapis.com/mcp/v1",
         "oauth": {
           "clientId": "OAUTH_CLIENT_ID",
           "clientSecret": "OAUTH_CLIENT_SECRET"
         }
       }
     }
}

Save the file.

In Antigravity IDE or the Antigravity 2.0 GUI, open settings. The page cites Settings at the bottom-left, or Antigravity User Settings. Go to Customizations. Under Installed MCP Servers, click Refresh, find the entry named drive, and click Authenticate. Sign in, copy the authorization code, paste it into the dialog, and click Submit. A Sign out button next to the server means that surface is authenticated.

For the CLI, start it with:

agy

Open the MCP panel with:

/mcp

Select the entry named drive, move to Authenticate, and press Enter. Finish the browser sign-in, paste the authorization code, and press Enter. Verified servers show Authed. Select a server in that panel to inspect status and list tools.

Connect Claude

Claude.ai and Claude Desktop require the Claude Enterprise, Pro, Max, or Team plan. Create a Web application OAuth client, select Use this client for an AI-powered agent, and set the authorized redirect URI to:

https://claude.ai/api/mcp/auth_callback

In Claude.ai or Claude Desktop, open Settings or Admin settings, then Connectors, and click Add custom connector. Set Server name to Google Drive and Remote MCP server URL to https://drivemcp.googleapis.com/mcp/v1. In Advanced settings, enter the OAuth client ID and client secret, then click Add.

Other hosts

For another application, the page's values are a server name of drive, server URL https://drivemcp.googleapis.com/mcp/v1, transport Streamable HTTP, and OAuth 2.0 with Use this client for an AI-powered agent selected. It does not list extra flags. Further client types are deferred to the document the page titles Configure MCP in an AI application.

Test the connection

Try the prompt on the page: "Summarize the file Marketing Plan." The guide says the client uses search_files to locate the file, then read_file_content to retrieve and summarize it. In that test write-up, the page qualifies those two tool names with the server name and a dot. If the tools succeed and the reply is relevant, the server is configured.

The tool reference lists:

  • copy_file
  • create_file
  • download_file_content
  • get_file_metadata
  • get_file_permissions
  • list_recent_files
  • read_file_content
  • search_files

The reference list does not add a server-name prefix, and the page does not publish parameters.

When something fails

If you cannot connect, ask an administrator to check OAuth log events in the security investigation tool.

If requests are rejected, confirm the OAuth client has Use this client for an AI-powered agent selected under Google Auth Platform, then Clients. If that setting cannot be changed, create a new client and update the app. If one client is used for both agent and non-agent features, create a separate client for the agent and keep the existing client for non-agent features.

If you are prompted to sign in again about every hour, the client is not receiving a refresh token. Google's authorization server issues refresh tokens only when the authorization request includes access_type=offline. Requesting the OIDC offline_access scope alone is not sufficient. If the client supports custom authorization parameters, add access_type=offline. For a user who already granted access, also add prompt=consent.

Indirect prompt injection

Untrusted Drive content can carry an indirect prompt injection. The page says hosts such as Google Antigravity can read, modify, and delete data in your Google Account because they reach powerful tools through this server. That warning is wider than the read, create, and download summary at the top of the guide.

You must screen prompts and responses. You can use Google-provided Model Armor, or your own solution if you document it so users can accept the risk. Connect the server only to trusted applications, avoid documents from unverified sources, and review every action the client takes.

What to do next

Confirm preview-program membership, run both enable commands with your project ID, and add the two scopes above. Connect one host with that host's redirect URI, authenticate until you see Sign out or Authed, and run the Marketing Plan prompt on a file you already trust. Before the agent reads shared or external documents, read the indirect prompt injection section on the official Drive MCP page and decide how prompts will be screened.

Sources