Labsco
a-bonus logo

Ultimate Google Docs & Drive MCP Server

β˜… 604

from a-bonus

Interact with Google Docs and Google Drive for document creation, editing, and file management.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

Google Docs, Sheets, Drive, Gmail & Calendar MCP Server

Demo Animation

Connect Claude Desktop, Cursor, or any MCP client to your Google Docs, Google Sheets, Google Drive, Gmail, and Google Calendar.


What Can It Do?

Tools across Google Docs, Sheets, and Drive:

Google Docs

ToolDescription
readDocumentRead content as plain text, JSON, or markdown
appendTextAppend text to a document
insertTextInsert text at a specific position
deleteRangeRemove content by index range
modifyTextReplace, prepend, or transform text in a document
findAndReplaceFind and replace text across a document
findElementLocate text occurrences (with index ranges) or list paragraphs/tables
listTabsList all tabs in a multi-tab document
addTabAdd a new tab to a document
renameTabRename a document tab
replaceDocumentWithMarkdownReplace entire document content from markdown
replaceRangeWithMarkdownReplace a specific range with markdown content
appendMarkdownAppend markdown-formatted content
applyTextStyleBold, italic, colors, font size, links
applyParagraphStyleAlignment, spacing, indentation
insertTableCreate an empty table
insertTableWithDataCreate a table pre-filled with data
insertPageBreakInsert page breaks
insertSectionBreakInsert section break (NEXT_PAGE or CONTINUOUS)
updateSectionStyleUpdate section style: flip orientation, margins
insertImageInsert images from URLs or local files

Comments

ToolDescription
listCommentsView all comments with author and date
getCommentGet a specific comment with replies
addCommentCreate a comment anchored to text
replyToCommentReply to an existing comment
resolveCommentMark a comment as resolved
deleteCommentRemove a comment

Google Sheets

ToolDescription
readSpreadsheetRead data from a range (A1 notation)
writeSpreadsheetWrite data to a range
batchWriteWrite to multiple ranges in one call
appendRowsAdd rows to a sheet
clearRangeClear cell values
createSpreadsheetCreate a new spreadsheet
addSheetAdd a sheet/tab
deleteSheetRemove a sheet/tab
duplicateSheetDuplicate a sheet within the same spreadsheet
copySheetToCopy a sheet into another spreadsheet
renameSheetRename a sheet/tab
getSpreadsheetInfoGet metadata and sheet list
listSpreadsheetsFind spreadsheets
formatCellsBold, colors, alignment, vertical alignment, wrap strategy on ranges
copyFormattingCopy formatting from one range to another
readCellFormatRead formatting details of a cell range
setCellBordersSet per-side borders (top/bottom/left/right/inner) with style & color
freezeRowsAndColumnsPin header rows/columns
setDropdownValidationAdd/remove dropdown lists on cells
setColumnWidthsSet column widths in pixels
setRowHeightsSet row heights in pixels
autoResizeColumnsAuto-fit column widths to content
autoResizeRowsAuto-fit row heights to content
protectRangeLock a range or entire sheet (warning-only or fully locked)
addConditionalFormattingAdd a conditional formatting rule
getConditionalFormattingList conditional formatting rules with their index (JSON)
deleteConditionalFormattingDelete conditional formatting rules by index
groupRowsGroup rows for collapsible sections
ungroupAllRowsRemove all row groupings
createSheetsCommentCreate a spreadsheet comment, optionally with a direct cell link
createSheetsCellNoteCreate a native cell note attached to a cell or range
insertChartCreate a chart from data
deleteChartRemove a chart

Google Sheets Tables

ToolDescription
createTableCreate a new named table with column types
listTablesList all tables in a spreadsheet or sheet
getTableGet detailed table metadata by name or ID
deleteTableDelete a table (optionally clear data)
updateTableRangeModify table dimensions (add/remove rows/cols)
appendTableRowsAppend rows to a table (table-aware insertion)

Google Drive

ToolDescription
listDocumentsList documents, optionally filtered by date
searchDocumentsSearch by name or content
getDocumentInfoGet document metadata
createDocumentCreate a new document
createDocumentFromTemplateCreate from an existing template
createFolderCreate a folder
listFolderContentsList folder contents
getFolderInfoGet folder metadata
moveFileMove a file to another folder
copyFileDuplicate a file
renameFileRename a file
deleteFileMove to trash or permanently delete
listDriveFilesList any file type in Drive with filters
searchDriveFilesSearch all Drive files by name or content
downloadFileDownload a file's content

Gmail

ToolDescription
listMessagesList or search messages using Gmail query syntax (is:unread, from:, newer_than:, etc.)
getMessageFetch a single message with decoded headers, plain-text body, HTML body, and attachment metadata
sendEmailSend a plain-text email. Supports cc/bcc and threaded replies via replyToMessageId
trashMessageMove a message to Trash (reversible, same as clicking Delete in the Gmail UI)
modifyMessageLabelsAdd or remove labels on a message β€” use to star, archive (remove INBOX), mark read (remove UNREAD)
listLabelsList all system and custom labels with their IDs
createDraftCompose a draft instead of sending immediately β€” for compose/review/send workflows
listDraftsList existing drafts with recipient, subject, and snippet
getDraftFetch a single draft with full headers and body
updateDraftReplace the contents of an existing draft (full replace, not patch)
sendDraftSend an existing draft by ID
deleteDraftPermanently delete a draft (not moved to Trash β€” gone)
triageInboxComposite: fetch unread messages with content + heuristic flags (newsletter, meeting, action) for one-shot inbox triage

Google Calendar

ToolDescription
listEventsList or search events with q, timeMin, timeMax, maxResults (defaults to primary calendar)
createEventCreate an event with title, start/end, description, location, attendees, optional Google Meet link
updateEventPATCH-style update β€” only the fields you pass change. Use to reschedule, retitle, change attendees
deleteEventPermanently delete an event. Optional sendUpdates emails cancellations to attendees
quickAddEventNatural-language event creation: "Lunch with Sarah tomorrow 12pm" β€” Google parses the rest

Authentication Options

OAuth (Default)

Pass your Google Cloud OAuth client credentials as environment variables:

VariableDescription
GOOGLE_CLIENT_IDOAuth client ID from Google Cloud Console
GOOGLE_CLIENT_SECRETOAuth client secret from Google Cloud Console

Service Account (Enterprise)

For Google Workspace with domain-wide delegation:

VariableDescription
SERVICE_ACCOUNT_PATHPath to the service account JSON key file
GOOGLE_IMPERSONATE_USEREmail of the user to impersonate (optional)
Copy & paste β€” that's it
{
  "mcpServers": {
    "google-docs": {
      "command": "npx",
      "args": ["-y", "@a-bonus/google-docs-mcp"],
      "env": {
        "SERVICE_ACCOUNT_PATH": "/path/to/service-account-key.json",
        "GOOGLE_IMPERSONATE_USER": "user@yourdomain.com"
      }
    }
  }
}

Token Storage

OAuth refresh tokens are stored in ~/.config/google-docs-mcp/token.json (respects XDG_CONFIG_HOME). OAuth client IDs and client secrets are not stored in the token file. To re-authorize, run the auth command again or delete the token file.

Multiple Google Accounts

Set GOOGLE_MCP_PROFILE to store tokens in a profile-specific subdirectory. This allows using different Google accounts for different projects:

VariableDescription
GOOGLE_MCP_PROFILEProfile name for isolated token storage (optional)
Copy & paste β€” that's it
{
  "mcpServers": {
    "google-docs": {
      "command": "npx",
      "args": ["-y", "@a-bonus/google-docs-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "...",
        "GOOGLE_CLIENT_SECRET": "...",
        "GOOGLE_MCP_PROFILE": "work"
      }
    }
  }
}

Tokens are stored per profile:

Copy & paste β€” that's it
~/.config/google-docs-mcp/
β”œβ”€β”€ token.json              # default (no profile)
β”œβ”€β”€ work/token.json         # GOOGLE_MCP_PROFILE=work
β”œβ”€β”€ personal/token.json     # GOOGLE_MCP_PROFILE=personal

Without GOOGLE_MCP_PROFILE, behavior is unchanged.


Contributing

Contributions are welcome! See CONTRIBUTING.md for development setup, architecture overview, and guidelines.

License

MIT -- see LICENSE for details.