readDocumentLABSCO 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
Follow the published steps — GOOGLE_CLIENT_ID="your-client-id" GOOGLE_CLIENT_SECRET="your-client-secret" npx -y @a-bonus/google-docs-mcp auth
USE CASES
Turning a draft into a properly formatted document
Write the markdown into the doc, then apply the styles, tables and breaks that markdown cannot express.
Editing one section without rewriting the file
Locate the text to get its index range, then replace exactly that range.
Working through the comments on a document
Read them with their authors, reply where a reply is enough, and resolve the ones that are settled.
Getting a spreadsheet into a state you can hand over
Write the data, then freeze the header, set the widths and lock the range that should not be edited.
Clearing an inbox with judgement rather than rules
Pull unread mail with its triage flags, then label, archive or draft a reply for each.
Scheduling from a sentence in the conversation
Add the event by natural language, then patch in the attendees or a Meet link.
Automating the spreadsheet rather than maintaining it
Create an Apps Script project bound to the file and write the trigger into it directly.
102 tools
Listed in project docs. Your client may show a different list.
appendTextinsertTextdeleteRangemodifyTextfindAndReplacefindElementlistTabsaddTabrenameTabreplaceDocumentWithMarkdownreplaceRangeWithMarkdownappendMarkdownapplyTextStyleapplyParagraphStyleinsertTableinsertTableWithDatainsertPageBreakinsertSectionBreakupdateSectionStyleinsertImagelistCommentsgetCommentaddCommentreplyToCommentresolveCommentdeleteCommentreadSpreadsheetwriteSpreadsheetbatchWriteappendRowsclearRangecreateSpreadsheetaddSheetdeleteSheetduplicateSheetcopySheetTorenameSheetgetSpreadsheetInfolistSpreadsheetsformatCellscopyFormattingreadCellFormatsetCellBordersfreezeRowsAndColumnssetDropdownValidationsetColumnWidthssetRowHeightsautoResizeColumnsautoResizeRowsprotectRangeaddConditionalFormattinggetConditionalFormattingdeleteConditionalFormattinggroupRowsungroupAllRowscreateSheetsCommentcreateSheetsCellNoteinsertChartdeleteChartcreateTablelistTablesgetTabledeleteTableupdateTableRangeappendTableRowslistDocumentssearchDocumentsgetDocumentInfocreateDocumentcreateDocumentFromTemplatecreateFolderlistFolderContentsgetFolderInfomoveFilecopyFilerenameFiledeleteFilelistDriveFilessearchDriveFilesdownloadFilelistMessagesgetMessagesendEmailtrashMessagemodifyMessageLabelslistLabelscreateDraftlistDraftsgetDraftupdateDraftsendDraftdeleteDrafttriageInboxlistEventscreateEventupdateEventdeleteEventquickAddEventcreateAppsScriptProjectgetAppsScriptContentupdateAppsScriptContentBEFORE YOU INSTALL
What to know first
Tools you get
102 tools named in the project's documentation.
Requires
- npx on PATH
- GOOGLE_CLIENT_ID in your environment
- GOOGLE_CLIENT_SECRET in your environment
INSTALLATION
Connect your client
Server setup
Create a Google Cloud OAuth client of the Desktop app type, with the Google Docs, Sheets, Drive, Gmail and Calendar APIs enabled and your email added as a test user — the README walks through it
Authorize once — this opens your browser and saves a refresh token to ~/.config/google-docs-mcp/token.json:
GOOGLE_CLIENT_ID="<YOUR_GOOGLE_CLIENT_ID>" GOOGLE_CLIENT_SECRET="<YOUR_GOOGLE_CLIENT_SECRET>" npx -y @a-bonus/google-docs-mcp authAdd the server to your client with one of the tabs below; the client starts it with npx -y @a-bonus/google-docs-mcp, with GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET set
MCP Clients
Claude Desktop, Cursor, Windsurf
{
"mcpServers": {
"google-docs": {
"command": "npx",
"args": [
"-y",
"@a-bonus/google-docs-mcp"
],
"env": {
"GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>"
}
}
}
}Any MCP client — remote
{
"mcpServers": {
"google-docs": {
"type": "streamableHttp",
"url": "https://<YOUR_SERVICE>.run.app/mcp"
}
}
}This is for a copy you deploy yourself — there is no shared public endpoint. Deploy the project to Cloud Run with its gcloud run deploy command, using a Web application OAuth client whose redirect URI is your service URL plus /oauth/callback. <YOUR_SERVICE>.run.app is your service's address. Your client asks for Google sign-in on first connection.
Clients spell the "type" value differently: Claude Code and VS Code use "http", Cline uses "streamableHttp", and Roo Code uses "streamable-http". Claude Desktop does not accept a URL entry in its config file; remote servers go under Settings → Connectors.