# Google Drive

Lets your agent search Google Drive, read file contents, upload, copy, trash files and manage sharing.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: domdomegg
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/domdomegg/google-drive-mcp
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/google-drive

## What it does

The server exposes a set of Drive tools. `files_list` searches with Google's query syntax, `file_download` pulls content (with export for Google Docs and Sheets), and `file_upload`, `file_update`, `file_copy`, `file_move`, `file_trash` handle changes. `folder_create` makes folders. Separate tool groups cover comments and permissions, so the agent can read a thread under a document, reply, resolve it, or grant and revoke access.

It works as an OAuth proxy and keeps no tokens of its own. `/.well-known/oauth-authorization-server` advertises the authorization server, `/register` hands back the Google client credentials, `/authorize` redirects to Google, `/callback` forwards the code to the client, `/token` injects the credentials, and `/mcp` calls the Drive API with the bearer token.

You need your own OAuth credentials first: enable the Drive API in Google Cloud Console, pick the Web application client type, and add `http://localhost:3000/callback` to the authorized redirect URIs. Skip that and the server has nothing to authorize with. Start it with `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` and `MCP_TRANSPORT=http` via `npm start`; it listens on `http://localhost:3000`, and `PORT=3001` moves it. The requested scope is `drive` — full access to your files.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `GOOGLE_ACCESS_TOKEN`, `MCP_TRANSPORT`, `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Google Drive

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GOOGLE_ACCESS_TOKEN=<GOOGLE_ACCESS_TOKEN> --env MCP_TRANSPORT=<MCP_TRANSPORT> --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --transport stdio google-drive -- npx -y google-drive-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add google-drive --env GOOGLE_ACCESS_TOKEN=<GOOGLE_ACCESS_TOKEN> --env MCP_TRANSPORT=<MCP_TRANSPORT> --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> -- npx -y google-drive-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "google-drive": {
            "command": "npx",
            "args": [
                "-y",
                "google-drive-mcp"
            ],
            "env": {
                "GOOGLE_ACCESS_TOKEN": "<GOOGLE_ACCESS_TOKEN>",
                "MCP_TRANSPORT": "<MCP_TRANSPORT>",
                "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
                "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "google-drive": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "google-drive-mcp"
            ],
            "env": {
                "GOOGLE_ACCESS_TOKEN": "<GOOGLE_ACCESS_TOKEN>",
                "MCP_TRANSPORT": "<MCP_TRANSPORT>",
                "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
                "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GOOGLE_ACCESS_TOKEN=<GOOGLE_ACCESS_TOKEN> -e MCP_TRANSPORT=<MCP_TRANSPORT> -e GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> -e GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> google-drive npx -y google-drive-mcp
```
Replace <…> with your own values

## When to use it
- find a document by name or MIME type with `files_list`
- pull Google Docs and Sheets content in a readable form
- scaffold a folder tree for a new project
- read comments on a file and reply to them
- grant or revoke access to a document

## Example prompts
- List every PDF in Drive with report in the name
- Download the file by id and summarize its main points
- Create a Contracts folder and move the root-level files into it

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
