MCP Directory

Google Drive MCP Server

List, read, and search Google Drive files plus read and write Google Sheets cells.

Unverified
stdio (local)
OAuth
Stale
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y @isaacphi/mcp-gdrive

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "google-drive-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@isaacphi/mcp-gdrive"
      ],
      "env": {
        "CLIENT_ID": "<CLIENT_ID>",
        "CLIENT_SECRET": "<CLIENT_SECRET>",
        "GDRIVE_CREDS_DIR": "/path/to/config/directory"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • A Google Cloud project with the Google Drive API enabled
  • Google Sheets API and Google Docs API enabled (for sheets and docs interaction)
  • An OAuth consent screen configured with scopes https://www.googleapis.com/auth/drive.readonly and https://www.googleapis.com/auth/spreadsheets
  • A Desktop App OAuth Client ID; download the keys JSON, rename to gcp-oauth.keys.json, and place in GDRIVE_CREDS_DIR
  • Node.js / npx to run the server
  • Environment variables CLIENT_ID, CLIENT_SECRET, and GDRIVE_CREDS_DIR
  • An interactive browser authentication step (run node ./dist/index.js) using an account in the same organization as the Google Cloud project

About Google Drive MCP Server

This MCP server integrates with Google Drive to allow listing, reading, and searching files, as well as the ability to read and write to Google Sheets. It exposes four tools (gdrive_search, gdrive_read_file, gsheets_read, gsheets_update_cell) and provides resource access to Drive files via gdrive:///<file_id> URIs. Google Workspace files are automatically exported: Docs to Markdown, Sheets to CSV, Presentations to plain text, and Drawings to PNG; other files are provided in their native format. It runs over stdio and authenticates with Google OAuth using a Desktop App OAuth Client ID.

Tools & capabilities (4)

gdrive_search

Search for files in Google Drive. Inputs: query (string), pageToken (string, optional) for the next page of results, and pageSize (number, optional, max 100). Returns file names and MIME types of matching files.

gdrive_read_file

Read contents of a file from Google Drive. Input: fileId (string), the ID of the file to read. Returns the contents of the specified file.

gsheets_read

Read data from a Google Spreadsheet with flexible options for ranges and formatting. Inputs: spreadsheetId (string); ranges (array of strings, optional) of A1 notation ranges such as ['Sheet1!A1:B10'] (reads the entire sheet if omitted); sheetId (number, optional) for a specific sheet (reads the first sheet if not provided with ranges). Returns the specified data from the spreadsheet.

gsheets_update_cell

Update a cell value in a Google Spreadsheet. Inputs: fileId (string) ID of the spreadsheet; range (string) cell range in A1 notation such as 'Sheet1!A1'; value (string) new cell value. Confirms the updated value in the specified cell.

What this server can do

Google Drive MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Searching for files across a Google Drive by query
  • Reading the contents of Drive files, with Google Workspace files auto-exported to Markdown, CSV, plain text, or PNG
  • Reading data from Google Sheets using A1 notation ranges
  • Updating individual cell values in a Google Spreadsheet
  • Letting an AI assistant retrieve and reference documents and spreadsheet data stored in Google Drive

Security notes

Requires a Google Cloud project with the Google Drive API (and Google Sheets / Google Docs APIs for sheets and docs interaction) enabled and an OAuth consent screen configured. Uses OAuth scopes https://www.googleapis.com/auth/drive.readonly and https://www.googleapis.com/auth/spreadsheets. You must download a Desktop App OAuth Client ID JSON, rename it to gcp-oauth.keys.json, and place it in the directory specified by GDRIVE_CREDS_DIR. The CLIENT_ID and CLIENT_SECRET are passed as environment variables, and the OAuth token is saved to the GDRIVE_CREDS_DIR directory after an interactive browser authentication step. You must authenticate with an account in the same organization as your Google Cloud project.

Google Drive MCP Server FAQ

What authentication does this server use?

Google OAuth. You create a Desktop App OAuth Client ID in Google Cloud, download the keys as gcp-oauth.keys.json into GDRIVE_CREDS_DIR, provide CLIENT_ID and CLIENT_SECRET as environment variables, and complete an interactive browser authentication step. The OAuth token is then saved in GDRIVE_CREDS_DIR.

Which OAuth scopes are required?

https://www.googleapis.com/auth/drive.readonly and https://www.googleapis.com/auth/spreadsheets. To interact with sheets and docs you must also enable the Google Sheets API and Google Docs API.

How are Google Workspace files handled when read?

They are automatically exported: Docs to Markdown, Sheets to CSV, Presentations to plain text, and Drawings to PNG. Other file types are provided in their native format.

Can it write to Google Drive files?

Drive access is read-only (drive.readonly scope), but the server can update individual cell values in Google Sheets via the gsheets_update_cell tool using the spreadsheets scope.

Alternatives to Google Drive MCP Server

Compare all alternatives →

Official MCP reference server for secure local filesystem read/write within allowed directories.

Verified
stdio (local)
No auth
TypeScript
13 tools
Updated 5 months agoRepo

Official MCP server for reading, searching, and manipulating a local Git repository's files and history.

Verified
stdio (local)
No auth
Python
12 tools
Updated 5 months agoRepo

Official AWS Labs MCP server to manage and query S3 Tables (table buckets, namespaces, tables).

Verified
stdio (local)
API key
Python
12 tools
Updated 1 month agoRepo