A1 Google Drive MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ASKADS_TELEMETRY | No | Set to '0' to opt out of anonymous telemetry. | |
| GOOGLE_DRIVE_AP_BASE | No | Google APIs base URL override. | |
| GOOGLE_DRIVE_CLIENT_ID | No | OAuth client ID. Required as part of the OAuth trio unless using GOOGLE_DRIVE_ACCESS_TOKEN. | |
| GOOGLE_DRIVE_TIMEOUT_MS | No | Per-request timeout in milliseconds. | 60000 |
| GOOGLE_DRIVE_MAX_RETRIES | No | Temporary-error retries count. | 3 |
| GOOGLE_DRIVE_ACCESS_TOKEN | No | Short-lived (~1 hour) alternative to the OAuth trio. | |
| GOOGLE_DRIVE_CLIENT_SECRET | No | OAuth client secret. Required as part of the OAuth trio unless using GOOGLE_DRIVE_ACCESS_TOKEN. | |
| GOOGLE_DRIVE_REFRESH_TOKEN | No | OAuth refresh token. Required as part of the OAuth trio unless using GOOGLE_DRIVE_ACCESS_TOKEN. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| auth_statusA | Shows whether this server is connected to Google: token presence and source (env variables or a stored in-chat login), expiry, the Google account email, granted vs missing OAuth scopes, where the credentials file lives and where the OAuth client comes from. Makes no network calls and never returns the token itself. Call it first when other tools report the server is not connected. |
| setup_instructionsA | Step-by-step checklist for connecting this server to Google: creating a Google Cloud project and a Desktop-app OAuth client, publishing the consent screen (mandatory — Testing-mode refresh tokens die after 7 days), downloading the client JSON and handing its PATH to set_client. Works without any credentials; the checklist shortens to 'enable the API + log in' when an OAuth client is already configured (one client serves the whole mcp-google-* line). Never asks the user to paste secrets into the chat. |
| set_clientA | Saves the OAuth client credentials from the JSON file downloaded from Google Cloud Console ('Download JSON' on a Desktop-app client). Pass the file PATH — the secret must never be pasted into the chat. The client is stored once in the shared ~/.config/mcp-google-auth/client.json (owner-only) and reused by every mcp-google-* server; tokens stay per-server. After this, call start_login. |
| start_loginA | First step of connecting from the chat, without editing config files or restarting the client. Returns authorizeUrl — show it to the user as a clickable link and ask them to open it in the browser ON THIS MACHINE, pick the Google account and approve access. A one-shot listener on 127.0.0.1 catches Google's redirect; the code is exchanged locally and never passes through the chat. Does not open the browser itself. The attempt lives 10 minutes; when the browser shows the success page, call finish_login. |
| finish_loginA | Second step: confirms the browser consent finished, saves the tokens to an owner-only file and verifies the login with a read-only identity call, returning the account email and the granted scopes. After success every tool works immediately — no client restart. If the user granted only part of the requested permissions, the login is still saved and missingScopes lists what will not work. Logging in under a different Google account replaces the previous login (its refresh token is revoked best-effort) and the response carries previousAccountEmail so the change never goes unnoticed. |
| logoutA | Revokes the stored token at Google (oauth2.googleapis.com/revoke) and deletes the local credentials file. Tokens supplied via env variables are NOT touched — remove them from the MCP client config manually; envTokenStillSet in the response says whether any are still in effect. |
| search_filesA | Searches and lists files and folders: id, name, mimeType, size, parents, driveId, modifiedTime, trashed, starred, webViewLink and shortcutDetails per file, plus nextPageToken. The convenience filters (name_contains, full_text_contains, mime_type, parent_id, only_folders) are AND-ed together and with the raw Drive |
| list_shared_drivesA | Lists the shared drives (formerly Team Drives) the authorized user is a member of: id, name, createdTime, plus nextPageToken. Use a drive's id as drive_id in search_files to browse its contents, or as parent_id to list its root. name_contains filters by name. My Drive is not a shared drive and never appears here. |
| get_fileA | Returns a file's metadata (never its content — that is download_file/export_file): id, name, mimeType, size, parents, driveId, createdTime/modifiedTime, trashed, starred, description, md5Checksum, webViewLink, webContentLink, exportLinks (for Google-native files), owners, lastModifyingUser, shortcutDetails (a shortcut's real target id/mimeType) and capabilities (canEdit/canShare/canTrash/canDelete/canDownload — check before mutating). Google-native files (mimeType application/vnd.google-apps.*) report no size and no md5Checksum. Pass fields to select a custom projection (Drive fields syntax) when the default set is too much or too little. |
| create_folderA | Creates a folder (a Drive file with mimeType application/vnd.google-apps.folder) and returns its id, name, parents and webViewLink. parent_id places it inside a folder or a shared drive ('root' or omitted = My Drive top level). Drive allows several folders with the same name in the same parent — search_files first if the folder might already exist, and reuse its id instead of creating a duplicate. |
| copy_fileA | Copies a file and returns the new copy's metadata (a fresh fileId — the original is untouched). name renames the copy (default: same name as the original, NOT 'Copy of ...'); parent_id places it in a folder (default: same parent as the original for My Drive files). Works on Google-native files (Docs/Sheets/Slides) and binaries alike, but folders cannot be copied — recreate the tree with create_folder + copy_file per file. Comments and permissions are not copied. Each retry would create another copy, so after an ambiguous failure check with search_files before calling again. |
| move_fileA | Moves a file or folder into another folder (or shared drive) and returns id, name and the new parents. By default the file leaves all its current parents (a plain move); keep_existing_parents=true only adds the new parent — note that files in shared drives always have exactly one parent, so keeping old parents fails there. Moving between My Drive and a shared drive changes ownership rules and may be rejected by the drive's settings. The move costs one extra read (the current parents are fetched first). |
| update_file_metadataA | Renames a file and/or updates its description and starred flag — metadata only, the content is untouched (that is upload_file with file_id). Only the provided fields change; at least one is required. Works on folders too (folders are files). Returns id, name, description, starred and the new modifiedTime. Moving lives in move_file, trashing in trash_file. |
| upload_fileA | Uploads content to Drive and returns the file's metadata. Without file_id it CREATES a new file (name required; parent_id places it); with file_id it REPLACES that file's content in place (same id, new bytes) — name/parent_id are ignored then. The bytes come from exactly one of |
| download_fileA | Downloads a binary file's bytes. With save_path (absolute local path) the file is written to disk (refuses to overwrite unless overwrite=true) and the result reports saved_to/bytes; without save_path small textual files (≤100 KB, text/JSON/XML) are returned inline as |
| export_fileA | Exports (converts) a Google-native file — Doc, Sheet, Slides, Drawing — to a regular format. mime_type picks the target: Docs → text/markdown, text/plain, text/html, application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document (.docx), application/rtf; Sheets → text/csv (FIRST sheet only), application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.xlsx); Slides → application/pdf, text/plain, application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx); Drawings → image/png, image/svg+xml, application/pdf. With save_path the result is written to disk; without it small textual exports (≤100 KB) come back inline as |
| trash_fileA | action=trash moves a file (or folder, with everything inside) to the Drive trash; action=restore brings it back. Trashing is REVERSIBLE — the file stays recoverable until the trash auto-purges it after ~30 days — and is the safe default whenever a user asks to 'delete' something: only use delete_file_forever when they explicitly want it gone beyond recovery. Trashed files disappear from search_files unless include_trashed=true. Only the owner (or a shared-drive member with the right role) can trash; restore puts the file back at its old parent. Returns id, name, trashed and explicitlyTrashed. |
| delete_file_foreverA | PERMANENTLY deletes a file, BYPASSING the trash — there is no undo, no 30-day grace period, and a folder takes every descendant with it. This is NOT the same as trash_file: when a user says 'delete', they almost always mean the reversible trash — use trash_file unless they explicitly confirmed permanent, unrecoverable deletion. Requires ownership (or organizer on a shared drive). Returns {ok:true} on success (the API responds with an empty 204). |
| manage_permissionsA | Manages who can access a file. action=list shows the grants (id, type, role, emailAddress/domain, expirationTime, pendingOwner). action=share grants access: type=user/group (needs email_address), domain (needs domain), or anyone (link sharing; allow_file_discovery=true also makes it searchable); role=reader, commenter, writer, fileOrganizer/organizer (shared drives only) or owner. Sharing with a user emails them by default — send_notification_email=false suppresses it (not allowed for ownership transfers); email_message adds a note. action=update changes an existing grant's role (needs permission_id from list); action=remove revokes it. Ownership transfer: role=owner with transfer_ownership=true — between personal accounts this only INVITES the new owner (pendingOwner until they accept). Changes are live immediately; removing your own access to someone else's file is irreversible from your side. role=owner/organizer grants full control including permanent deletion — prefer writer or less. |
| manage_commentsA | Manages Drive comments on a file (Docs, Sheets, Slides, PDFs, images...). action=list pages through comments with their replies and resolved state (page_token; include_deleted shows tombstones); get fetches one (needs comment_id). create adds a comment (needs content; quoted_text attaches the passage it refers to — display only; positional anchoring inside a Doc's text is not possible through this API, such comments appear file-level). reply answers a thread (needs comment_id + content). resolve / reopen close or reopen a thread (need comment_id; optional content adds a closing note). delete removes a comment and its replies permanently (needs comment_id; author only). Comments carry author, createdTime/modifiedTime, resolved and quotedFileContent. Not for Docs suggestions — those are a Docs feature this API cannot touch. |
| raw_requestA | Escape hatch to call any Google Drive API v3 path directly, for requests the typed tools don't cover — e.g. revisions ("drive/v3/files//revisions"), changes ("drive/v3/changes?pageToken=..."), shortcut creation (POST "drive/v3/files" with shortcutDetails), emptying the trash (DELETE "drive/v3/files/trash"), generateIds, or starting a resumable upload session (POST "upload/drive/v3/files?uploadType=resumable"). The path is relative to https://www.googleapis.com and may carry a query string (remember supportsAllDrives=true for shared-drive items). The Bearer token is added automatically; the method defaults to GET; the response must be JSON (binary media downloads belong to download_file/export_file). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 21 tools
Each tool targets a clearly distinct action or resource: the auth flow is split into unambiguous steps (start_login vs finish_login vs auth_status), file operations are separated by purpose (upload_file vs copy_file, download_file vs export_file, trash_file vs delete_file_forever), and permission/comment management have dedicated scopes. No two tools appear to do the same thing.
The vast majority of names follow a clear snake_case verb_noun pattern (get_file, search_files, create_folder, move_file, etc.), but a few deviate—auth_status and setup_instructions are noun-first, logout is a bare verb, and raw_request uses an adjective_noun form. These exceptions are minor and still readable, so consistency is high overall.
21 tools is on the heavy side for a single server, but each tool covers a distinct, non-overlapping operation in a broad Google Drive domain. The auth flow uses six tools for a multi-step login, which is justified by step separation rather than redundancy.
The surface provides full lifecycle coverage: authentication, file CRUD/search, folder operations, upload/download/export, permissions, comments, shared drives, and both reversible and permanent deletion. raw_request explicitly covers remaining gaps like revisions, changes, shortcut creation, and resumable uploads, so there are no obvious dead ends.