Google Drive MCP server
io.github.piotr-agier/google-drive-mcp·v2.12.0·226 starsSecure access to Google Drive, Docs, Sheets, Slides, and Calendar through MCP.
226 stars
Reviews
Write oneNobody has reviewed Google Drive MCP yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Google Drive MCP tools (100, 32 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
addCommentAdd a comment quoting a text range, targeted by startIndex+endIndex or by textToFind. The comment appears in the document's comment panel and records the quoted passage. Google Docs does not support margin-anchored comments through any public API, so the comment is unanchored by design; this is a platform limit, not a failure.
addDataValidationAdd data validation rules to a sheet range
addDimensionGroupGroup a range of rows or columns in a sheet (creates a collapsible outline group). Indices are 0-based and the interval is half-open [startIndex, endIndex) \u2014 to group rows 5 through 12 as shown in the UI, pass startIndex: 4, endIndex: 12. Nest groups by adding a second group inside the range of the first.
addDocumentTabAdd a new tab in a Google Doc
addGoogleSheetConditionalFormatAdd conditional formatting to a Google Sheet
addNamedRangewrite actionCreate a named range
addPermissionAdd a sharing permission to a file. If the principal already holds a permission on the file, Drive updates that permission instead of creating a second one, and the requested role is applied even when it is a downgrade (asking for 'reader' for an existing 'writer' leaves them as 'reader'). Provide emailAddress for type 'user'/'group', domain for type 'domain', and neither for 'anyone'.
addSheetAlias for addSpreadsheetSheet (adds a new sheet/tab)
addSpreadsheetSheetAdds a new sheet/tab to an existing Google Spreadsheet
appendSpreadsheetRowsAppends rows of data to the end of a sheet in a Google Spreadsheet
applyParagraphStyleApply paragraph formatting \u2014 alignment, indents, spacing, named styles, borders (top/bottom/left/right/between), shading, and pagination controls. Use EITHER startIndex+endIndex OR textToFind OR indexWithinParagraph for targeting. The update styles EVERY paragraph overlapping the range, so one call over the whole body with removeBorders: ["all"] strips every paragraph border from a document.
applyTextStyleApply text formatting (bold, italic, color, etc.) to a range or found text. Use EITHER startIndex+endIndex OR textToFind for targeting.
authGetStatusShow authentication/token status and scope diagnostics
authListScopesList configured/requested scopes and currently granted scopes
authTestFileAccesswrite actionRun auth diagnostics against Drive API/file access
autoResizeColumnsAuto-size one or more columns to fit their content. Indices are 0-based and the interval is half-open [startColumn, endColumn) \u2014 to auto-fit a single column at position 5, pass startColumn: 5, endColumn: 6.
autoResizeRowsAuto-size one or more rows to fit their content. Indices are 0-based and the interval is half-open [startRow, endRow) \u2014 to auto-fit a single row at position 5, pass startRow: 5, endRow: 6.
batchUpdateGoogleSheetValueswrite actionWrite many ranges in ONE call via spreadsheets.values.batchUpdate. Ranges may sit on different sheets of the same spreadsheet. Prefer this over repeated updateGoogleSheet calls whenever more than one range changes: N separate writes cost N round trips and N units of the per-minute write quota, while one batch costs one of each.
bulkConvertFolderPdfsConvert all PDFs in a folder into Google Docs and return per-file results
convertPdfToGoogleDocConvert an existing PDF in Drive into an editable Google Doc
copyFilewrite actionCreates a copy of a Google Drive file or document
createDocFromHTMLwrite actionCreate a Google Doc from HTML content in a single Drive API call. HTML tags are converted to native Google Doc styles: <h1> \u2192 Heading 1, <h2> \u2192 Heading 2, <p> \u2192 Normal Text, <b> \u2192 bold, <i> \u2192 italic, <ul>/<ol> \u2192 lists, <table> \u2192 tables. Useful when you want native heading/list/table styling applied in one request instead of a createGoogleDoc call followed by per-
createFolderwrite actionCreate a new folder in Google Drive
createFootnotewrite actionCreate a footnote in a Google Doc. Footnotes cannot be inserted inside equations, headers, footers, or other footnotes. For multi-tab docs, specify tabId to target a specific tab.
createGoogleDocwrite actionCreate a new Google Doc
createGoogleSheetwrite actionCreate a new Google Sheet. By default uses RAW mode which stores values as-is. Set valueInputOption to 'USER_ENTERED' only when you need formulas to be evaluated.
createGoogleSlideswrite actionCreate a new Google Slides presentation
createParagraphBulletswrite actionAdd or remove bullet points / numbered lists on paragraphs in a Google Doc. Target paragraphs by startIndex+endIndex or textToFind. Use bulletPreset='NONE' to remove bullets.
createShortcutwrite actionCreate a shortcut (link) to a file or folder in Google Drive. Useful for referencing the same document from multiple locations without duplicating it.
createTextFilewrite actionCreate a new text or markdown file
deleteCommentwrite actionDelete a comment from the document
deleteDimensionGroupwrite actionRemove a row or column group from a sheet. The rows/columns themselves are kept; only the grouping is removed. Indices are 0-based and the interval is half-open [startIndex, endIndex). Use listDimensionGroups to read back an existing group's range and pass it in full: the API decrements the group depth of every dimension in the range rather than matching a whole group, so a range that only partial
deleteItemwrite actionMove a file or folder to trash (can be restored from Google Drive trash)
deleteRangewrite actionDelete content between start and end indices. Works on Google Docs and text/* files (e.g. text/plain, text/markdown). Index semantics differ by file type: Google Docs use the Docs API's 1-based structural position (includes structural elements); text files use 0-based Unicode code point (character) offsets into the file content. For multi-tab Google Docs, specify tabId to target a specific tab \u2
deleteSheetwrite actionDelete a sheet/tab by sheetId
describeGoogleDocRangeStyle probe for one spot: the paragraph styles (named style, alignment, borders, shading, indents, spacing, bullets) and text runs (font, size, bold/italic/underline, colors, links) overlapping a range, with the real document index of every paragraph and run so the result feeds straight into applyParagraphStyle or applyTextStyle. Target it with startIndex (optionally endIndex) or with textToFind,
downloadFileDownload a Google Drive file to a local path. For Google Workspace files (Docs, Sheets, Slides, Drawings), exports to the specified format. For regular files, downloads as-is. Streams directly to disk.
editTableCellEdit the content and/or style of a specific table cell. Requires knowing the table start index. For multi-tab docs, specify tabId to target a table in a specific tab.
findAndReplaceInDocFind and replace text across a Google Document. Dry-run mode counts matches exactly across body, tables, headers, footers, and footnotes. On zero matches the response explains the likeliest lookalike cause (non-breaking spaces, curly quotes, HTML entities, case). For multi-tab docs, specify tabId to scope replacements to a single tab. When replaceText contains a newline, the write is always locked
formatGoogleDocParagraphApply paragraph formatting (alignment, indentation, spacing, heading style, borders, shading) in a Google Doc. Alias for applyParagraphStyle.
formatGoogleDocTextApply text formatting (bold, italic, font, color, links, superscript/subscript) to a range or found text in a Google Doc. Alias for applyTextStyle.
formatGoogleSheetCellsFormat cells in a Google Sheet (background, borders, alignment)
formatGoogleSheetNumbersApply number formatting to cells in a Google Sheet
formatGoogleSheetTextApply text formatting to cells in a Google Sheet
getCommentGet a specific comment with its full thread of replies
getDocumentInfoGets detailed information about a specific Google Document.
getGoogleDocContentGet content of a Google Doc with text indices for formatting
getGoogleDocContentPaginatedGet a portion of a Google Doc with text indices for formatting, with pagination support. Use offset and limit to read large documents in chunks.
getGoogleDocImageFetch the bytes of an inline image embedded in a Google Doc, keyed by its inline object ID. Returns a native image the model can see (or base64). The doc is re-fetched so the underlying image URL is always fresh \u2014 pass the objectId, never a raw contentUri (those expire). Inline images only; floating/anchored images are not supported.
getGoogleDocStyleSummaryCompact style inventory of a whole document in a few hundred tokens: fonts with their size ladders, named-style counts, text colors, bordered and shaded paragraph locations, a table inventory with real index ranges, and the heading outline. The cheap first read before any formatting work, in place of pulling the full document JSON to answer style questions. Counts cover every tab; locations are pr
getGoogleSheetCellsRead Google Sheets cells as structured data instead of joined text: each cell comes back with its own absolute A1 address, and with the formula the user entered AND the value it evaluates to, in one call. Reads several ranges at once and returns them separately. Use getGoogleSheetContent for a quick human-readable dump of one range. Use this tool whenever the result will be written back, compared
getGoogleSheetContentGet content of a Google Sheet with cell information. Each row is returned as 'Row N: ' followed by that row's cells separated by tab characters. Returns displayed values by default; set valueRenderOption to 'FORMULA' to read the underlying formulas (e.g. '=SUM(A1:A10)') instead of their results, or 'UNFORMATTED_VALUE' for raw numbers without display formatting. Under UNFORMATTED_VALUE a date or ti
getRevisionsList revisions for a file
getSpreadsheetInfoGets detailed information about a Google Spreadsheet including all sheets/tabs
hideSheetDimensionHide a range of columns or rows in a sheet (sets hiddenByUser=true). Indices are 0-based and the interval is half-open [startIndex, endIndex) \u2014 to hide a single column/row at position 5, pass startIndex: 5, endIndex: 6.
insertImageFromUrlwrite actionInsert an inline image into a Google Document from a publicly accessible URL
insertLocalImagewrite actionUpload a local image file to Google Drive and insert it into a Google Document
insertSmartChipwrite actionInsert a person smart chip (mention) at a document index. Only person chips are supported by the Docs API; date and file chips are read-only.
insertTablewrite actionInsert a new table with the specified dimensions at a given index. For multi-tab docs, specify tabId to target a specific tab.
insertTextwrite actionInsert text at a specific index (surgical edit, doesn't replace whole file). Works on Google Docs and text/* files (e.g. text/plain, text/markdown). Index semantics differ by file type: Google Docs use the Docs API's 1-based structural position (includes structural elements); text files use a 0-based Unicode code point (character) offset into the file content. For multi-tab Google Docs, specify ta
listCommentsList all comments in a Google Document
listDimensionGroupsList the row and column groups of a spreadsheet, with each group's range, nesting depth and collapsed state. Ranges are reported as 0-based half-open intervals, exactly as addDimensionGroup, deleteDimensionGroup and updateDimensionGroup take them.
listDocumentTabsList all tabs in a Google Doc with their IDs and hierarchy
listFolderList contents of a folder (defaults to root)
listGoogleDocsLists Google Documents from your Google Drive with optional filtering.
listGoogleSheetsLists Google Spreadsheets from your Google Drive with optional filtering
listPermissionsList sharing permissions for a file
listSharedDrivesList available Google Shared Drives
listSheetsList tabs/sheets in a Google Spreadsheet
lockFileLock a file to prevent editing by setting content restrictions. The file remains readable but cannot be modified until unlocked.
manage_accountsManage connected Google accounts. action='list' shows all connected accounts (no secrets). action='add' starts an OAuth flow for a new account identified by account_id (alias). action='remove' deletes local tokens for an account. action='set_default' picks which account is used when tool calls omit the `account` parameter.
mergeGoogleSheetCellsMerge cells in a Google Sheet
moveItemMove a file or folder
protectRangeProtect a range in a spreadsheet
readGoogleDocRead content of a Google Doc with format options. Supports multi-tab documents. Text/markdown output leads with the document's revisionId \u2014 pass it as ifRevisionId on write tools for an optimistic lock.
readGoogleDocPaginatedRead a portion of a Google Doc with pagination support. Use offset and limit to read large documents in chunks, avoiding output size limits.
readSmartChipsRead smart chip-like elements (person mentions, rich links, date chips) from the default tab of a document
readTextFileRead content of a text file (any text/* MIME type, e.g. text/plain, text/markdown, text/csv). For Google Docs, use readGoogleDoc.
removePermissionwrite actionRemove a permission from a file (by permissionId or emailAddress)
renameDocumentTabRename an existing Google Doc tab
renameItemRename a file or folder
renameSheetRename a sheet/tab by sheetId
replyToCommentAdd a reply to an existing comment
restoreRevisionRestore a file to a selected revision (creates a new head revision). Note: workspace files (Docs, Sheets, Slides) are restored via export/import and may lose some formatting.
searchSearch for files in Google Drive. Results are sorted most-recently-modified first by default; use orderBy for a different order. Set rawQuery=true to pass a raw Google Drive API query supporting operators like modifiedTime, createdTime, mimeType, name contains, etc.
setColumnWidthSet the width (in pixels) of one or more columns in a sheet. Indices are 0-based and the interval is half-open [startColumn, endColumn) \u2014 to resize a single column at position 5, pass startColumn: 5, endColumn: 6.
setGoogleSheetBordersSet borders for cells in a Google Sheet
setRowHeightSet the height (in pixels) of one or more rows in a sheet. Indices are 0-based and the interval is half-open [startRow, endRow) \u2014 to resize a single row at position 5, pass startRow: 5, endRow: 6.
shareFileConvenience wrapper to share a file with a user email. If the user already holds a permission on the file, that permission's role is set to the requested one (even when it is a downgrade) instead of creating a duplicate.
showSheetDimensionShow (unhide) a range of columns or rows in a sheet (sets hiddenByUser=false). Indices are 0-based and the interval is half-open [startIndex, endIndex) \u2014 to unhide a single column/row at position 5, pass startIndex: 5, endIndex: 6.
styleDocTableStyle a Docs table in one atomic call: cell borders/background/padding/content alignment (whole table via tableStartLocation, or a cell range subset), fixed column widths, and minimum row heights. Get the real tableStartIndex from the table span line readGoogleDoc or getGoogleDocContent prints (tableStartIndex=N) \u2014 never compute it from text offsets. removeBorders: ["all"] unboxes the table (
unlockFileUnlock a previously locked file by removing content restrictions, restoring full edit access.
updateDimensionGroupwrite actionCollapse or expand an existing row or column group. Indices are 0-based and the interval is half-open [startIndex, endIndex). Use listDimensionGroups first to find the group's range and depth.
updateGoogleDocwrite actionUpdate an existing Google Doc (replaces all content). The replacement is one atomic batchUpdate, so a failure leaves the document unchanged rather than wiped. For multi-tab docs, specify tabId to replace a single tab's content; leaves other tabs untouched.
updateGoogleSheetwrite actionUpdate an existing Google Sheet. By default uses RAW mode which stores values as-is. Set valueInputOption to 'USER_ENTERED' only when you need formulas to be evaluated.
updateGoogleSheetIfUnchangedwrite actionWrite cell values only if the guarded area has not changed since you read it, and get back what was overwritten so the change can be undone. Call once with dryRun:true to obtain the fingerprint, then again passing it as expectedFingerprint. IMPORTANT: this is optimistic and NOT atomic. The Sheets API has no compare-and-swap - unlike Docs, where ifRevisionId is enforced by the API itself - so the c
updatePermissionwrite actionUpdate an existing permission role
updateTextFilewrite actionUpdate an existing text or markdown file
uploadFilewrite actionUpload a file (any type: image, audio, video, PDF, etc.) to Google Drive, either from a local path on the server or from base64-encoded content. When fileId is provided, uploads the content as a new version of that existing file (in-place update) instead of creating a new file.
uploadPdfWithSplitwrite actionUpload PDF and optionally split into chunked parts (metadata split plan for now)
Public scan report
scanner v0.1.10 · 2026-10-15 · same rubric, same numbers if you re-run it
- Code scan2 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 0 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Google Drive MCP compares
Against every graded Productivity MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 83/100
- higher than 60% of 1,299 Productivity servers
- Tools
- 100
- the typical Productivity server has 7
- Tools that change things
- 32%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 226
- more than 95% of 854 Productivity servers
What its tools let an agent do: 47 read · 25 create · 18 change · 6 delete · 2 send or post · 2 run or deploy
Release history: 3 versions in the registry since 2026-09-15, latest 2026-09-25, typically one every 6 days.
Install Google Drive MCP in Claude Code, Cursor or VS Code
Runs npx -y @piotr-agier/google-drive-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add google-drive-mcp -- npx -y @piotr-agier/google-drive-mcp
What the publisher says
From the Google Drive MCP repository's README, as published. We do not edit it. Read it on GitHub
Google Drive MCP Server
Connect an MCP client to Google Drive, Docs, Sheets, Slides, and Calendar through one self-hosted server. Search and organize files, create and edit Workspace content, manage sharing, and automate multi-step workflows while keeping control of the Google identity and credentials used for every call.
Why this server
- Drive-first workflows: 129 tools cover file management, Shared Drives, permissions, revisions, rich Docs editing, Sheets formatting, Slides authoring, and Calendar events.
- Local or hosted: use stdio for a personal desktop client, Streamable HTTP for a hosted integration, or OAuth-protected team mode for a shared service.
- Identity control: local OAuth supports multiple Google accounts and per-tool account selection; service accounts and externally managed OAuth tokens are also supported.
- Agent-friendly access: tools expose targeted operations, while the optional gdrive:/// resource interface supports direct reading and discovery.
- Open and self-hosted: credentials and tokens stay in the environment you operate.
This project remains focused on deep Drive and editor workflows rather than attempting to expose every Google Workspace API.
Client compatibility
Compatibility is determined by the transport and authentication flow a client supports.
See Client configuration for configuration examples and transport requirements.
Quick start
1. Create Google OAuth credentials
In a Google Cloud project:
- Enable the Drive, Docs, Sheets, Slides, and Calendar APIs.
- Configure the OAuth consent screen and add your Google account as a test user when the app is in testing.
- Create an OAuth client with application type Desktop app.
- Download the JSON file and save it as:
~/.config/google-drive-mcp/gcp-oauth.keys.jsonThe setup guide has the complete Google Cloud walkthrough and alternative credential locations.
2. Authenticate
npx -y @piotr-agier/google-drive-mcp authComplete the Google consent flow in the browser. Tokens are stored by default at ~/.config/google-drive-mcp/tokens.json.
3. Add the server to your MCP client
For clients that use the common mcpServers configuration shape:
{
"mcpServers": {
"google-drive": {
"command": "npx",
"args": ["-y", "@piotr-agier/google-drive-mcp"]
}
}
}Restart the client after saving its configuration. Claude Desktop paths and HTTP examples are documented in Client configuration.
4. Make a first tool call
Ask your client:
Run authGetStatus and tell me which Google account is active.Then try a read-only Drive request:
Search my Google Drive for files modified in the last seven days.If the identity is wrong or search returns no files, use the troubleshooting guide.
What you can do
Organize Drive
Find PDF files in /Reports, create an Archive folder there, and move files older
than one year into it.Build a report
Create a Google Sheet for monthly results, summarize it in a Google Doc, and
create a short Google Slides presentation from the summary.Edit a document
Find the "Project Plan" document, replace the old launch date, format the new
date in bold, and add a comment describing the change.Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Google Drive MCP: common questions
- Is Google Drive MCP server safe?
- Mostly: it is graded B (83/100). Read the Google Drive MCP safety report
- How do I install Google Drive MCP?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Google Drive MCP need an API key?
- Yes. The registry entry asks for
GOOGLE_DRIVE_OAUTH_CREDENTIALS. - Is Google Drive MCP maintained?
- The last commit was 20 days ago (2026-10-15). The latest release is v2.12.0.
- What can I use instead of Google Drive MCP?
- Servers from other publishers that do the same job: Agent-Native Calendar MCP server, gflow-cli MCP server and Gsheets MCP server. Compare all Google Drive MCP alternatives.
- How does Google Drive MCP compare with other Productivity MCP servers?
- safety score 83/100 (higher than 60% of 1,299 Productivity servers); tools 100 (the typical Productivity server has 7); tools that change things 32% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Google Drive MCP
Same job from other publishers: the closest match first, then the best rated.
- Agent-Native CalendarAgent-Native Google Calendar - manage events, sync, and public bookingnot reviewedEstablishedA
- gflow-cliDrive Google Flow from an agent: Veo video and Imagen image generationnot reviewedEstablishedA
- GsheetsMCP server for Google Sheets API — read, write, format, batch operations.not reviewedEstablishedB
- Sheets MCPGoogle Sheets for agent workflows in Claude Code and Claude Desktop: APIs, files, schedules, undo.not reviewedEstablishedA
- Google CalendarMCP server for Google Calendar integration with service account support and domain-wide delegation.not reviewedGrowingA