Labsco
AStheTECH logo

MewCP Google Drive MCP

β˜… 1

from AStheTECH

Hosted, Stateless & Multitenant Google Drive MCP server enables AI assistants to access, organize, search, and manage files through Google Drive.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

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

<details> <summary><code>list_files</code> β€” List files in Google Drive</summary>

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`

Output:

{
  "count": 3,
  "files": [
    {
      "id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs",
      "name": "report.pdf",
      "mimeType": "application/pdf",
      "size": "204800",
      "createdTime": "2024-01-15T10:00:00.000Z",
      "modifiedTime": "2024-03-20T14:30:00.000Z",
      "webViewLink": "https://drive.google.com/file/d/..."
    }
  ]
}
</details> <details> <summary><code>get_file_metadata</code> β€” Get metadata for a specific file by ID</summary>

Returns the full metadata object for a single file or folder.

Inputs:

- `file_id` (string, required) β€” Google Drive file ID

Output:

{
  "id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs",
  "name": "report.pdf",
  "mimeType": "application/pdf",
  "size": "204800",
  "createdTime": "2024-01-15T10:00:00.000Z",
  "modifiedTime": "2024-03-20T14:30:00.000Z",
  "owners": [{ "displayName": "John Doe", "emailAddress": "john@example.com" }],
  "webViewLink": "https://drive.google.com/file/d/..."
}
</details> <details> <summary><code>download_file</code> β€” Download a file from Google Drive to local disk</summary>

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"
}
</details> <details> <summary><code>upload_file</code> β€” Upload a file to Google Drive</summary>

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`

Output:

{
  "message": "File uploaded successfully",
  "file": {
    "id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs",
    "name": "report.pdf",
    "webViewLink": "https://drive.google.com/file/d/..."
  }
}
</details> <details> <summary><code>create_folder</code> β€” Create a new folder in Google Drive</summary>

Creates a new folder, optionally nested inside a parent folder.

Inputs:

- `name` (string, required) β€” Folder name
- `parent_folder_id` (string, optional) β€” Parent folder ID to create the folder inside

Output:

{
  "message": "Folder created successfully",
  "folder": {
    "id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs",
    "name": "Projects",
    "webViewLink": "https://drive.google.com/drive/folders/..."
  }
}
</details> <details> <summary><code>delete_file</code> β€” Delete a file or folder from Google Drive</summary>

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"
}
</details> <details> <summary><code>search_files</code> β€” Search for files in Google Drive using advanced queries</summary>

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": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs",
      "name": "Q1 Report.pdf",
      "mimeType": "application/pdf",
      "webViewLink": "https://drive.google.com/file/d/..."
    }
  ]
}
</details> <details> <summary><code>share_file</code> β€” Share a file with a user or make it publicly accessible</summary>

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`

Output:

{
  "message": "File shared successfully",
  "permission_id": "anyoneWithLink",
  "webViewLink": "https://drive.google.com/file/d/.../view",
  "webContentLink": "https://drive.google.com/uc?id=..."
}
</details> <details> <summary><code>get_file_content</code> β€” Get the content of a text file from Google Drive</summary>

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."
</details>

API Parameters Reference

<details> <summary><strong>Common Parameters</strong></summary>
  • 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.
</details> <details> <summary><strong>Resource Formats</strong></summary>

Drive Query Syntax (query parameter):

name contains 'report'                          β€” Files with "report" in name
name = 'budget.xlsx'                            β€” Exact filename match
mimeType = 'application/pdf'                    β€” Files of a specific MIME type
mimeType = 'application/vnd.google-apps.folder' β€” Folders only
'folder_id' in parents                          β€” Files inside a specific folder
modifiedTime > '2024-01-01T00:00:00'            β€” Files modified after a date
fullText contains 'quarterly'                   β€” Files containing text (Docs/Sheets only)

Permission Roles:

reader     β€” View only
commenter  β€” View and comment
writer     β€” View, comment, and edit
</details>