How to integrate Google Drive MCP with Grok Build

Connect Grok Build to Google Drive MCP. Create a new folder named 'invoices', share last uploaded file with your team, and more from your terminal, with authentication handled for you.

Google Drive logoGoogle Drive
Oauth2

Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.

92 Tools7 Triggers

How to integrate Google Drive MCP with Grok Build

Grok Build is xAI's terminal coding agent. It runs on Grok 4.5, plans its work before it acts, and can run multiple sub-agents in parallel. It also reads Claude Code's MCP configuration, so any server you already have in a .mcp.json is picked up with no changes.

In this guide, I will show you how to connect your Google Drive account to Grok Build through Composio, so it can create a new folder named 'Invoices', share last uploaded file with your team, add comment to project proposal document, and more without leaving the terminal. Composio holds the OAuth tokens for you, and Grok Build only calls the tools you approve.

For exact tool slugs and parameter tables, see the tool catalog in the Composio docs.

Also integrate Google Drive with

Why use Composio over a standalone MCP server?

  • Read and write access. Composio's Google Drive integration lets Grok Build take real actions like creating drafts, sending updates, and labeling records, not just reading data.
  • 1,700+ SaaS toolkits out of the box. One endpoint gives you a full catalog of pre-built connectors, from Gmail and Slack to Notion, Linear, and Salesforce.
  • One MCP server for every app. Wire up a single Composio server instead of maintaining a separate MCP entry for each app.
  • Smart, context-aware tool loading. Grok Build caps how many tools it holds in a single request. Composio loads only the tools a task needs, so you do not spend that budget on tools you are not using.
  • Cross-app automation. Chain actions across apps in one run. Pull a thread, summarize it in Notion, and post the highlights to Slack from a single prompt.

Prerequisites

  • Grok Build installed and signed in. Install with curl -fsSL https://x.ai/cli/install.sh | bash on macOS or Linux, or irm https://x.ai/cli/install.ps1 | iex on Windows PowerShell. On first launch Grok opens a browser to authenticate; for headless or CI use, set an XAI_API_KEY environment variable instead (create the key at console.x.ai).
  • Access to the Google Drive account you want to connect.
  • The Composio MCP endpoint. Composio's server is remote and hosted, so there is nothing to run locally and no tunnel to set up.

Step-by-step: Connect Google Drive to Grok Build

1. Install and verify Grok Build

Install the CLI, then restart your shell so the grok binary lands on your PATH:

bash
curl -fsSL https://x.ai/cli/install.sh | bash
which grok

On Windows, install with PowerShell instead: irm https://x.ai/cli/install.ps1 | iex. If which grok returns a path, you are set. Grok Build runs on Grok 4.5 by default; you can switch models inside the session with /model <name>.

2. Add the Composio server

Add Composio as a remote HTTP MCP server with the grok mcp add command:

bash
grok mcp add --transport http composio https://connect.composio.dev/mcp

You can also add and manage servers from inside a session. Run /mcps to open the extensions modal on the MCP tab, then add a new server and paste the Composio URL. Added this way, Grok auto-detects the name from the URL and lists the server as connect:

bash
https://connect.composio.dev/mcp
Grok Build /mcps extensions modal listing MCP servers Grok Build adding the Composio MCP server with its URL

Grok also reads Claude Code-style config, so an entry in ~/.grok/config.toml or a project .mcp.json works the same way.

3. Authenticate

Composio uses OAuth. In the /mcps modal, select the Composio server and press i to authenticate (Grok also triggers this browser flow automatically the first time it uses a Composio tool). Click Allow to authorize access. Grok stores the tokens under ~/.grok/mcp_credentials.json, and /mcps shows Composio as connected.

Grok Build prompting to authenticate the Composio MCP server Composio authorization screen with the Allow button for Grok Build

4. Start building

Ask Grok to work with your Google Drive account through Composio. On the first Google Drive action, Composio prompts you to connect the account through OAuth. Approve the scopes once, and Composio handles token refresh from there.

What you can do after connecting Google Drive

  • Create a new folder named 'Invoices'
  • Share last uploaded file with your team
  • Add comment to project proposal document
  • Copy template file to today's reports folder

Security + privacy notes (important)

  • Use least-privilege access. Grant only the Google Drive scopes you actually need.
  • Review OAuth scopes before approving. Check that the requested scopes match what you expect Composio and Grok Build to do.
  • Keep write actions human-reviewed. Grok Build proposes a plan before it acts. Leave that approval step on for actions like sending messages or editing records.
  • Keep secrets out of version control. Your XAI_API_KEY and any tokens should never be committed. Use environment variables or a secrets manager.
TOOLS & TRIGGERS

Supported Tools and Triggers

Every Google Drive action and event your agent gets out of the box.

Insert File Parent (v2)

Tool to add a parent folder for a file using Google Drive API v2.

Insert Property (v2 API)

Tool to add a property to a file, or update it if it already exists (v2 API).

Batch Get Spreadsheet Values

Read multiple explicit ranges from one Google Spreadsheet in one request.

Batch Update Spreadsheet Values

Write values to multiple Google Sheets ranges in one batch request.

Clear Spreadsheet Values

Permanently clear values from one range while preserving formatting, notes, and validation.

Copy file with advanced options

Creates a copy of a file and applies any requested updates with patch semantics.

Create Comment

Tool to create a comment on a file in Google Drive.

Create Shared Drive

Creates a Google shared drive for collaboration or storage.

Create File or Folder

Creates a new file or folder in Google Drive.

Create a File from Text

Creates a Google Drive file from text, with support for Google Workspace formats and an optional parent folder.

Create a folder

Creates a Google Drive folder, optionally inside an existing parent specified by ID or exact name.

Create Permission

Tool to create a permission for a file or shared drive.

Create Permissions Batch

Creates multiple permissions for files or shared drives in a single batch request.

Create Reply

Create a plain-text reply to a comment on a Google Drive file, optionally resolving or reopening the parent comment.

Create Shortcut to File/Folder

Tool to create a shortcut to a file or folder in Google Drive.

Delete Child (v2)

Tool to remove a child from a folder using Google Drive API v2.

Delete Comment

Permanently deletes a comment thread (and all its replies) from a Google Drive file — this action is irreversible.

Delete Shared Drive

Tool to permanently delete a shared drive.

Delete Parent (v2)

Tool to remove a parent from a file using Google Drive API v2.

Delete Permission

Deletes a specified permission from a file or shared drive by permission ID; deleting other permissions does not remove an existing public-access permission.

Delete Property (v2 API)

Delete a custom property from a Google Drive file using API v2.

Delete Reply

Tool to delete a specific reply by reply ID.

Delete Revision

Tool to permanently delete a file revision.

Download a file from Google Drive

Downloads a Drive file's content and returns it in `downloaded_file_content`.

Download file via operation

Starts a long-running operation to download a Drive file, including Google Vids files, or export supported Google Workspace documents.

Download File Revision

Download the stored bytes of one blob-file revision.

Edit File

Replaces the entire content of an existing Google Drive binary file with UTF-8 text while retaining its file ID.

Empty Trash

Tool to permanently and irreversibly delete ALL trashed files in the user's Google Drive or a specified shared drive.

Export Google Workspace file

Exports a Google Workspace document to the requested MIME type and returns exported file content.

Find file

The comprehensive Google Drive search tool that handles all file and folder discovery needs.

Find folder

Finds one page of Google Drive folders by name and optional parent.

Generate File IDs

Generates a set of file IDs which can be provided in create or copy requests.

Get about

Tool to retrieve information about the user, the user's Drive, and system capabilities.

Get App

Tool to get information about a specific Drive app by ID.

Get Changes Start Page Token

Tool to get the starting pageToken for listing future changes in Google Drive.

Get Child Reference (v2)

Tool to get a specific child reference for a folder using Drive API v2.

Get Comment

Tool to get a comment by ID.

Get Document

Retrieve a native Google Docs document's structured content and metadata by ID.

Get Shared Drive

Tool to get a shared drive by ID.

Get File Metadata

Gets a Drive file's metadata by ID, optionally returning only the metadata selected by `fields`.

Get Property (v2)

Tool to get a property by its key using Google Drive API v2.

Get Google Form

Retrieve a Google Form's definition, questions, settings, and publishing state by ID.

Get Parent Reference (v2)

Tool to get a specific parent reference for a file using Drive API v2.

Get Permission

Gets a permission by ID.

Get Permission ID for Email

Tool to get the permission ID for an email address using the Drive API v2.

Get Google Slides Presentation

Retrieves a Google Slides presentation by ID, including its page structures.

Get Presentation Page Thumbnail

Generate one short-lived page thumbnail URL using an expensive Slides quota read.

Get Reply

Tool to get a specific reply to a comment on a file.

Get Revision

Tool to get a specific revision's metadata (name, modifiedTime, keepForever, etc.

Get Spreadsheet

Retrieve a Google Spreadsheet's structure, metadata, and selected grid data.

Get Spreadsheet Values

Read values from one range in a Google Spreadsheet.

Delete folder or file

Tool to delete a file or folder in Google Drive.

Hide Shared Drive

Tool to hide a shared drive from the default view.

Insert Child Into Folder (v2)

Tool to insert a file into a folder using Drive API v2.

List Access Proposals

Tool to list pending access proposals on a file.

List Approvals

Lists a page of approvals associated with a Google Drive file, with pagination for browsing subsequent pages.

List Changes

Lists a page of changes for a user or shared drive; without a page token, it obtains a current start token and lists subsequent changes rather than earlier activity.

List Folder Children (v2)

Lists a page of child references for a folder using Google Drive API v2.

List Comments

Lists comments on a Google Drive file, with pagination, an option to include deleted comments, and a minimum modification-time filter.

List File Labels

Lists labels applied to a Google Drive file, including label IDs and applied field IDs.

List Properties (v2 API)

Tool to list a file's properties in Google Drive API v2.

List Google Form Responses

Return one page of submissions for a Google Form.

List Label Definitions

Lists available Google Drive labels, returning each label's ID and display name without requiring a file ID.

List Permissions

Lists a page of permissions for a file or shared drive.

List Replies to Comment

List a page of replies to a specific comment on a Google Drive file.

List File Revisions

Tool to list a file's revision metadata (not content) in Google Drive.

List Shared Drives

Tool to list the user's shared drives.

Modify File Labels

Modifies the set of labels applied to a file.

Move File

Moves a file to another Google Drive folder.

Patch Permission

Tool to update a permission using patch semantics.

Patch Property (v2 API)

Tool to update a property on a file using PATCH semantics (v2 API).

Read Spreadsheet Values

Read values from one or more ranges in a Google spreadsheet.

Resumable Upload

Upload a file to Google Drive using a resumable session, creating a new file or updating an existing file by ID.

Stop Watch Channel

Tool to stop watching resources through a specified channel.

Trash File

Tool to move a file or folder to trash (soft delete).

Unhide Shared Drive

Tool to unhide a shared drive.

Untrash File

Restore a file from Google Drive trash.

Update Comment

Tool to update an existing comment on a Google Drive file.

Update Shared Drive

Tool to update the metadata for a shared drive.

Update File Metadata (PATCH v2)

Tool to update file metadata using the Drive API v2 PATCH method.

Update Property (v2 API)

Tool to update a property on a file using Google Drive API v2.

Update File (Metadata)

Updates file metadata.

Update File Revision Metadata

Updates ONLY the metadata properties of a specific file revision (keepForever, published, publishAuto, publishedOutsideDomain).

Update Permission

Tool to update a permission with patch semantics.

Update Reply

Tool to update a reply to a comment on a Google Drive file.

Update Spreadsheet Values

Write values to one exact Google Sheets range.

Upload File

Upload a new file to Google Drive, optionally placing it in a specified folder.

Upload File from URL to Drive

Tool to fetch a file from a provided URL server-side and upload it into Google Drive.

Upload/Update File Content

Tool to update file content in Google Drive by uploading new binary content.

Watch Drive Changes

Subscribe to Google Drive changes for a user or shared drive and receive notifications at a webhook URL.

Watch File for Changes

Tool to subscribe to push notifications for changes to a specific file.

Write Spreadsheet Values

Replace values in one range of a Google spreadsheet.

FAQ

Frequently asked questions

Start with Google Drive.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Google Drive tool your agent needs.Free to start.

Start building