mcp-z avatar

Google Drive

io.github.mcp-z/mcp-drive

Connects Claude directly to the Google Drive API with search, navigation, and file management operations. You get tools for querying files by name or metadata, browsing folder hierarchies, creating new folders, moving items, and trashing content. Supports three auth modes: OAuth loopback for local use, service accounts for headless deployments, and DCR for self-hosted setups. The search tool uses Drive's native query syntax, and there's a folder-path resource for resolving full directory trees. Runs over stdio for desktop clients or HTTP for remote access. Reach for this when you need Claude to interact with Drive content beyond simple uploads, especially for organizing files, building folder structures, or surfacing documents based on search criteria.

tools
20
auth
Secret needed
transport
STDIO, HTTP
env vars
13
last updated
Oct 24, 2026

Tools

20 tools

Public tool metadata for what this MCP can expose to an agent.

GOOGLEDRIVE_ADD_FILE_SHARING_PREFERENCEModifies sharing permissions for an existing google drive file, granting a specified role to a user, group, domain, or 'anyone'.5 params

Modifies sharing permissions for an existing google drive file, granting a specified role to a user, group, domain, or 'anyone'.

Parameters* required
domainstring
Domain to grant permission to (e.g., 'example.com'). Required if 'type' is 'domain'.
email_addressstring
Email address of the user or group. Required if 'type' is 'user' or 'group'.
file_idstring
Unique identifier of the file to update sharing settings for.
rolestring
Permission role to grant.
typestring
Type of grantee for the permission.
GOOGLEDRIVE_COPY_FILEDuplicates an existing file in google drive, identified by its `file id`.2 params

Duplicates an existing file in google drive, identified by its `file id`.

Parameters* required
file_idstring
The unique identifier for the file on Google Drive that you want to copy. This ID can be retrieved from the file's shareable link or via other Google Drive API calls.
new_titlestring
The title to assign to the new copy of the file. If not provided, the copied file will have the same title as the original, prefixed with 'Copy of '.
GOOGLEDRIVE_CREATE_COMMENTTool to create a comment on a file. use when you need to add a new comment to a specific file in google drive.5 params

Tool to create a comment on a file. use when you need to add a new comment to a specific file in google drive.

Parameters* required
anchorstring
A JSON string representing the region of the document to which the comment is anchored (e.g., {'type': 'line', 'line': 12}).
contentstring
The plain text content of the comment.
file_idstring
The ID of the file.
quoted_file_content_mime_typestring
The MIME type of the quoted content.
quoted_file_content_valuestring
The quoted content itself.
GOOGLEDRIVE_CREATE_DRIVETool to create a new shared drive. use when you need to programmatically create a new shared drive for collaboration or storage.6 params

Tool to create a new shared drive. use when you need to programmatically create a new shared drive for collaboration or storage.

Parameters* required
backgroundImageFileobject
An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive.drives.update requests that don't set theme...
colorRgbstring
The color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId.
hiddenboolean
Whether the shared drive is hidden from default view.default: false
namestring
The name of this shared drive.
requestIdstring
An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid cr...
themeIdstring
The ID of the theme from which the background image and color will be set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.cre...
GOOGLEDRIVE_CREATE_FILECreates 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).6 params

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).

Parameters* required
descriptionstring
A short description of the file.
fieldsstring
A comma-separated list of fields to include in the response.
mimeTypestring
The MIME type of the file.
namestring
The name of the file.
parentsarray
The IDs of parent folders.
starredboolean
Whether the user has starred the file.
GOOGLEDRIVE_CREATE_FILE_FROM_TEXTCreates a new file in google drive from provided text content (up to 10mb), supporting various formats including automatic conversion to google workspace types.4 params

Creates a new file in google drive from provided text content (up to 10mb), supporting various formats including automatic conversion to google workspace types.

Parameters* required
file_namestring
Desired name for the new file on Google Drive.
mime_typestring
MIME type for the new file, determining how Google Drive interprets its content.default: text/plain
parent_idstring
ID of the parent folder in Google Drive; if omitted, the file is created in the root of 'My Drive'.
text_contentstring
Plain text content to be written into the new file.
GOOGLEDRIVE_CREATE_FOLDERCreates 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.2 params

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.

Parameters* required
folder_namestring
Name for the new folder.
parent_idstring
ID or name of the parent folder. If a name is provided, the action attempts to find it. If an ID is provided, it must be a valid Google Drive folder ID. If omitted, the folder is created in the Dri...
GOOGLEDRIVE_CREATE_REPLYTool to create a reply to a comment in google drive. use when you need to respond to an existing comment on a file.5 params

Tool to create a reply to a comment in google drive. use when you need to respond to an existing comment on a file.

Parameters* required
actionstring
The action the reply performed to the parent comment. Valid values are: resolve, reopen.
comment_idstring
The ID of the comment.
contentstring
The plain text content of the reply. HTML content is not supported.
fieldsstring
Selector specifying which fields to include in a partial response.
file_idstring
The ID of the file.
GOOGLEDRIVE_CREATE_SHORTCUT_TO_FILETool 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.8 params

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.

Parameters* required
ignoreDefaultVisibilityboolean
Whether to ignore the domain's default visibility settings for the created file.
includeLabelsstring
A comma-separated list of IDs of labels to include in the labelInfo part of the response.
includePermissionsForViewstring
Specifies which additional view's permissions to include in the response. Only 'published' is supported.
keepRevisionForeverboolean
Whether to set the 'keepForever' field in the new head revision.
namestring
The name of the shortcut.
supportsAllDrivesboolean
Whether the requesting application supports both My Drives and shared drives. Recommended to set to true if interacting with shared drives.
target_idstring
The ID of the file or folder that this shortcut points to.
target_mime_typestring
The MIME type of the target file or folder. While optional, providing it can be helpful.
GOOGLEDRIVE_DELETE_COMMENTDeletes a comment from a file. use when you need to remove a specific comment from a google drive file.2 params

Deletes a comment from a file. use when you need to remove a specific comment from a google drive file.

Parameters* required
comment_idstring
The ID of the comment.
file_idstring
The ID of the file.
GOOGLEDRIVE_DELETE_DRIVETool to permanently delete a shared drive. use when you need to remove a shared drive and its contents (if specified).3 params

Tool to permanently delete a shared drive. use when you need to remove a shared drive and its contents (if specified).

Parameters* required
allowItemDeletionboolean
Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`.
driveIdstring
The ID of the shared drive.
useDomainAdminAccessboolean
Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.
GOOGLEDRIVE_DELETE_PERMISSIONDeletes a permission from a file by permission id. use when you need to revoke access for a specific user or group from a file.4 params

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.

Parameters* required
file_idstring
The ID of the file or shared drive.
permission_idstring
The ID of the permission.
supportsAllDrivesboolean
Whether the requesting application supports both My Drives and shared drives.
useDomainAdminAccessboolean
Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the...
GOOGLEDRIVE_DELETE_REPLYTool to delete a specific reply by reply id. use when you need to remove a reply from a comment on a file.3 params

Tool to delete a specific reply by reply id. use when you need to remove a reply from a comment on a file.

Parameters* required
comment_idstring
The ID of the comment.
file_idstring
The ID of the file.
reply_idstring
The ID of the reply.
GOOGLEDRIVE_DOWNLOAD_FILEDownloads 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 format regardless of mime type.2 params

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 format regardless of mime type.

Parameters* required
file_idstring
The unique identifier of the file to be downloaded from Google Drive. This ID can typically be found in the file's URL in Google Drive or obtained from API calls that list files.
mime_typestring
Target MIME type for exporting Google Workspace documents (e.g., Google Doc, Sheet, Slide). Supported export formats vary by file type; e.g., text/plain is only supported for Google Docs, not Sheet...one of application/vnd.openxmlformats-officedocument.wordprocessingml.document · application/vnd.oasis.opendocument.text · application/rtf · application/pdf · text/plain · application/zip
GOOGLEDRIVE_EDIT_FILEUpdates an existing google drive file by overwriting its entire content with new text (max 10mb).3 params

Updates an existing google drive file by overwriting its entire content with new text (max 10mb).

Parameters* required
contentstring
New textual content to overwrite the existing file; will be UTF-8 encoded for upload.
file_idstring
Identifier of the Google Drive file to update.
mime_typestring
MIME type of the 'content' being uploaded; must accurately represent its format.default: text/plain
GOOGLEDRIVE_EMPTY_TRASHTool to permanently delete all of the user's trashed files. use when you want to empty the trash in google drive.2 params

Tool to permanently delete all of the user's trashed files. use when you want to empty the trash in google drive.

Parameters* required
driveIdstring
If set, empties the trash of the provided shared drive. This parameter is ignored if the item is not in a shared drive.
enforceSingleParentboolean
Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root. This parameter is ignored if the item is n...
GOOGLEDRIVE_FILES_MODIFY_LABELSModifies 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, updating, or removing them.3 params

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, updating, or removing them.

Parameters* required
file_idstring
The ID of the file.
kindstring
This is always drive#modifyLabelsRequest.default: drive#modifyLabelsRequest
label_modificationsarray
The list of modifications to apply to the labels on the file.
GOOGLEDRIVE_FIND_FILETool 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.10 params

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.

Parameters* required
corporastring
Corpora to query. 'user' for user's personal files, 'drive' for files in a specific shared drive (requires 'driveId'), 'domain' for files shared with the domain, 'allDrives' for all drives the user...one of user · drive · domain · allDrives
driveIdstring
ID of the shared drive to search. Required if 'corpora' is 'drive'.
fieldsstring
Selector specifying which fields to include in a partial response. Use '*' for all fields or a comma-separated list, e.g., 'nextPageToken,files(id,name,mimeType)'.default: *
includeItemsFromAllDrivesboolean
Whether both My Drive and shared drive items should be included in results. If true, 'supportsAllDrives' should also be true.default: false
orderBystring
A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred',...
pageSizeinteger
The maximum number of files to return per page.default: 100
pageTokenstring
The token for continuing a previous list request on the next page.
qstring
A query for filtering the file results. See Google Drive API documentation for query syntax. Example: \"name contains 'report' and mimeType = 'application/pdf'\"
spacesstring
A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.default: drive
supportsAllDrivesboolean
Whether the requesting application supports both My Drives and shared drives. If 'includeItemsFromAllDrives' is true, this must also be true.default: true
GOOGLEDRIVE_FIND_FOLDERTool 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 contents.7 params

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 contents.

Parameters* required
full_text_containsstring
A string to search for within the full text content of files within folders (if applicable and supported by Drive for the folder type or its contents). This search is case-insensitive.
full_text_not_containsstring
A string to exclude from the full text content of files within folders. This search is case-insensitive.
modified_afterstring
Search for folders modified after a specific date and time. The timestamp must be in RFC 3339 format (e.g., '2023-01-15T10:00:00Z' or '2023-01-15T10:00:00.000Z').
name_containsstring
A substring to search for within folder names. This search is case-insensitive.
name_exactstring
The exact name of the folder to search for. This search is case-sensitive.
name_not_containsstring
A substring to exclude from folder names. Folders with names containing this substring will not be returned. This search is case-insensitive.
starredboolean
Set to true to search for folders that are starred, or false for those that are not.
GOOGLEDRIVE_GENERATE_IDSGenerates 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.3 params

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.

Parameters* required
countinteger
The number of IDs to return. Value must be between 1 and 1000, inclusive.
spacestring
The space in which the IDs can be used. Supported values are 'drive' and 'appDataFolder'.
typestring
The type of items for which the IDs can be used. For example, 'files' or 'shortcuts'.

Sponsors

Configuration

GOOGLE_CLIENT_ID*

Google OAuth client ID (required for OAuth authentication modes)

GOOGLE_CLIENT_SECRETsecret

Google OAuth client secret (optional for public clients)

GOOGLE_SERVICE_ACCOUNT_KEY_FILE

Path to service account JSON key file (required for service-account auth mode)

AUTH_MODEdefault: loopback-oauth

Authentication mode

HEADLESSdefault: false

Disable browser auto-open, return auth URL instead (true/false)

REDIRECT_URI

OAuth redirect URI (optional, default: ephemeral loopback)

RESOURCE_STORE_URIdefault: file://~/.mcp-z/mcp-drive/files

Resource store URI for exported files (file://)

PORT

HTTP server port (overrides --port)

BASE_URL

Base URL for HTTP transport (used for OAuth/DCR endpoints and file links)

LOG_LEVELdefault: info

Logging level

DCR_MODEdefault: self-hosted

Dynamic Client Registration mode

DCR_VERIFY_URL

External verification endpoint URL (required for external DCR mode)

DCR_STORE_URIdefault: file://~/.mcp-z/mcp-drive/dcr.json

DCR client storage URI (for self-hosted DCR mode)

Details

Website
github.com/mcp-z/mcp-drive#readme
Category
Search & Web Crawling
Package
@mcp-z/mcp-drive
Transport
STDIO, HTTP
Auth
Required
Registry
MCP registry, active

More from mcp-z

Related Search & Web Crawling MCP servers

View all
1mcp-z avatarGmailio.github.mcp-z/mcp-gmailGmail integration with OAuth authentication, message search, batch operations, and Sheets export0stars
2mcp-z avatarOutlookio.github.mcp-z/mcp-outlookOutlook integration with OAuth, message search, batch operations, and calendar management0stars
3metamorphosis-sre avatarDevdrops Propertymetamorphosis-sre/devdropsUK property MCP: Land Registry prices, company charges, House Price Index. x402 USDC on Base.0stars
4mister-franklin avatarGdpr Decisionsmister-franklin/mcp-gdpr-decisionsEU GDPR decisions by thedpo.eu — search all EU DPA decisions and recommendations0stars
5mwbidwell avatarBionic Formsio.github.mwbidwell/bionicforms-mcpRead, search and add records in your Bionic Forms apps (hosted database apps for small teams).0stars
6jtr-holidays avatarJtr Holidaysjtr-holidays/jtr-holidays-mcpSearch tours, attraction tickets, and holiday packages across 24 countries.0stars