mcp-google-gdrive
Integrates with Google's ecosystem to manage Workspace files and perform automated format conversions across its productivity suite.
Utilizes Google Cloud for API management and OAuth2 authentication to facilitate secure access to Google Drive resources.
Enables AI assistants to list, read, create, and manage files in Google Drive, featuring automatic conversion of Google Workspace formats like Docs, Sheets, and Slides.
Provides tools to export Google Slides presentations into plain text or PDF formats.
Supports converting Google Docs content to Markdown and creating or updating Google Docs from Markdown files.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-google-gdrivesearch for 'Meeting Notes' and read the content"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-google-gdrive
An MCP server for Google Drive, Docs, Sheets, and Slides. Lets AI assistants manage files, folders, permissions, labels, and trash with full read/write access across multiple Google accounts. Includes automatic Workspace format conversion (Docs to Markdown, Sheets to CSV/JSON, Slides to text).
Tools
Account Management
Tool | Description |
| List all configured Google accounts with labels and emails |
| Set the active account for subsequent calls |
| Generate an authorization URL to add a new Google account |
Files
Tool | Description |
| List files with optional search query and folder filtering |
| Get detailed metadata for a file by ID |
| Read file content with automatic Workspace format conversion |
| Download a file to local disk (supports Workspace export) |
| Create a new file with optional OCR on image/PDF uploads |
| Update a file's content, name, or description |
| Copy a file, optionally to a different folder |
| Move a file to a different folder |
| Full-text search across file names and content |
Folders
Tool | Description |
| Create a new folder |
| List contents of a specific folder |
| Delete a folder (trash or permanent) |
Trash
Tool | Description |
| Move a file or folder to trash |
| Restore a file or folder from trash |
| Permanently delete all trashed files (irreversible) |
| List files currently in trash |
Permissions
Tool | Description |
| Share a file with a user, group, domain, or anyone |
| List all permissions on a file or folder |
| Update a permission's role |
| Remove a permission (unshare) |
| Transfer file ownership to another user |
Labels
Tool | Description |
| List available Drive labels |
| List labels applied to a file |
| Add, update, or remove labels on a file |
Google Docs
Tool | Description |
| Export a Google Doc (markdown, html, text, docx, pdf). Use |
| Create a Google Doc from Markdown content |
| Replace a Google Doc's content with Markdown |
Google Sheets
Tool | Description |
| Create a new spreadsheet with named tabs |
| Export a sheet to CSV, JSON, or XLSX. Use |
| List all sheets/tabs in a spreadsheet |
| Read a specific range from any tab (A1 notation) |
| Write data to a specific range |
Google Slides
Tool | Description |
| Create a new presentation |
| Export slides to text, PDF, or PPTX. Use |
| Get a thumbnail image URL for a specific slide |
What's New in v2.2
outputFormatparameter — 12 read/list tools now acceptoutputFormat: "json" | "yaml" | "text". Default isjson(backwards compatible). Useyamlfor structured output ortextfor compact human-readable tables. Supported on:list_accounts,list_files,list_folder,list_trash,list_permissions,list_labels,list_file_labels,list_sheets,get_metadata,read_sheet_range,get_slide_thumbnail,search_files.
v2.1
gdrive_download_file— Download any file from Drive to a local disk path. Workspace files (Docs, Sheets, Slides) are automatically exported to the specified format (pdf, docx, xlsx, pptx, csv, txt, html, or markdown).savePathon export tools —gdrive_export_doc,gdrive_export_sheet, andgdrive_export_slidesnow accept an optionalsavePathparameter. When provided, binary exports (docx, pdf, xlsx, pptx) are saved to disk instead of returned as base64. OmittingsavePathpreserves the v2.0 behavior.gdrive_list_accountsemail resolution — Accounts migrated from v0.x that showed "migrated" instead of an email address now auto-resolve via the Google userinfo API on first call.Documentation fixes —
gdrive_empty_trashnotes eventual consistency;gdrive_transfer_ownershipnotes cross-org limitation.
Output Formats
All read and list tools support an outputFormat parameter:
Format | Description | Use Case |
| Pretty-printed JSON (default) | Machine consumption, API pipelines |
| YAML serialization | Human-readable structured data, config files |
| Compact aligned tables and key-value pairs | Quick scanning, terminal output, token-efficient LLM context |
Example: gdrive_list_files({ query: "name contains 'report'", outputFormat: "text" }) returns:
files:
id name mimeType modifiedTime size
------------- ---------------- --------------- ------------ ----
abc123def456 Q1 Report.pdf application/pdf 2026-04-01 1024
ghi789jkl012 Q2 Report.docx application/pdf 2026-03-15 2048
resultCount: 2Prerequisites
Node.js 18+
A Google Cloud project with these APIs enabled:
Google Drive API
Google Docs API
Google Sheets API
Google Slides API
OAuth2 desktop application credentials
Setup
Create a project in the Google Cloud Console and enable the Drive, Docs, Sheets, and Slides APIs
Create OAuth2 credentials (Application type: Desktop app) and download the JSON file
Save the credentials file:
mkdir -p ~/.config/mcp-google-gdrive
cp ~/Downloads/client_secret_*.json ~/.config/mcp-google-gdrive/credentials.json
chmod 600 ~/.config/mcp-google-gdrive/credentials.jsonRun the one-time authorization flow:
npx mcp-google-gdrive --auth primaryThis prints a URL for Google consent. After granting access, paste the authorization code back into the terminal.
Multi-Account Setup
Add additional accounts with unique labels:
npx mcp-google-gdrive --auth work
npx mcp-google-gdrive --auth personalEach account gets its own token file at ~/.config/mcp-google-gdrive/tokens/{label}.json. Use the account parameter on any tool to specify which account to use, or call gdrive_switch_account to change the default.
Configuration
Gemini CLI
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"google-gdrive": {
"command": "npx",
"args": ["-y", "mcp-google-gdrive"]
}
}
}watsonx Orchestrate
orchestrate toolkits import --kind mcp \
--name google-gdrive \
--description "Google Drive, Docs, Sheets, Slides" \
--command "npx -y mcp-google-gdrive" \
--tools "*"Claude Code
claude mcp add -s user google-gdrive -- npx -y mcp-google-gdriveVS Code / Cursor
Add to .vscode/mcp.json in your workspace:
{
"mcpServers": {
"google-gdrive": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-google-gdrive"]
}
}
}Authentication
The server uses OAuth2 for Google Drive access. Credentials are stored locally:
~/.config/mcp-google-gdrive/credentials.json— OAuth2 client (shared across accounts)~/.config/mcp-google-gdrive/tokens/{label}.json— Per-account tokens (chmod 600)~/.config/mcp-google-gdrive/config.json— Active account and account registry
Access tokens expire after one hour and are refreshed automatically using stored refresh tokens. Token refresh is transparent and requires no user interaction.
Migrating from v0.x
If upgrading from a single-account v0.x installation, the server automatically migrates your existing token.json to tokens/primary.json on first start.
Related MCP Servers
mcp-redhat-account - Red Hat account management
mcp-redhat-knowledge - Red Hat Knowledge Base search
mcp-redhat-manpage - RHEL man pages
mcp-redhat-subscription - Subscription management
mcp-redhat-support - Support case management
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sleepytimeshon/mcp-google-gdrive'
If you have feedback or need assistance with the MCP directory API, please join our Discord server