GDrive MCP Server
Provides tools for creating, reading, updating, appending to, replacing text in, and formatting Google Docs, as well as listing, searching, and exporting documents.
Provides comprehensive Google Drive file and folder management, including search, create, upload, update, delete, move, copy, download, export, and listing recent, shared, and trashed files.
Provides tools for creating and managing Google Sheets spreadsheets, reading and writing ranges, appending and clearing values, managing sheet tabs, find/replace, listing, searching, exporting, and creating spreadsheets from CSV.
Provides tools for creating Google Slides presentations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
GDrive MCP Server
A comprehensive Model Context Protocol (MCP) server for Google Drive, Google Docs, and Google Sheets with full tool support across all Google Drive functions.
Installation
# Global install (recommended)
npm install -g @pouyanafisi/googledrive-mcp
# Or as a project dependency
npm install @pouyanafisi/googledrive-mcp
# Or clone from source
git clone https://github.com/pouyanafisi/gdrive-mcp.git
cd gdrive-mcp
npm installRelated MCP server: Google Docs & Drive MCP Server
Features
50+ MCP Tools for complete Google Drive management
Automatic MIME type detection for 80+ file extensions
Native Google Workspace support - Docs, Sheets, Slides, Forms
Full CRUD operations - Create, Read, Update, Delete for all file types
Folder management - Create hierarchies, move, search
OAuth2 authentication - Secure Google API access
Setup
1. Create Google Cloud Project
Go to Google Cloud Console
Create a new project
Enable the following APIs:
Google Drive API
Google Docs API
Google Sheets API
2. Create OAuth Credentials
Go to APIs & Services > Credentials
Create OAuth 2.0 Client ID (Desktop app)
Download the JSON file
Rename to
gcp-oauth.keys.jsonPlace in project root or
~/.gdrive-mcp/
3. Authenticate
npm run authThis opens a browser for OAuth authentication.
Usage
MCP Client Configuration
Add to your MCP client (Claude, Cursor, etc.):
{
"mcpServers": {
"gdrive": {
"command": "googledrive-mcp"
}
}
}Or if installed locally:
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": ["@pouyanafisi/googledrive-mcp"]
}
}
}Tools Reference
File Operations (16 tools)
Tool | Description |
| Search for files in Google Drive using queries |
| Get file metadata by ID |
| Create a new file with auto type detection |
| Upload file with automatic MIME type from extension |
| Create a new Google Doc |
| Create a new Google Sheet |
| Create a new Google Slides presentation |
| Update file metadata (name, description) |
| Delete a file (trash or permanent) |
| Move a file to a different folder |
| Copy a file |
| Download file content |
| Export Google Workspace file (PDF, DOCX, XLSX, etc.) |
| List recently viewed files |
| List files shared with me |
| List files in trash |
Folder Operations (9 tools)
Tool | Description |
| Create a new folder |
| Get folder metadata |
| List all folders or within a parent |
| List all files and folders in a folder |
| Rename a folder |
| Move a folder to a new location |
| Delete a folder (trash or permanent) |
| Create nested folder structure (e.g., "Projects/2024/Reports") |
| Search folders by name |
Google Docs Operations (10 tools)
Tool | Description |
| Create a new Google Doc with optional content |
| Read text content from a Google Doc |
| Replace all content in a Google Doc |
| Append text to end of document |
| Find and replace text |
| Add a formatted heading (H1-H6) |
| Add a bullet list |
| List all Google Docs |
| Search Google Docs by name |
| Export to PDF, DOCX, TXT, or HTML |
Google Sheets Operations (15 tools)
Tool | Description |
| Create a new Google Sheet |
| Get spreadsheet metadata and sheet list |
| Read values from a range (e.g., "A1:D10") |
| Read an entire sheet |
| Write values to a range |
| Append rows to a sheet |
| Clear values from a range |
| Add a new sheet tab |
| Delete a sheet tab |
| Rename a sheet tab |
| Find and replace across all sheets |
| List all Google Sheets |
| Search Google Sheets by name |
| Export to XLSX, CSV, or PDF |
| Create spreadsheet from CSV data |
Supported File Types
Automatic MIME Type Detection
The server automatically detects file types from extensions. Just use the correct extension and the file will be created with the proper MIME type.
Text & Markup
Extension | MIME Type | Description |
| text/plain | Plain text |
| text/markdown | Markdown |
| text/csv | CSV data |
| text/tab-separated-values | Tab-separated |
| application/xml | XML |
| text/yaml | YAML |
| text/html | HTML |
| text/css | CSS |
| application/json | JSON |
Programming Languages
Extension | MIME Type | Description |
| text/javascript | JavaScript |
| text/typescript | TypeScript |
| text/javascript | React |
| text/x-python | Python |
| text/x-ruby | Ruby |
| text/x-php | PHP |
| text/x-java | Java |
| text/x-c | C |
| text/x-c++ | C++ |
| text/x-csharp | C# |
| text/x-go | Go |
| text/x-rust | Rust |
| text/x-swift | Swift |
| text/x-kotlin | Kotlin |
| text/x-scala | Scala |
| text/x-sql | SQL |
| text/x-shellscript | Shell |
| text/x-powershell | PowerShell |
| text/x-r | R |
| text/x-lua | Lua |
| text/x-perl | Perl |
Documents
Extension | MIME Type | Description |
| application/pdf | |
| application/msword | Word (legacy) |
| application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word |
| application/rtf | Rich Text |
| application/vnd.oasis.opendocument.text | OpenDocument |
Spreadsheets
Extension | MIME Type | Description |
| application/vnd.ms-excel | Excel (legacy) |
| application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel |
| application/vnd.oasis.opendocument.spreadsheet | OpenDocument |
Presentations
Extension | MIME Type | Description |
| application/vnd.ms-powerpoint | PowerPoint (legacy) |
| application/vnd.openxmlformats-officedocument.presentationml.presentation | PowerPoint |
| application/vnd.oasis.opendocument.presentation | OpenDocument |
Images
Extension | MIME Type | Description |
| image/jpeg | JPEG |
| image/png | PNG |
| image/gif | GIF |
| image/webp | WebP |
| image/svg+xml | SVG |
| image/bmp | Bitmap |
| image/tiff | TIFF |
| image/x-icon | Icon |
Audio
Extension | MIME Type | Description |
| audio/mpeg | MP3 |
| audio/wav | WAV |
| audio/ogg | OGG |
| audio/flac | FLAC |
| audio/aac | AAC |
| audio/mp4 | M4A |
Video
Extension | MIME Type | Description |
| video/mp4 | MP4 |
| video/webm | WebM |
| video/x-msvideo | AVI |
| video/quicktime | QuickTime |
| video/x-ms-wmv | WMV |
| video/x-matroska | Matroska |
Archives
Extension | MIME Type | Description |
| application/zip | ZIP |
| application/x-tar | TAR |
| application/gzip | GZIP |
| application/vnd.rar | RAR |
| application/x-7z-compressed | 7-Zip |
Google Workspace
Extension | MIME Type | Description |
| application/vnd.google-apps.document | Google Doc |
| application/vnd.google-apps.spreadsheet | Google Sheet |
| application/vnd.google-apps.presentation | Google Slides |
| application/vnd.google-apps.form | Google Form |
| application/vnd.google-apps.drawing | Google Drawing |
Examples
Upload files with auto type detection
// These automatically get the correct MIME type
await fileService.uploadFile('readme.md', markdownContent, folderId);
await fileService.uploadFile('config.json', jsonContent, folderId);
await fileService.uploadFile('data.csv', csvContent, folderId);
await fileService.uploadFile('script.py', pythonCode, folderId);Create Google Workspace files
// Create native Google files
await documentService.createDocument('Meeting Notes', 'Initial content');
await spreadsheetService.createSpreadsheet('Budget 2024');
await fileService.createFile('Presentation.gslides');Folder operations
// Create nested folder structure
const folder = await folderService.getOrCreateFolderPath('Projects/2024/Q1');
// List folder contents
const files = await folderService.listFolderContents(folderId);Configuration
Environment Variable | Description |
| Path to OAuth keys file |
| Path to credentials file |
Development
npm run build # Build TypeScript
npm run dev # Watch mode
npm run type-check # Type checking
npm test # Run testsLicense
MIT © Pouya Nafisi
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Google Docs MCP Pack — read, create, and edit Google Docs via OAuth. Reuses the google_sheets…
144 deterministic file tools: PDF, image, media, convert, analyze. Connect in one click (OAuth).
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Connect an AI assistant to your Google Sheets, Drive, Docs, PDFs, BigQuery and Gmail.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables comprehensive interaction with Google Sheets and Google Drive through OAuth2 authentication. Supports spreadsheet creation, data manipulation, formatting, chart creation, and advanced operations like SQL queries and batch updates.-
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive interaction with Google Docs and Google Drive through AI assistants, supporting document reading/writing, rich formatting, table/image insertion, comment management, and complete file/folder operations with secure OAuth authentication.MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Sheets, Docs, and Drive to manage spreadsheets, documents, and files. It supports operations like reading and updating cell data, extracting text from documents, and searching or sharing files within Google Drive.MIT
- FlicenseBqualityDmaintenanceEnables reading and extracting structured data from Google Docs and Sheets, including text, tables, formulas, and images. It supports advanced image handling and multiple authentication methods for interacting with private and public workspace files.113-