Enables searching, retrieving, and managing files in Google Drive, including searching files with query syntax, getting file metadata, listing folder contents, moving files between folders, and creating new folders.
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., "@Google Drive MCP Serversearch for PDF files modified this month"
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.
Google Drive MCP Server
An MCP (Model Context Protocol) server that enables Claude to interact with your Google Drive. Works with Claude Web via OAuth2 authentication.
Features
List files - Browse your Drive files and folders
Search - Full-text search across your Drive
Read files - Read content from text files, Google Docs, and Sheets
Create folders - Organize your Drive with new folders
Create files - Create text files, JSON files, or Google Docs
Create sheets - Create Google Sheets with optional data
Move files - Move files and folders to different locations
Edit docs - Full document editing with formatting, headings, images, links, and lists
Tools
Tool | Description |
| List files in Drive, optionally filtered by folder, MIME type, or query |
| Get detailed metadata about a specific file |
| Search files by name or content |
| Read the content of a file (supports text files, Google Docs, Sheets as CSV) |
| Move a file or folder to a different location |
| Rename a file or folder |
| Create a new folder |
| Create a new file with text content |
| Create a new Google Sheet with optional initial data |
| Append text to the end of a Google Doc |
| Find and replace text in a Google Doc |
| Insert formatted text (bold, italic, colors, font size) at start or end |
| Convert a paragraph to a heading (H1-H6) |
| Insert an image from a URL |
| Insert a hyperlink |
| Insert a bulleted or numbered list |
Architecture
Cloud Functions Gen 2 - Serverless deployment with automatic scaling
In-memory state - Auth state stored in memory with automatic cleanup
JWT tokens - Secure access/refresh tokens for MCP authentication
Single-user - Restricted to a single authorized email (ALLOWED_EMAIL)
PKCE required - OAuth 2.1 with S256 code challenge
See SETUP.md for detailed setup instructions.
Quick Start
Prerequisites
Google Cloud account with billing enabled
gcloudCLI installed and authenticatedNode.js 20+
1. Clone and Install
2. Create OAuth Credentials
Click Create Credentials → OAuth client ID
Application type: Web application
Name:
Google Drive MCPLeave redirect URIs empty for now (we'll add after deployment)
Copy the Client ID and Client Secret
3. Configure OAuth Consent Screen
Go to OAuth consent screen
User Type: External
Fill in required fields
Add scopes:
drive,spreadsheets,documents,userinfo.emailAdd yourself as a test user
4. Store Secrets
5. Deploy
The script will output the function URL. Add this as the authorized redirect URI in your OAuth credentials:
6. Connect to Claude Web
Go to claude.ai
Settings → Integrations
Add MCP server with your Cloud Functions URL
Click Connect and authenticate with Google
GitHub Actions Deployment
This repo includes automatic deployment via GitHub Actions on push to main.
Required secrets:
WIF_PROVIDER- Workload Identity Federation providerALLOWED_EMAIL- Authorized user email
See .github/workflows/deploy.yml for details.
Usage Examples
Once connected, you can ask Claude:
"List my recent Google Drive files"
"Search my Drive for documents about quarterly reports"
"Read the content of my meeting notes document"
"What's in my budget spreadsheet?"
"Create a folder called 'Projects' in my Drive"
"Create a file called 'notes.txt' with my meeting notes"
"Create a Google Doc called 'Project Plan' with an outline"
"Move the budget spreadsheet to the Finance folder"
"Create a spreadsheet called 'Expenses' with columns for Date, Description, and Amount"
"Append today's meeting notes to my Project Doc"
"Replace all occurrences of '2024' with '2025' in my annual report"
"Add a bold heading called 'Introduction' to my blog post"
"Insert a bulleted list of key takeaways"
"Add a link to the source article"
Security
OAuth2 with PKCE - Secure authorization flow with S256 code challenge
Single-user authentication - Only the configured ALLOWED_EMAIL can authenticate
JWT tokens - Short-lived access tokens (1 hour), long-lived refresh tokens (30 days)
In-memory state - No persistent storage of auth state (tokens stored only in memory)
Secret Manager - OAuth credentials stored securely in Google Secret Manager
No credential storage - Your Google password never touches the server
Development
License
MIT