Overview
Google Drive MCP Server is an official implementation of the Model Context Protocol that creates a secure bridge between AI assistants and Google Drive cloud storage. Developed by the Model Context Protocol team, this server empowers AI models to interact with Google Drive files through natural language, providing capabilities for listing, reading, and searching files stored in Google Drive.
The server intelligently handles different file formats, automatically converting Google Workspace files (like Docs, Sheets, and Presentations) into formats that are easily processable by AI models. This capability significantly enhances AI assistants' ability to work with cloud-stored documents without requiring users to download or convert files manually.
As part of the broader Model Context Protocol infrastructure, this server exemplifies how AI capabilities can be extended to interact with popular cloud services, creating powerful workflows that combine AI intelligence with cloud-based document management.
Features
- Powerful file search functionality with customizable queries
- Direct file content reading from Google Drive by file ID
- File listing and directory navigation
- Automatic file format conversion for Google Workspace files:
- Google Docs → Markdown
- Google Sheets → CSV
- Google Presentations → Plain text
- Google Drawings → PNG
- Native format support for other file types
- Text and JSON file rendering as UTF-8 text
- File metadata retrieval (name, type, ID, modification time, size)
- Enhanced implementations offering Google Sheets read/write capabilities
- Secure OAuth 2.0 authentication
- Read-only access by default (for security)
Use cases
- Document research and analysis across large Google Drive repositories
- Generating summaries of multiple documents stored in the cloud
- Extracting and analyzing data from Google Sheets without manual downloads
- Assisting with file organization and management in Google Drive
- Building knowledge bases from cloud-stored documentation
- Creating automated reports from Google Drive content
- Enabling natural language queries against document libraries
- Supporting research workflows with direct access to reference materials
- Facilitating data analysis projects with access to cloud-stored datasets
- Enhancing productivity tools with AI-powered document interaction
Tools
search
- Search for files in Google Drive with customizable queries- Resource access to Google Drive files via
gdrive:///
format - Automatic file conversion for supported Google Workspace formats
Integration complexity
3/5 - Requires setup of Google Cloud project and OAuth configuration, but well-documented with clear steps for different deployment options.
Setup Guide
Prerequisites
- Google account with access to Google Drive
- Node.js (v16 or higher) installed on your system
- Basic familiarity with command line operations
- Claude Desktop, Cursor, or other MCP-compatible host application
Google Cloud Project Setup
-
Create a Google Cloud Project
- Visit the Google Cloud Console
- Click "New Project"
- Enter a project name (e.g., "MCP GDrive Server")
- Click "Create" and wait for the project to be created
-
Enable the Google Drive API
- In your Google Cloud project, go to the API Library
- Search for "Google Drive API"
- Click on "Google Drive API" in the results
- Click "Enable" and wait for activation
-
Configure OAuth Consent Screen
- Navigate to "OAuth consent screen" in the left sidebar
- Select User Type ("Internal" for Google Workspace users, "External" for personal accounts)
- Fill in required fields:
- App name: "MCP GDrive Server"
- User support email: your email
- Developer contact email: your email
- Click "Save and Continue"
- On the "Scopes" page:
- Add
https://www.googleapis.com/auth/drive.readonly
- Click "Save and Continue"
- Add
- Review the summary and click "Back to Dashboard"
-
Create OAuth Client ID
- Go to "Credentials" in the left sidebar
- Click "Create Credentials" at the top
- Select "OAuth client ID"
- Choose Application type: "Desktop app"
- Name: "MCP GDrive Server Desktop Client"
- Click "Create"
- Download the JSON file and rename it to
gcp-oauth.keys.json
Installation and Configuration
Docker Installation
# First authenticate
docker run -i --rm \
--mount type=bind,source=/path/to/gcp-oauth.keys.json,target=/gcp-oauth.keys.json \
-v mcp-gdrive:/gdrive-server \
-e GDRIVE_OAUTH_PATH=/gcp-oauth.keys.json \
-e "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json" \
-p 3000:3000 mcp/gdrive auth
Add to Claude Desktop configuration:
"mcpServers": {
"gdrive": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "mcp-gdrive:/gdrive-server",
"-e", "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json",
"mcp/gdrive"
]
}
}
NPX Installation
Add to Claude Desktop configuration:
"mcpServers": {
"gdrive": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gdrive"
]
}
}
Authentication Process
- When first running the server, a browser window will open
- Log in with your Google account
- Grant the requested permissions
- After successful authentication, credentials will be saved for future use
License
MIT License
Website link
https://github.com/modelcontextprotocol/servers/tree/main/src/gdrive