# Google Drive — how to use (mcp.ai)

Search, read and organize Google Drive files from your AI agent.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_googledrive?ms=1781353080000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `googledrive_list`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/googledrive`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/googledrive/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/googledrive/add/file/sharing/preference` — Modifies sharing permissions for an existing google drive file, granting a specified role to a user, group, domain, or 'anyone'.
  - body: { role: string, type: string, domain?: string, file_id: string, email_address?: string }
- `POST https://api.mcp.ai/api/googledrive/copy/file` — Duplicates an existing file in google drive, identified by its `file id`.
  - body: { file_id: string, new_title?: string }
- `POST https://api.mcp.ai/api/googledrive/create/comment` — Tool to create a comment on a file. use when you need to add a new comment to a specific file in google drive.
  - body: { anchor?: string, content: string, file_id: string, quoted_file_content_value?: string, quoted_file_content_mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/create/drive` — Tool to create a new shared drive. use when you need to programmatically create a new shared drive for collaboration or storage.
  - body: { name: string, hidden?: boolean, themeId?: string, colorRgb?: string, requestId: string, backgroundImageFile?: object }
- `POST https://api.mcp.ai/api/googledrive/create/file` — Creates a new file or folder with metadata. use to create empty files or folders, or files with content by providing it in the request body (though this action primarily focuses on metadata creation).
  - body: { name?: string, fields?: string, parents?: string[], starred?: boolean, mimeType?: string, description?: string }
- `POST https://api.mcp.ai/api/googledrive/create/file/from/text` — Creates a new file in google drive from provided text content (up to 10mb), supporting various formats including automatic conversion to google workspace types.
  - body: { file_name: string, mime_type?: string, parent_id?: string, text_content: string }
- `POST https://api.mcp.ai/api/googledrive/create/folder` — Creates a new folder in google drive, optionally within a parent folder specified by its id or name; if a parent name is provided but not found, the action will fail.
  - body: { parent_id?: string, folder_name: string }
- `POST https://api.mcp.ai/api/googledrive/create/reply` — Tool to create a reply to a comment in google drive. use when you need to respond to an existing comment on a file.
  - body: { action?: string, fields?: string, content: string, file_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/create/shortcut/to/file` — Tool to create a shortcut to a file or folder in google drive. use when you need to link to an existing drive item from another location without duplicating it.
  - body: { name: string, target_id: string, includeLabels?: string, target_mime_type?: string, supportsAllDrives?: boolean, keepRevisionForever?: boolean, ignoreDefaultVisibility?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/delete/comment` — Deletes a comment from a file. use when you need to remove a specific comment from a google drive file.
  - body: { file_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/delete/drive` — Tool to permanently delete a shared drive. use when you need to remove a shared drive and its contents (if specified).
  - body: { driveId: string, allowItemDeletion?: boolean, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/delete/permission` — Deletes a permission from a file by permission id. use when you need to revoke access for a specific user or group from a file.
  - body: { file_id: string, permission_id: string, supportsAllDrives?: boolean, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/delete/reply` — Tool to delete a specific reply by reply id. use when you need to remove a reply from a comment on a file.
  - body: { file_id: string, reply_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/download/file` — Downloads a file from google drive by its id. for google workspace documents (docs, sheets, slides), optionally exports to a specified `mime type`. for other file types, downloads in their native form
  - body: { file_id: string, mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/edit/file` — Updates an existing google drive file by overwriting its entire content with new text (max 10mb).
  - body: { content: string, file_id: string, mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/empty/trash` — Tool to permanently delete all of the user's trashed files. use when you want to empty the trash in google drive.
  - body: { driveId?: string, enforceSingleParent?: boolean }
- `POST https://api.mcp.ai/api/googledrive/files/modify/labels` — Modifies the set of labels applied to a file. returns a list of the labels that were added or modified. use when you need to programmatically change labels on a google drive file, such as adding, upda
  - body: { kind?: string, file_id: string, label_modifications: object[] }
- `POST https://api.mcp.ai/api/googledrive/find/file` — Tool to list or search for files and folders in google drive. use when you need to find specific files based on query criteria or list contents of a drive/folder.
  - body: { q?: string, fields?: string, spaces?: string, corpora?: string, driveId?: string, orderBy?: string, pageSize?: integer, pageToken?: string, supportsAllDrives?: boolean, includeItemsFromAllDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/find/folder` — Tool to find a folder in google drive by its name and optionally a parent folder. use when you need to locate a specific folder to perform further actions like creating files in it or listing its cont
  - body: { starred?: boolean, name_exact?: string, name_contains?: string, modified_after?: string, name_not_contains?: string, full_text_contains?: string, full_text_not_contains?: string }
- `POST https://api.mcp.ai/api/googledrive/generate/ids` — Generates a set of file ids which can be provided in create or copy requests. use when you need to pre-allocate ids for new files or copies.
  - body: { type?: string, count?: integer, space?: string }
- `POST https://api.mcp.ai/api/googledrive/get/about` — Tool to retrieve information about the user, the user's drive, and system capabilities. use when you need to check storage quotas, user details, or supported import/export formats.
  - body: { fields?: string }
- `POST https://api.mcp.ai/api/googledrive/get/changes/start/page/token` — Tool to get the starting pagetoken for listing future changes in google drive. use this when you need to track changes to files and folders.
  - body: { driveId?: string, teamDriveId?: string, supportsAllDrives?: boolean, supportsTeamDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/comment` — Tool to get a comment by id. use when you need to retrieve a specific comment from a google drive file and have both the file id and comment id.
  - body: { fileId: string, commentId: string, includeDeleted?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/drive` — Tool to get a shared drive by id. use when you need to retrieve information about a specific shared drive.
  - body: { drive_id: string, use_domain_admin_access?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/file/metadata` — Tool to get a file's metadata by id. use when you need to retrieve the metadata for a specific file in google drive.
  - body: { fileId: string, includeLabels?: string, acknowledgeAbuse?: boolean, supportsAllDrives?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/get/permission` — Gets a permission by id. use this tool to retrieve a specific permission for a file or shared drive.
  - body: { file_id: string, permission_id: string, supports_all_drives?: boolean, use_domain_admin_access?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/reply` — Tool to get a specific reply to a comment on a file. use when you need to retrieve the details of a particular reply.
  - body: { fileId: string, replyId: string, commentId: string, includeDeleted?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/revision` — Tool to get a specific revision's metadata by revision id. use when you need to retrieve information about a particular version of a file.
  - body: { file_id: string, revision_id: string, acknowledge_abuse?: boolean }
- `POST https://api.mcp.ai/api/googledrive/google/drive/delete/folder/or/file/action` — Tool to delete a file or folder in google drive. use when you need to permanently remove a specific file or folder using its id. note: this action is irreversible.
  - body: { fileId: string, supportsAllDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/hide/drive` — Tool to hide a shared drive from the default view. use when you want to remove a shared drive from the user's main google drive interface without deleting it.
  - body: { drive_id: string }
- `POST https://api.mcp.ai/api/googledrive/list/changes` — Tool to list the changes for a user or shared drive. use when you need to track modifications to files and folders, such as creations, deletions, or permission changes. this action requires a `pagetok
  - body: { spaces?: string, driveId?: string, pageSize?: integer, pageToken: string, includeLabels?: string, includeRemoved?: boolean, restrictToMyDrive?: boolean, supportsAllDrives?: boolean, includeCorpusRemovals?: boolean, includeItemsFromAllDrives?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/list/comments` — Tool to list all comments for a file in google drive. use when you need to retrieve comments associated with a specific file.
  - body: { fields?: string, fileId: string, pageSize?: integer, pageToken?: string, includeDeleted?: boolean, startModifiedTime?: string }
- `POST https://api.mcp.ai/api/googledrive/list/file/labels` — Tool to list the labels on a file. use when you need to retrieve all labels associated with a specific file in google drive.
  - body: { file_id: string, page_token?: string, max_results?: integer }
- `POST https://api.mcp.ai/api/googledrive/list/files` — Tool to list a user's files and folders in google drive. use this to search or browse for files and folders based on various criteria.
  - body: { q?: string, fields?: string, spaces?: string, corpora?: string, driveId?: string, orderBy?: string, folderId?: string, pageSize?: integer, pageToken?: string, includeLabels?: string, supportsAllDrives?: boolean, includeItemsFromAllDrives?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/list/permissions` — Tool to list a file's permissions. use when you need to retrieve all permissions associated with a specific file or shared drive.
  - body: { fileId: string, pageSize?: integer, pageToken?: string, supportsAllDrives?: boolean, useDomainAdminAccess?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/list/replies/to/comment` — Tool to list replies to a comment in google drive. use this when you need to retrieve all replies associated with a specific comment on a file.
  - body: { fields?: string, file_id: string, page_size?: integer, comment_id: string, page_token?: string, include_deleted?: boolean }
- `POST https://api.mcp.ai/api/googledrive/list/revisions` — Tool to list a file's revisions. use when you need to retrieve the revision history of a specific file in google drive.
  - body: { fileId: string, pageSize?: integer, pageToken?: string, supportsAllDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/list/shared/drives` — Tool to list the user's shared drives. use when you need to get a list of all shared drives accessible to the authenticated user.
  - body: { q?: string, pageSize?: integer, pageToken?: string, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/move/file` — Tool to move a file from one folder to another in google drive. use when you need to reorganize files by changing their parent folder(s).
  - body: { file_id: string, add_parents?: string, ocr_language?: string, include_labels?: string, remove_parents?: string, supports_all_drives?: boolean, keep_revision_forever?: boolean, include_permissions_for_view?: string, use_content_as_indexable_text?: boolean }
- `POST https://api.mcp.ai/api/googledrive/parse/file` — Deprecated: exports google workspace files (max 10mb) to a specified format using `mime type`, or downloads other file types; use `googledrive download file` instead.
  - body: { file_id: string, mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/stop/watch/channel` — Tool to stop watching resources through a specified channel. use this when you want to stop receiving notifications for a previously established watch.
  - body: { id: string, kind?: string, token?: string, params?: object, address?: string, payload?: boolean, expiration?: string, resourceId: string, channelType?: string, resourceUri?: string }
- `POST https://api.mcp.ai/api/googledrive/unhide/drive` — Tool to unhide a shared drive. use when you need to restore a shared drive to the default view.
  - body: { driveId: string }
- `POST https://api.mcp.ai/api/googledrive/untrash/file` — Tool to restore a file from the trash. use when you need to recover a deleted file. this action updates the file's metadata to set the 'trashed' property to false.
  - body: { file_id: string, supportsAllDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/comment` — Tool to update an existing comment on a google drive file. use when you need to change the content or status (e.g., resolve) of a comment.
  - body: { fields?: string, content?: string, file_id: string, resolved?: boolean, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/update/drive` — Tool to update the metadata for a shared drive. use when you need to modify properties like the name, theme, background image, or restrictions of a shared drive.
  - body: { name?: string, hidden?: boolean, driveId: string, themeId?: string, colorRgb?: string, restrictions?: object, backgroundImageFile?: object, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/file/put` — Updates file metadata. uses patch semantics (partial update) as per google drive api v3. use this tool to modify attributes of an existing file like its name, description, or parent folders. note: thi
  - body: { name?: string, file_id: string, starred?: boolean, mime_type?: string, add_parents?: string, description?: string, ocr_language?: string, remove_parents?: string, writers_can_share?: boolean, supports_all_drives?: boolean, keep_revision_forever?: boolean, use_domain_admin_access?: boolean, viewers_can_copy_content?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/file/revision/metadata` — Updates metadata of a file revision (e.g., keepforever, publish). use this tool to modify the metadata of a specific revision of a file in google drive.
  - body: { file_id: string, published?: boolean, publishAuto?: boolean, revision_id: string, keep_forever?: boolean, publishedOutsideDomain?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/permission` — Tool to update a permission with patch semantics. use when you need to modify an existing permission for a file or shared drive.
  - body: { fileId: string, permission: object, permissionId: string, removeExpiration?: boolean, supportsAllDrives?: boolean, transferOwnership?: boolean, useDomainAdminAccess?: boolean, enforceExpansiveAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/reply` — Tool to update a reply to a comment on a google drive file. use when you need to modify the content of an existing reply.
  - body: { fields: string, content: string, file_id: string, reply_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/upload/file` — Uploads a file (max 5mb) to google drive, moving it to a specified folder if a valid folder id is provided, otherwise uploads to root.
  - body: { file_to_upload: object, folder_to_upload_to?: string }
- `POST https://api.mcp.ai/api/googledrive/watch/changes` — Tool to subscribe to changes for a user or shared drive in google drive. use when you need to monitor a google drive for modifications and receive notifications at a specified webhook url.
  - body: { id: string, type: string, token?: string, params?: object, spaces?: string, address: string, drive_id?: string, page_size?: integer, expiration?: integer, page_token?: string, include_labels?: string, include_removed?: boolean, supports_all_drives?: boolean, restrict_to_my_drive?: boolean, include_corpus_removals?: boolean, include_permissions_for_view?: string, include_items_from_all_drives?: boolean }

## More
- Page: https://mcp.ai/googledrive
- Agent spec (llms.txt): https://mcp.ai/googledrive/llms.txt
- Postman collection: https://mcp.ai/googledrive/postman.json
