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 giorni gratis · senza carta · hosting UE
Chiedi qualsiasi cosa a Google
Prova un prompt reale su Google Drive via AnythingMCP — Claude chiama i tool e risponde. Premi Enter sul tuo messaggio per installare su Cloud.
Installa Google su CloudClaude è un'AI e può sbagliare. Verifica sempre le risposte.
Setup in 2 minuti
- 1Avvia la trial gratuita su cloud.anythingmcp.com.
- 2Clicca Google Drive nel connector store. Incolla le credenziali quando richiesto.
- 3Genera una MCP API key e punta il client AI all'URL MCP generato.
Guide per Google
Setup passo-passo per i principali client AI.
Configurare Google Drive
Direttamente dalla definizione del connettore: dove trovare le credenziali, quali permessi servono e con quale API parla questo adapter. Fornite in inglese dall'autore del connettore.
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)
- Open https://console.cloud.google.com, pick or create a project, then APIs & Services → Library → enable Google Drive API.
- 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.
- 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). - Paste the client ID and secret into
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETand install the connector. - 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 parentslists a folder's direct children ('root' in parentsfor 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 = falseunless the user asks about the trash: without it results include trashed files. Searches include shared drives the user belongs to. Withcorpora: "allDrives"Google may answerincompleteSearch: true; narrow the query or search one shared drive withcorpora: "drive"anddrive_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_fileuploads text in one call. Setcontent_typeto the text's format anddrive_mime_typeto the same value to keep it as a file, or toapplication/vnd.google-apps.document(from plain text, Markdown or HTML) orapplication/vnd.google-apps.spreadsheet(from CSV) to create a Google Doc or Sheet.folder_iddefaults toroot. File names cannot contain double quotes or backslashes.gdrive_update_filerenames or moves: to move, pass the target folder inadd_parentsand the current parent (fromgdrive_get_file) inremove_parents. Items on a shared drive have exactly one parent.gdrive_trash_filemoves 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). 403accessNotConfigured: enable the Google Drive API in the Cloud project. 403insufficientFilePermissions: the user may not change that file. - 404
notFound: the id is wrong or the file is not visible to this account. - 400
invalidon export: the format does not suit the file type (e.g. text/csv for a Doc). 403exportSizeLimitExceeded: the file is over 10 MB as an export. - 400
invalidQuery/Invalid Valueon search: check quoting inq, and do not combineorder_bywithfullText contains.
Out of scope here: downloading or uploading binary files, permanent deletion, removing access, revisions, labels and Drive activity.
La tua AI è a due click da Google Drive.
Installa il connettore, incolla le credenziali, chiedi all'AI. 7 giorni gratis, niente carta.