mcp-drive-google
v1.0.0
Published
Google Drive MCP Server for Claude Code - supports binary file uploads (zip, pdf, images, etc.)
Downloads
48
Maintainers
Readme
mcp-drive-google
Google Drive MCP Server for Claude Code. Supports binary file uploads (zip, tar.gz, PDFs, images) — unlike other gdrive MCP servers that only handle text files.
Tools
| Tool | Description |
|------|-------------|
| upload_file | Upload any file (binary or text) from local disk to Drive |
| list_files | List files in Drive or a specific folder |
| search_files | Search files by name |
| create_folder | Create a folder |
| get_file_info | Get file metadata |
| download_file | Download a file to local disk |
| delete_file | Move file to trash |
| move_file | Move file to a different folder |
Setup
Step 1: Google Cloud Credentials
- Go to console.cloud.google.com
- Create a project (or use existing)
- Enable Google Drive API → APIs & Services → Enable APIs
- Go to Credentials → Create Credentials → OAuth 2.0 Client ID
- Application type: Desktop app
- Download the JSON file → save it to
~/.gdrive/credentials.json
mkdir -p ~/.gdrive
mv ~/Downloads/client_secret_*.json ~/.gdrive/credentials.jsonStep 2: Authenticate (one-time)
npx -y mcp-drive-googleThis will print a Google auth URL. Open it in your browser, sign in, copy the code from the URL bar (after redirect to localhost — page won't load, that's fine), and paste it back in the terminal.
Token is saved to ~/.gdrive/token.json automatically.
Step 3: Add to Claude Code
claude mcp add gdrive -- npx -y mcp-drive-googleThen add env vars to ~/.claude.json under the gdrive server entry:
{
"mcpServers": {
"gdrive": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-drive-google"],
"env": {
"GDRIVE_CREDENTIALS_PATH": "/Users/<username>/.gdrive/credentials.json",
"GDRIVE_TOKEN_PATH": "/Users/<username>/.gdrive/token.json"
}
}
}
}Replace <username> with your macOS username.
Step 4: Restart Claude Code
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| GDRIVE_CREDENTIALS_PATH | ~/.gdrive/credentials.json | Path to OAuth2 client credentials |
| GDRIVE_TOKEN_PATH | ~/.gdrive/token.json | Path to saved access token |
Default paths are used if env vars are not set.
Usage Examples
Once connected, ask Claude:
"list my Google Drive files"
"upload /Users/me/backup.zip to Drive"
"search Drive for invoice"
"create a folder called Projects in Drive"
"download file <fileId> to /Users/me/Downloads/"Why this over other gdrive MCPs?
- Uses
fs.createReadStream()→ supports binary files (zip, tar.gz, images, PDFs) - Other MCPs pass file content as JSON strings → text only
- Auto-refreshes OAuth tokens (no re-auth needed)
- MIME type auto-detected from file extension
License
MIT
