Google Drive MCP

Connect Google Drive to Claude Desktop with your @qiscus.com account — read, edit, and search Drive, Docs, Sheets, and Slides straight from Claude.

Overview

The Google Drive MCP lets an AI agent read, edit, and search your Google Drive, Docs, Sheets, and Slides files on your behalf — using your own @qiscus.com account. Set it up once, and the access token refreshes automatically with no need to log in again.

For @qiscus.com Google Workspace accounts only. Personal Gmail accounts are not allowed.

Capabilities

CapabilityDescription
List FilesShow a list of recent files in Google Drive
Read DocumentRead the contents of Google Docs, Sheets, or Slides
Search FilesSearch for files by name or content across the whole Drive
Edit DocumentEdit the contents of Google Docs or Sheets
Create FileCreate a new file in Drive
Access Shared DriveAccess files shared with your account

Install Steps

Before You Start

Make sure you have:

  • A @qiscus.com Google Workspace account
  • Claude Desktop installed — download
  • Node.js v18+ installed — check with node --version. Don’t have it? Install from nodejs.org (choose LTS)

1. Log In & Download the Setup Files

Open your browser to: https://gdrive-mcp-auth.qiscus.io

Click “Log in with Google” → choose your @qiscus.com account → click Allow on every permission.

Important: click Allow on every scope. Denying any one scope means the refresh token won’t be issued and the setup will fail.

After logging in, the setup page shows 3 download buttons:

FileContents
gcp-oauth.keys.jsonOAuth client credentials
tokens.jsonYour Google access token & refresh token
Setup ZIPA bundle with the 2 files above + a README

Tip: click “Download setup ZIP” — one click gets you everything. The setup session lasts 10 minutes — finish the next steps before it expires.

2. Move the Files to the Install Folder

Pick the one that matches your OS:

macOS / Linux:

mkdir -p ~/.config/gdrive-mcp
mv ~/Downloads/gcp-oauth.keys.json ~/Downloads/tokens.json ~/.config/gdrive-mcp/

If you downloaded the ZIP:

unzip ~/Downloads/gdrive-mcp-setup.zip -d ~/Downloads/gdrive-setup
mkdir -p ~/.config/gdrive-mcp
mv ~/Downloads/gdrive-setup/gcp-oauth.keys.json ~/Downloads/gdrive-setup/tokens.json ~/.config/gdrive-mcp/

Verify:

ls -la ~/.config/gdrive-mcp/
# Should contain gcp-oauth.keys.json and tokens.json

Windows (PowerShell):

New-Item -ItemType Directory -Force -Path "$env:APPDATA\gdrive-mcp" | Out-Null
Move-Item -Force "$env:USERPROFILE\Downloads\gcp-oauth.keys.json","$env:USERPROFILE\Downloads\tokens.json" "$env:APPDATA\gdrive-mcp\"

Verify:

Get-ChildItem "$env:APPDATA\gdrive-mcp\"
# Should contain gcp-oauth.keys.json and tokens.json

3. Update claude_desktop_config.json

Open Claude Desktop → SettingsDevelopersEdit Config.

On the setup page, click “Copy snippet” (make sure the OS tab is correct). The snippet for macOS looks roughly like this:

{
"mcpServers": {
"google-drive": {
"command": "npx",
"args": ["-y", "@piotr-agier/google-drive-mcp"],
"env": {
"GOOGLE_DRIVE_OAUTH_CREDENTIALS": "/Users/<you>/.config/gdrive-mcp/gcp-oauth.keys.json",
"GOOGLE_DRIVE_MCP_TOKEN_PATH": "/Users/<you>/.config/gdrive-mcp/tokens.json"
}
}
}
}

Windows: command becomes npx.cmd, and the path becomes C:/Users/<you>/AppData/Roaming/gdrive-mcp/...

Replace <you> with your username (check it with whoami in the terminal). For example, if your username is nurcholis:

"GOOGLE_DRIVE_OAUTH_CREDENTIALS": "/Users/nurcholis/.config/gdrive-mcp/gcp-oauth.keys.json"

If your config already has other MCP servers, don’t overwrite the whole file — merge the google-drive entry into the existing mcpServers:

{
"mcpServers": {
"slack": { "..." },
"google-drive": {
"command": "npx",
"args": ["-y", "@piotr-agier/google-drive-mcp"],
"env": {
"GOOGLE_DRIVE_OAUTH_CREDENTIALS": "/Users/nurcholis/.config/gdrive-mcp/gcp-oauth.keys.json",
"GOOGLE_DRIVE_MCP_TOKEN_PATH": "/Users/nurcholis/.config/gdrive-mcp/tokens.json"
}
}
}
}

Note the comma before "google-drive" — JSON requires a comma between entries. Forget it and Claude Desktop fails to load.

Save the file (Cmd+S / Ctrl+S).

4. Restart Claude Desktop

Quit fully — don’t just close the window:

  • macOS: Cmd+Q, or the Claude menu → Quit Claude Desktop
  • Windows: system tray in the bottom right → Claude icon → right-click → Quit
  • Linux: system tray → Claude icon → Quit. Or pkill claude in the terminal

Open Claude Desktop again.

5. Enable & Test

  1. Open the Cowork tab in Claude Desktop
  2. Find the connector named google-drive in the list of MCP servers
  3. Make sure its status is enabled / connected (green toggle)
  4. Test with a prompt:
List the 5 most recent files in my Google Drive

If it works, Claude will return a list of your files. 🎉

After Setup

  • The access token lasts 1 hour. The MCP refreshes it automatically using the refresh token — no need to set up again.
  • The refresh token doesn’t expire for internal Workspace apps. This setup stays valid indefinitely, or until you revoke access from myaccount.google.com.
  • The tokens.json file on your disk gets updated automatically on every refresh — that’s normal, just leave it.

Troubleshooting

ProblemSolution
”Account is not a Qiscus Workspace”Log in with your @qiscus.com account, not personal Gmail
”Refresh token not received”Repeat the login and click Allow on every Google permission
”Setup session has expired”The session lasts 10 minutes. Click “Log in again with Google”
google-drive doesn’t show up in ConnectorsCheck the JSON is valid at jsonlint.com, check there’s no literal <you> left in the path, restart Claude fully
”API not enabled” when accessing DriveContact an admin — the Google Cloud project needs the Drive API enabled
Token leaked to Git/public chatRevoke it at myaccount.google.com/permissions → log in again to get a new token

How to reset from scratch:

# macOS / Linux
rm -rf ~/.config/gdrive-mcp
# Windows
Remove-Item -Recurse -Force "$env:APPDATA\gdrive-mcp"

Remove the google-drive entry from the config, restart Claude, and start from Step 1.

Security

  • The server doesn’t store your token — it only lives in an in-memory session for 10 minutes, then it’s deleted.
  • The token is stored on your local disk as tokens.json with owner-only permissions. Don’t share that folder.
  • The token grants full access to Drive, Docs, Sheets, Slides, and Calendar — treat it like a password.
  • If you resign or switch laptops: delete the gdrive-mcp folder from the old laptop and revoke access from myaccount.google.com.

Help

Stuck? Contact nurcholis@qiscus.com and include:

  • Your OS (Windows / macOS / Linux + version)
  • Your Claude Desktop version (Settings → About)
  • The exact error message (a screenshot is fine)
  • The steps you’ve already tried