Upload, search, and manage Google Drive files — directly from your AI workflows.
A Model Context Protocol (MCP) server that exposes Google Drive's API for listing, searching, uploading, downloading, sharing, and organizing files and folders.
Overview
The Google Drive MCP Server provides full programmatic access to Google Drive through a stateless, multi-tenant interface:
List, search, upload, and download files using Drive's native query syntax
Create and organize folders, manage file permissions and sharing
Read text file content directly without downloading to disk
Perfect for:
Automating file management and document workflows from AI agents
Building assistants that can read, organize, and share Drive files
Integrating Google Drive actions into LLM-powered pipelines
Tools
Lists files in Google Drive with optional filtering by parent folder, name, or type.
Inputs:
- `folder_id` (string, optional) — Parent folder ID to filter results by- `query` (string, optional) — Additional Drive query fragment e.g. `name contains 'report'`- `page_size` (integer, optional) — Maximum number of results to return, capped at 1000. Default: `10`
Downloads a file from Drive and writes it to a specified local path.
Inputs:
- `file_id` (string, required) — Google Drive file ID- `destination_path` (string, required) — Local filesystem path to save the file to
output:
{ "message": "File downloaded successfully to: /path/to/file.pdf"}
Uploads a local file to Google Drive with an optional destination name, folder, and MIME type.
Inputs:
- `file_path` (string, required) — Local filesystem path of the file to upload- `name` (string, optional) — Destination filename in Drive. Defaults to the local filename- `folder_id` (string, optional) — Parent folder ID in Drive to upload into- `mime_type` (string, optional) — MIME type of the file e.g. `text/plain`, `application/pdf`
Permanently deletes a file or folder. This action cannot be undone.
Inputs:
- `file_id` (string, required) — Google Drive file or folder ID to delete
output:
{ "message": "File/folder with ID 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs deleted successfully"}
Searches Drive using the full Drive query expression language and returns matching file metadata.
Inputs:
- `query` (string, required) — Drive query expression e.g. `name contains 'report'`, `mimeType='application/pdf'`- `page_size` (integer, optional) — Maximum number of results to return, capped at 1000. Default: `10`
output:
{ "count": 2, "files": [ { "id":
Grants a permission on a file, either to a specific user or to anyone with the link.
Inputs:
- `file_id` (string, required) — Google Drive file ID- `email` (string, optional) — Recipient email address when sharing with a specific user- `role` (string, optional) — Permission role. Values: `reader`, `commenter`, `writer`. Default: `reader`- `share_type` (string, optional) — Permission type. Values: `user`, `group`, `domain`, `anyone`. Defaults to `user` if email is provided, otherwise `anyone`
Reads and returns the decoded text content of a file directly, without saving to disk.
Inputs:
- `file_id` (string, required) — Google Drive file ID
output:
"The full decoded text content of the file as a string."
API Parameters Reference
file_id — Unique Google Drive file or folder identifier. Obtain from list_files, search_files, or any file response.
folder_id — ID of a Drive folder. Use list_files or search_files with mimeType='application/vnd.google-apps.folder' to find folder IDs.
page_size — Limits the number of items returned. Always capped at 1000.
Drive Query Syntax (query parameter):
name contains 'report' — Files with "report" in namename = 'budget.xlsx' — Exact filename matchmimeType = 'application/pdf' — Files of a specific MIME typemimeType = 'application/vnd.google-apps.folder' — Folders only'folder_id' in parents — Files inside a specific foldermodifiedTime > '2024-01-01T00:00:00' — Files modified after a datefullText contains 'quarterly' — Files containing text (Docs/Sheets only)
Troubleshooting
Cause: API key not provided in request headers or incorrect format
Solution:
Verify Authorization: Bearer YOUR_API_KEY and X-Mewcp-Credential-Id: CREDENTIAL-ID headers are present
Check API key is active in your MewCP account
Cause: API calls have exceeded your request limits
Solution:
Check credit usage in your Curious Layer dashboard
Upgrade to a paid plan or add credits for higher limits
Contact support for credit adjustments
Cause: No Google Drive credential linked to your account
Solution:
Go to Credentials in your MewCP dashboard
Connect your Google account via OAuth
Retry the request with the correct X-Mewcp-Credential-Id header
Cause: JSON payload is invalid or missing required fields