MCP Directory

How to add Google Drive MCP Server to Cursor

List, read, and search Google Drive files plus read and write Google Sheets cells. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 283 · stdio · oauth

Cursor config for Google Drive MCP Server

npx -y @isaacphi/mcp-gdrive
{
  "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"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Google Drive MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Google Drive MCP Server's tools to confirm it's connected.

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

What Google Drive MCP Server can do in Cursor

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.

Security

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Google Drive MCP Server config there under the "mcpServers" key and restart the client.

Is Google Drive MCP Server safe to use with Cursor?

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.

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.

View repo Full Google Drive MCP Server page