---
name: "Google Drive MCP"
description: "Connect Google Drive to Claude Desktop with your @qiscus.com account — read, edit, and search Drive, Docs, Sheets, and Slides straight from Claude."
type: mcp
roles: ["Engineering", "Product", "Design", "Operations", "Customer Success"]
activities: ["Productivity", "Collaboration", "Document Management"]
tags: ["Google Drive", "MCP", "Integration", "Setup", "Productivity"]
owner: "Integration Team"
compatibility: "All MCP-compatible AI agents"
---

# 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

| Capability | Description |
| --- | --- |
| List Files | Show a list of recent files in Google Drive |
| Read Document | Read the contents of Google Docs, Sheets, or Slides |
| Search Files | Search for files by name or content across the whole Drive |
| Edit Document | Edit the contents of Google Docs or Sheets |
| Create File | Create a new file in Drive |
| Access Shared Drive | Access files shared with your account |

## Install Steps

### Before You Start

Make sure you have:

- A `@qiscus.com` Google Workspace account
- Claude Desktop installed — [download](https://claude.ai/download)
- Node.js v18+ installed — check with `node --version`. Don't have it? Install from [nodejs.org](https://nodejs.org) (choose LTS)

### 1. Log In & Download the Setup Files

Open your browser to: **[https://gdrive-mcp-auth.qiscus.io](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:

| File | Contents |
| --- | --- |
| `gcp-oauth.keys.json` | OAuth client credentials |
| `tokens.json` | Your Google access token & refresh token |
| Setup ZIP | A 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:**

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

If you downloaded the ZIP:

```bash
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:

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

**Windows (PowerShell):**

```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:

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

### 3. Update `claude_desktop_config.json`

Open Claude Desktop → **Settings** → **Developers** → **Edit Config**.

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

```json
{
  "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`:

```json
{
  "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](https://myaccount.google.com).
- The `tokens.json` file on your disk gets updated automatically on every refresh — that's normal, just leave it.

## Troubleshooting

| Problem | Solution |
| --- | --- |
| "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 Connectors | Check the JSON is valid at [jsonlint.com](https://jsonlint.com), check there's no literal `<you>` left in the path, restart Claude fully |
| "API not enabled" when accessing Drive | Contact an admin — the Google Cloud project needs the Drive API enabled |
| Token leaked to Git/public chat | Revoke it at [myaccount.google.com/permissions](https://myaccount.google.com/permissions) → log in again to get a new token |

**How to reset from scratch:**

```bash
# macOS / Linux
rm -rf ~/.config/gdrive-mcp
```

```powershell
# 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](https://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
