Labsco
MCP SERVER

Google Workspace Documents

by a-bonus

Docs, Sheets, Drive, Gmail, Calendar and Apps Script behind one Google authorization — editing and formatting, not just reading.

Office Suites & Cloud File Storage
Summary
One consent screen covering mail, files and calendar is the convenience and the whole security question at once.

The setup enables five APIs and asks for mail-modify, which means a single authorization can read your mail, change your files and move your calendar. That breadth is exactly why it is useful and exactly why it deserves a dedicated Google account rather than your primary one if it is going to stay connected. Budget the time for the Cloud Console rather than the install — that is the long part.

What it is

A server spanning most of Google Workspace from one OAuth connection: documents and spreadsheets edited and formatted in place, Drive files managed, mail and calendar handled, and the Apps Script behind a file written.

What you get
  • Docs read as text, JSON or markdown and edited precisely — text inserted, appended, replaced or deleted by index range, with find-and-replace and element location — readDocument, insertText, appendText, modifyText, deleteRange, findAndReplace, findElement
  • Markdown written straight into a document, replacing the whole thing, one range, or appended — replaceDocumentWithMarkdown, replaceRangeWithMarkdown, appendMarkdown
  • Real document formatting: character styles, paragraph styles, tables with or without data, images, page and section breaks, and section orientation and margins — applyTextStyle, applyParagraphStyle, insertTable, insertTableWithData, insertImage, insertPageBreak, insertSectionBreak, updateSectionStyle
  • Document comments read, created against anchored text, replied to and resolved — listComments, addComment, replyToComment, resolveComment
  • Sheets read and written by A1 range, in batches or appended, with sheets created, duplicated, copied between spreadsheets and renamed — readSpreadsheet, writeSpreadsheet, batchWrite, appendRows, addSheet, duplicateSheet, copySheetTo
  • Spreadsheet presentation: cell formatting, borders per side, frozen headers, column widths and row heights, auto-resize, dropdown validation and protected ranges — formatCells, setCellBorders, freezeRowsAndColumns, setDropdownValidation, protectRange
  • Named tables in Sheets, created with column types and appended to in a table-aware way — createTable, listTables, getTable, appendTableRows, updateTableRange
  • Drive: documents and files listed, searched by name or content, created from a template, moved, copied, renamed, downloaded and trashed — searchDocuments, createDocumentFromTemplate, listDriveFiles, searchDriveFiles, moveFile, copyFile, downloadFile, deleteFile
  • Gmail as a working inbox: messages listed with Gmail query syntax, read with decoded bodies, sent or replied in thread, labelled, trashed, and drafts composed, updated and sent — plus a composite triage call that returns unread mail with newsletter, meeting and action flags — listMessages, getMessage, sendEmail, modifyMessageLabels, createDraft, updateDraft, sendDraft, triageInbox
  • Calendar events listed, created with attendees and an optional Meet link, patched, deleted with cancellations, or added from a sentence — listEvents, createEvent, updateEvent, deleteEvent, quickAddEvent
  • Apps Script projects created — optionally bound to a Doc or Sheet — read, and written back, so onEdit triggers and custom menus are set up rather than pasted by hand — createAppsScriptProject, getAppsScriptContent, updateAppsScriptContent
Requirements

A Google Cloud OAuth client of desktop type, with the Docs, Sheets, Drive, Gmail and Calendar APIs enabled and a consent screen listing you as a test user, including the gmail.modify and calendar.events scopes. Authorize once with npx -y @a-bonus/google-docs-mcp auth, which saves a refresh token under ~/.config/google-docs-mcp/, then run the server with GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET set. Google Workspace domains can use a service account instead through SERVICE_ACCOUNT_PATH and GOOGLE_IMPERSONATE_USER, and there is a Cloud Run deployment for a shared team install. The Apps Script tools need two extra things: the Apps Script API switched on per Google account in your user settings, and a re-authorization on existing installs to pick up the script.projects scope.

Setup effort

One command plus a key — npx -y @a-bonus/google-docs-mcp, then supply credentials