Google Drive

Google Drive

Let your AI work in Google Drive: search files and folders in My Drive and shared drives, read Google Docs, Sheets and Slides as text, see details, comments and who has access, create folders and text files (or new Docs and Sheets from text), copy, rename, move, share and trash. Personal Google accounts and Google Workspace.

7-day free trial · No credit card · EU-hosted

Ask Google anything

Try a real prompt against Google Drive via AnythingMCP — Claude calls the tools, returns the answer. Press Enter on your own message to install on Cloud.

Install Google on Cloud
Google Drive · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

Setup in 2 minutes

  1. 1Start a free trial on cloud.anythingmcp.com.
  2. 2Click Google Drive in the connector store. Paste credentials when prompted.
  3. 3Mint an MCP API key and point your AI client at the generated MCP URL.
Install Google Drive now

Guides for Google

Step-by-step setup for the most popular AI clients.

Setting up Google Drive

From the connector definition itself: where to find the credentials, what they need to be allowed to do, and which API this adapter talks to.

Google Drive

This connector searches, reads and organises the signed-in user's Google Drive through the Google Drive API v3 (https://www.googleapis.com/drive/v3): My Drive, files shared with the user and shared drives. It exports Google Docs, Sheets and Slides as text, creates folders and text files, copies, renames, moves, shares and trashes. It works with personal Google accounts and Google Workspace, as the Google account that authorized the connector.

Setup (one-time, about 10 minutes)

  1. Open https://console.cloud.google.com, pick or create a project, then APIs & Services → Library → enable Google Drive API.
  2. APIs & Services → OAuth consent screen: choose Internal if you are on Google Workspace (simplest), otherwise External. For External, set the publishing status to In production: while an app is in Testing, Google revokes its refresh tokens after 7 days and the connector stops working every week. For your own use, the "unverified app" warning can be clicked through.
  3. APIs & Services → Credentials → Create credentials → OAuth client ID → application type Web application → add the authorized redirect URI <your AnythingMCP URL>/api/mcp-oauth/callback (on AnythingMCP Cloud: https://cloud.anythingmcp.com/api/mcp-oauth/callback).
  4. Paste the client ID and secret into GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET and install the connector.
  5. On the connector page, click Authorize with Provider and sign in with the Google account whose Drive the AI should use. The refresh token is stored encrypted and access tokens are renewed automatically.

One Google client for all Google connectors: the same Cloud project and OAuth client can serve every Google connector (Gmail, Google Calendar, Google Drive, Google Sheets, Google Docs, Google Tasks, Search Console, Analytics, Ads). Enable each API in that project, reuse the same GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, and authorize each connector once: each one asks only for its own scopes.

Google verification (restricted scope): Google classifies drive and drive.readonly as restricted scopes. An External app that other people use needs Google's OAuth app verification, which for restricted scopes includes a security assessment; until then Google shows a "Google hasn't verified this app" warning and caps the app at 100 users. An Internal app, used only by accounts of the Workspace organisation that owns the Cloud project, needs no verification. For your own account, an External app In production works after you continue past the warning.

Scope: the connector asks for https://www.googleapis.com/auth/drive, because searching and reading files the connector did not create needs full Drive access; narrower scopes such as drive.file only see files the app created itself. For a read-only setup, change the scope to https://www.googleapis.com/auth/drive.readonly in the connector's OAuth settings, authorize again, and disable gdrive_create_folder, gdrive_create_text_file, gdrive_copy_file, gdrive_update_file, gdrive_share_file and gdrive_trash_file.

Switched off at install: gdrive_trash_file and gdrive_share_file. Turn them on per tool if the AI should move files to the trash or share files: sharing gives other people access to the user's files, and a document the AI reads could ask it to share something. Nothing here deletes permanently.

Ids: every file and folder has an id, the long string in its link: https://docs.google.com/document/d/<id>/edit, https://docs.google.com/spreadsheets/d/<id>/edit, https://drive.google.com/file/d/<id>/view, https://drive.google.com/drive/folders/<id>. The root of My Drive is root. Shared drives have ids from gdrive_list_shared_drives.

Searching (q): combine conditions with and, or, not and parentheses; strings use single quotes.

  • name contains 'invoice', name = 'Budget 2026', fullText contains 'purchase order' (searches content too).
  • mimeType = 'application/vnd.google-apps.folder' (folders), 'application/vnd.google-apps.document' (Docs), 'application/vnd.google-apps.spreadsheet' (Sheets), 'application/vnd.google-apps.presentation' (Slides), 'application/pdf'.
  • '<folderId>' in parents lists a folder's direct children ('root' in parents for the top of My Drive); '[email protected]' in owners; sharedWithMe; starred.
  • modifiedTime > '2026-10-01T00:00:00' (RFC 3339, UTC unless an offset is given).
  • Add trashed = false unless the user asks about the trash: without it results include trashed files. Searches include shared drives the user belongs to. With corpora: "allDrives" Google may answer incompleteSearch: true; narrow the query or search one shared drive with corpora: "drive" and drive_id.

Reading content: gdrive_export_file returns Google Docs as text/plain, text/markdown or text/html, Sheets as text/csv or text/tab-separated-values (first sheet only; the Google Sheets connector reads any range of any sheet), Slides as text/plain. Google allows exports up to 10 MB; this connector cuts the answer at 200 KB and marks it _truncated. Uploaded files such as PDFs, Word documents or images cannot be read or downloaded through this connector: give the user the webViewLink. For Office files, gdrive_copy_file does not convert, so ask the user to open the file with Google Docs or Sheets first.

Creating and organising

  • gdrive_create_text_file uploads text in one call. Set content_type to the text's format and drive_mime_type to the same value to keep it as a file, or to application/vnd.google-apps.document (from plain text, Markdown or HTML) or application/vnd.google-apps.spreadsheet (from CSV) to create a Google Doc or Sheet. folder_id defaults to root. File names cannot contain double quotes or backslashes.
  • gdrive_update_file renames or moves: to move, pass the target folder in add_parents and the current parent (from gdrive_get_file) in remove_parents. Items on a shared drive have exactly one parent.
  • gdrive_trash_file moves an item to the trash, restorable from drive.google.com for 30 days; only the owner (or a shared drive organizer) can do it.

Sharing: gdrive_list_permissions shows who has access. gdrive_share_file adds access: type: "user" with email_address and role reader, commenter or writer; type: "anyone" makes it available to anyone with the link. Google emails the person unless send_notification_email is false. Ownership transfer and removing access are not available here.

Pagination: list responses carry nextPageToken while more results exist; call the same tool with the same arguments and page_token set to it. page_size goes up to 1000 for files and 100 for permissions, comments and shared drives.

Quotas: Drive allows about 12,000 requests per minute per project and per user. Over the limit Google answers 403 userRateLimitExceeded / rateLimitExceeded or 429: wait a little and retry.

Common errors

  • 401: the authorization expired or was revoked (always after 7 days while the consent screen is in Testing). Click Authorize with Provider again.
  • 403 insufficientPermissions / ACCESS_TOKEN_SCOPE_INSUFFICIENT: the scope does not allow the call (a write on a read-only setup). 403 accessNotConfigured: enable the Google Drive API in the Cloud project. 403 insufficientFilePermissions: the user may not change that file.
  • 404 notFound: the id is wrong or the file is not visible to this account.
  • 400 invalid on export: the format does not suit the file type (e.g. text/csv for a Doc). 403 exportSizeLimitExceeded: the file is over 10 MB as an export.
  • 400 invalidQuery / Invalid Value on search: check quoting in q, and do not combine order_by with fullText contains.

Out of scope here: downloading or uploading binary files, permanent deletion, removing access, revisions, labels and Drive activity.

Your AI is two clicks away from Google Drive.

Install the connector, paste your credentials, ask your AI a question. 7-day free trial, no credit card.