Google Docs MCP
This server lets Claude work with your Google Docs through the MCP: create, read, edit, format, search, and manage documents using natural language, with OAuth sign-in.
Authentication: Check sign-in status (
get_auth_status), start Google OAuth (authenticate), and sign out (sign_out).Document management: Create documents (
create_document), read content and structure (get_document), list (list_documents), search by name/content (search_documents), copy (copy_document), and delete (move to trash,delete_document).Text editing: Append (
append_text), insert at a position (insert_text), replace all occurrences (replace_text), delete a range with optional safety check (delete_text), and find text with exact indexes (find_text).Formatting: Apply character formatting like bold, italic, underline, font size/color, highlight (
format_text), set paragraph styles (headings, title, etc.) (set_paragraph_style), align paragraphs (set_alignment), and insert hyperlinks (insert_link).Structure and layout: Insert page breaks (
insert_page_break), insert tables (insert_table), and create bulleted/numbered/checkbox lists (create_bulleted_list).Resource & prompts: Access document content as a resource and use built-in prompts for summarizing, rewriting, formatting, and meeting notes (per README).
Uses Google OAuth 2.0 sign-in (authorization-code flow with PKCE) so the server can act on behalf of the user's Google account to access Google Docs and Google Drive.
Requires a Google Cloud project to enable the Google Docs API and Google Drive API, and to configure an OAuth 2.0 client for authentication.
Create, read, edit, format, organize and search Google Docs. Supports content editing (append, insert, find-and-replace, delete a range), formatting (bold, italic, underline, strikethrough, font size and family, colors, paragraph styles, alignment), structure (page breaks, tables, hyperlinks, lists), document management (create, read, list, copy, trash), and full-text search with exact phrase indexes.
Interacts with Google Drive to manage and organize Google Docs files. Supports listing, searching by file name and/or full-text content, copying, and moving documents to the Drive trash.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Docs MCP Create a doc called FYP Proposal and add a heading and intro paragraph"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Docs MCP
Let Claude work with your Google Docs. Google Docs MCP is a Model Context Protocol (MCP) server that creates, reads, edits, formats and searches Google Docs through the official Google Docs and Google Drive APIs.
You can use it in two ways:
Claude Desktop extension (
.mcpb). Install one file, fill in two settings, and sign in with Google. You don't need Node.js, npm or any JSON configuration.Standalone MCP server. Run it with Node.js from any MCP client, such as Claude Code, VS Code or Cursor.
Google Docs MCP is an independent open-source project. It is not affiliated with or endorsed by Google.
Contents
Related MCP server: Google Drive MCP Server
Features
Documents: create a document (optionally with initial text), read it, list your documents, copy one, or move one to the Drive trash.
Content: append text, insert text at a position, replace every occurrence of a phrase, or delete a range. Deletion can first check that the range still contains the text you expect.
Formatting: bold, italic, underline, strikethrough, font family and size, text and highlight colors, Title, Subtitle and Heading 1–6 styles, and alignment.
Structure: page breaks, tables, links, and bulleted, numbered or checkbox lists.
Search: find documents by name or content, and find a phrase inside a document with its exact position.
Sign-in: Google OAuth 2.0 with PKCE. Access tokens refresh automatically, and you can sign in or out by asking Claude.
Resource and prompts: a
google-docs://document/{documentId}resource with a document's text, plus prompts to summarize, rewrite and format a document or create meeting notes.
Requirements
Claude Desktop with extension support (macOS or Windows).
A Google account.
A Google Cloud OAuth client. It's free and takes about 10 minutes to create. See Setup.
The extension runs on the Node.js runtime built into Claude Desktop and requires Node.js 22 or newer.
Why do I need my own OAuth client? Full Google Drive access is a restricted Google scope. An app that shares one OAuth client with the public needs a paid Google security assessment. With your own client, your data only flows between your computer and Google, and you stay in control of the app that accesses your account.
Installation (Claude Desktop)
The extension ships as a single .mcpb file (an MCP Bundle: the server, its dependencies and a
manifest in one archive). Nothing else has to be installed.
1. Get the file
Download google-docs-mcp.mcpb from the
latest release.
macOS and Linux:
curl -L -o ~/Downloads/google-docs-mcp.mcpb https://github.com/ammarqaisar11a55/google-docs-mcp/releases/latest/download/google-docs-mcp.mcpbWindows (PowerShell):
curl.exe -L -o "$env:USERPROFILE\Downloads\google-docs-mcp.mcpb" https://github.com/ammarqaisar11a55/google-docs-mcp/releases/latest/download/google-docs-mcp.mcpbYou can also build it yourself: npm run package writes build/google-docs-mcp.mcpb.
2. Install it in Claude Desktop
Open Claude Desktop → Settings → Extensions.
Drag
google-docs-mcp.mcpbinto the Extensions window, or choose Advanced settings → Install Extension… and select the file. Double-clicking the file also opens the installer. Labels differ slightly between Claude Desktop versions.Review the name, version and permissions, then click Install.
Enter the Client ID and Client secret from Setup when Claude Desktop asks for the extension settings. The other settings can stay at their defaults.
Make sure the extension is enabled.
The extension is listed as Google Docs for Claude. To change a setting later, reopen its configuration under Settings → Extensions. Then continue with Sign in with Google.
If your Claude Desktop has no Extensions screen
Extension support ships in Claude Desktop for macOS and Windows; other builds may not have it yet.
Use the standalone MCP server instead — same tools, configured through
claude_desktop_config.json.
Setup
1. Create a Google OAuth client (once)
Open the Google Cloud Console and create a project, for example
google-docs-claude.Go to APIs & Services → Library and enable the Google Docs API and the Google Drive API.
Go to APIs & Services → OAuth consent screen (Google Auth Platform) and click Get started:
Branding: enter an app name and your email address.
Audience: choose External, and under Test users add the Google account you'll use.
Data access (optional): add the scopes listed under Permissions.
Go to Clients → Create client and choose Application type: Desktop app. A Desktop app client is required.
Copy the Client ID and the Client secret.
2. Configure the extension
In Settings → Extensions → Google Docs for Claude, open the configuration and fill in:
Setting | Required | Description |
Google OAuth Client ID | yes | Ends in |
Google OAuth Client secret | yes | Stored securely by Claude Desktop as a sensitive value. |
Limit Drive access to this extension's files | no | Least privilege. Drive operations (list, search, copy, trash) only see documents created or opened by this extension. Default: off. |
Sign-in callback port | no | Local port on |
Debug logging | no | Detailed diagnostic logs, with secrets always redacted. Default: off. |
Make sure the extension is enabled.
3. Sign in with Google
In a new chat, ask Claude:
Sign in to Google.Claude calls the authenticate tool, which opens a Google sign-in page in your browser and also shows the link in the chat. Choose your account and approve access.
While your OAuth app is in Testing status, Google shows a "Google hasn't verified this app" warning. That's expected for your own app: click Advanced → Go to app name. Afterwards, ask Claude to check the connection:
Check my Google sign-in status.To disconnect at any time, ask Claude to sign out of Google. That revokes access at Google and deletes the stored tokens.
Available Tools
Every documentId parameter also accepts a full Google Docs URL.
Tool | Description |
| Check whether the extension is signed in to Google with the required permissions. Never returns tokens. |
| Start Google sign-in and return the link to approve access. |
| Revoke Google access and delete the locally stored tokens. |
| Create a new Google Doc, optionally with initial text ( |
| Read a document's text and structure outline, including exact positions ( |
| List your Google Docs, most recently modified first ( |
| Move a document to the Google Drive trash, where it can be restored for 30 days. Never deletes permanently. |
| Copy a document under a new title ( |
| Append text to the end of a document ( |
| Insert text at a position ( |
| Replace every occurrence of a phrase ( |
| Delete a range ( |
| Apply |
| Apply |
| Align paragraphs: |
| Insert a page break at a position. |
| Insert an empty table ( |
| Turn existing text into an |
| Turn paragraphs into a |
| Search Google Docs by name, content or both ( |
| Find a phrase in a document and return the exact start and end position of each match. |
Every tool returns { "success": true, "data": … } or { "success": false, "error": { "code", "message", "retryable" } }, and failures also set MCP's isError flag. The error codes are NOT_AUTHENTICATED, AUTH_EXPIRED, INVALID_CREDENTIALS, CONFIG_ERROR, INVALID_DOCUMENT_ID, DOCUMENT_NOT_FOUND, PERMISSION_DENIED, INVALID_INDEX, INVALID_ARGUMENT, INVALID_REQUEST, RATE_LIMITED, NETWORK_ERROR, GOOGLE_API_ERROR and INTERNAL_ERROR.
About positions. Editing tools use Google Docs indexes: the body starts at index 1, and every insert or delete shifts the text after it. Claude gets exact positions from get_document or find_text, and applies several edits from the end of the document backwards.
About search. Name search matches words in a document's name that start with your query. Content search uses Google Drive's full-text index, which matches words rather than arbitrary fragments and may take a while to include recent edits. Results only include Google Docs that aren't in the trash.
Usage Examples
Create a Google Doc called "Project Notes" with a short introduction to our Q4 goals.Find my document named "Semester Plan".Add this content to the end of my "Semester Plan" doc: Week 10 — final project presentations.Search my Google Docs for anything that mentions "budget".In "Project Notes", make "Q4 Goals" a Heading 1 and turn the lines under it into a bulleted list.Replace every "2025" with "2026" in my "Roadmap" document.Make every mention of "deadline" in "Semester Plan" bold and red.Summarize my "Meeting Notes 12 Sept" document.Make a copy of "Proposal Template" called "FYP Proposal".Move the "Old Draft" document to the trash.Permissions
The extension requests exactly two Google OAuth scopes.
Scope | When | Why it is needed |
| always | Create documents and read, edit and format their content through the Google Docs API. It applies to Google Docs you can access, which lets you point Claude at any document by URL or ID. |
| default | Drive operations on all your existing Docs: list and search ( |
| "Limit Drive access" setting on | Least privilege. The same Drive operations, but only for documents created or opened by this extension. |
Other scopes were ruled out:
drive.readonlyanddrive.metadata.readonlycan't copy or trash documents.drive.filealone can't find the documents you already have, so it's offered as an option rather than the default.
After changing the "Limit Drive access" setting, sign in again. The extension reports missing permissions until you do.
Troubleshooting
Problem | Solution |
Claude says it isn't signed in ( | Ask Claude to "sign in to Google" and approve access. This is also needed after changing the OAuth client or the Drive access setting. |
| Google expires sign-ins after 7 days while the OAuth app's publishing status is Testing. Sign in again, or set the app to In production under Google Auth Platform → Audience. Personal use doesn't need Google verification. |
| Your Google account isn't a test user of the OAuth app. Add it under Google Auth Platform → Audience → Test users. |
| The OAuth client isn't of type Desktop app. Create a Desktop app client and update the settings. |
| The Client ID or Client secret is wrong or missing. Re-enter both in the extension settings. |
| Enable both the Google Docs API and the Google Drive API in the project that owns your OAuth client, wait a minute, and retry. |
| Change Sign-in callback port in the extension settings, for example to |
The sign-in link doesn't work | Open it on the same computer that runs Claude Desktop, within 5 minutes. Ask Claude to sign in again for a fresh link. |
Documents are missing from lists or searches | With "Limit Drive access" on, only documents created or opened by this extension are visible. Turn it off and sign in again. Recently edited documents can also take a moment to show up in content search. |
| The document changed since its positions were read. Ask Claude to re-read the document and try again. |
| Google API quota exceeded. Wait a minute and retry. |
The extension fails to start or reports Node.js as incompatible | The extension needs Node.js 22 or newer. Update Claude Desktop, or install Node.js 22+ and let Claude Desktop use it instead of its built-in runtime (Settings → Extensions → Advanced settings, where available). |
Where are the logs? | Claude Desktop keeps MCP server logs in its logs folder: |
Updating and Uninstalling
Updating. Download the new google-docs-mcp.mcpb and install it the same way; Claude Desktop replaces the existing version. Your Google sign-in is stored outside the extension, so you normally don't need to sign in again.
Uninstalling.
Optional but recommended: ask Claude to sign out of Google. This revokes access and deletes the token file.
In Settings → Extensions, open Google Docs for Claude and choose Uninstall.
If you didn't sign out first, delete the token file (
~/.config/google-docs-mcp/tokens.jsonon macOS and Linux,%APPDATA%\google-docs-mcp\tokens.jsonon Windows) and remove the app's access at myaccount.google.com/permissions.
Standalone MCP Server
The same server runs without Claude Desktop, from any MCP client that supports stdio servers.
Requirements
Node.js 22.12 or newer.
The Google OAuth client from Setup.
Install and build
git clone https://github.com/ammarqaisar11a55/google-docs-mcp.git
cd google-docs-mcp
npm ci
npm run buildConfigure
cp .env.example .envEdit .env:
Variable | Default | Description |
| – | OAuth client ID (Desktop app). Required. |
| – | OAuth client secret. Required. |
|
| Loopback URL ( |
|
| Token file location. On Windows the default is |
|
|
|
|
| Boolean form of the same setting ( |
|
|
|
|
|
|
|
| Set to |
.env is read from the working directory and from the package root, and never overrides variables already set in the environment.
Sign in and run
node dist/index.js authnode dist/index.js statusOther commands: node dist/index.js logout signs out, npm start runs the server, and npm run dev runs it with automatic restarts. You can also sign in from the AI client with the authenticate tool.
Connect an MCP client
Claude Code
claude mcp add google-docs -- node /absolute/path/to/google-docs-mcp/dist/index.jsClaude Desktop (manual configuration instead of the extension), Cursor and other clients that use the mcpServers format:
{
"mcpServers": {
"google-docs": {
"command": "node",
"args": ["/absolute/path/to/google-docs-mcp/dist/index.js"]
}
}
}VS Code (.vscode/mcp.json):
{
"servers": {
"google-docs": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/google-docs-mcp/dist/index.js"]
}
}
}With credentials in <repo>/.env, no env block is needed. To see every tool interactively, use the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsDevelopment
npm ci # install dependencies from the lockfile
npm run dev # run the server from source with automatic restarts
npm test # unit tests (Google APIs mocked) and the stdio integration test
npm run typecheck # type-check sources, tests and scripts
npm run lint # ESLint (strict, type-aware)
npm run format # Prettier
npm run build # compile to dist/ (standalone server)
npm run package # build the Claude Desktop extension: build/google-docs-mcp.mcpb
npm run package:check # verify the .mcpb: contents, secrets, and a real launch
npm run validate:manifest # validate manifest.json with the official mcpb CLInpm run package does the following:
Compiles the server into
build/bundlewithout source maps.Installs only the production dependencies from
package-lock.json(npm ci --omit=dev --ignore-scripts).Validates
manifest.jsonand packs the folder with Anthropic's official@anthropic-ai/mcpbpacker.
The result has no development dependencies, sources, tests or secrets, and needs nothing installed on the user's machine.
npm run package:check does the following:
Unpacks the bundle into a temporary folder.
Validates the manifest.
Checks that every runtime dependency is present, and rejects source files, source maps, development dependencies,
.envfiles, token files and anything that looks like a secret.Starts the bundled server outside the repository, with the same launch configuration Claude Desktop derives from
manifest.json.Checks the tools, prompts, resources and sign-in state over MCP.
Optional real-account tests. These create, edit and trash real documents, so use a test account:
RUN_GOOGLE_INTEGRATION_TESTS=true npm run test:integrationReleases. Bump version in both package.json and manifest.json (a unit test enforces that they match), update CHANGELOG.md, then push a vX.Y.Z tag. The release workflow runs every check, builds and verifies the .mcpb, and attaches it to the GitHub release. See CONTRIBUTING.md.
Architecture
Claude Desktop
│ installs google-docs-mcp.mcpb, stores the settings (client secret as a sensitive value)
│ and launches: node ${__dirname}/dist/index.js with the settings as environment variables
▼
MCP server (stdio, @modelcontextprotocol/server v2) ← also usable standalone: node dist/index.js
│
├── Tools / Resource / Prompts src/tools, src/resources, src/prompts
│ ▼
├── Services (validation, business logic) src/services
│ ▼
├── Google API clients src/google (@googleapis/docs, @googleapis/drive)
│ ▲
└── Google OAuth 2.0 src/auth
│ authorization code + PKCE, loopback redirect on 127.0.0.1
│ tokens in a local 0600 file, refreshed automatically
▼
Google Docs API · Google Drive APIgoogle-docs-mcp/
├── manifest.json # Claude Desktop extension manifest (MCPB 0.3)
├── assets/icon.png # Extension icon
├── src/ # Server source (TypeScript)
├── scripts/ # package-mcpb.ts, verify-mcpb.ts
├── tests/ # Unit and integration tests
└── .github/workflows/ # CI and releaseSecurity
No secrets in the code or the package. The OAuth Client ID and secret come from the extension settings, where Claude Desktop stores the secret as a sensitive value, or from environment variables in standalone mode.
npm run package:checkfails if a.env, token or credentials file, or a token-like string, ends up in the bundle.OAuth 2.0 done properly.
Sign-in uses the authorization-code flow with PKCE (S256) and a random
statethat is checked in constant time.The redirect only goes to a loopback address.
The temporary callback server exists only during sign-in (at most 5 minutes).
Token storage.
Refresh and access tokens are created at runtime, and MCPB offers no host storage for runtime-generated secrets. So they are stored in a local file (
tokens.json) with mode0600inside a0700folder, written atomically.Tokens are only sent to Google, never returned by any tool, and are bound to the OAuth client that issued them.
sign_outrevokes the grant at Google and deletes the file.
No token logging. Logs go to stderr only; stdout is reserved for MCP. Tokens, client secrets, authorization codes and
Authorizationheaders are redacted, tool arguments (which may contain document content) are never logged, and library stack traces are never logged or returned.Safe errors. Tool errors carry a stable code and a readable, actionable message without secrets, stack traces or file paths.
Input validation. Every tool has a strict schema that rejects unknown arguments. Document IDs and URLs must match a strict pattern, positions are checked against the live document before writing, link URLs must be
http,httpsormailto, and Drive search input is escaped.Safe edits.
delete_documentonly moves Google Docs files to the trash.delete_textcan verify the text it is about to delete. Writes usetargetRevisionId, so concurrent edits by collaborators don't shift positions onto the wrong text.Settings isolation. The extension ignores
.envfiles, so a stray file can't change its configuration. An invalid configuration doesn't crash the server: tools report exactly what to fix.Dependencies. Only five runtime dependencies (the MCP SDK, Google's official API clients and auth library, and zod). The bundle is installed from the lockfile with install scripts disabled, and
npm auditreports no known vulnerabilities at the time of release.
License
MIT © Muhammad Ammar Qaisar
Available Tools
21 toolsappend_textAppend text to Google DocA
Append text to the end of a Google Doc’s body. No indexes are needed, so prefer this over insert_text whenever content should go at the end. By default the text starts in a new paragraph (a paragraph break is added first if the last paragraph is not empty); set startNewParagraph=false to continue the last paragraph instead. Use "\n" inside text to create further paragraphs. Returns insertedLength and the index range of the appended text (textStartIndex/textEndIndex), which can be passed to format_text or set_paragraph_style. Carriage returns become "\n" and control characters Google Docs cannot store are removed.
Inputs: text (required), documentId (required), startNewParagraph.
authenticateSign in with GoogleA
Start the Google OAuth sign-in. Returns an authUrl that the user must open in a browser on the computer running this server to approve access to Google Docs and Drive; the server receives the result automatically on a local loopback address. Show the URL to the user, wait for them to confirm they approved access, then call get_auth_status. If already signed in, nothing happens unless force is true.
Inputs: force, openBrowser.
copy_documentCopy Google DocA
Create a copy of an existing Google Doc with a new title (content and formatting are copied). Returns the new document’s ID and URL. Useful for templates or making a backup before large edits.
Inputs: newTitle (required), documentId (required).
create_bulleted_listCreate list in Google DocAIdempotent
Turn every paragraph that overlaps the index range [startIndex, endIndex) of a Google Doc into a list item: listType "bulleted" (default), "numbered" (1., a., i.) or "checkbox". Consecutive paragraphs become one list; to build a list from new content, append or insert the items as separate lines ("\n"-separated) first, then call this with their range. Leading tab characters in the paragraphs are converted into nesting levels and removed, which shifts later indexes; otherwise indexes are unchanged. Get paragraph indexes from get_document’s structure outline.
Inputs: endIndex (required), documentId (required), startIndex (required), listType.
create_documentCreate Google DocA
Create a new Google Docs document with the given title in the user’s Google Drive, optionally filled with initial plain text. Returns the new documentId, title and URL. Headings, bold text and lists are not created from the text: apply them afterwards with set_paragraph_style, format_text or create_bulleted_list (use find_text or get_document for the indexes). To add more content later use append_text.
Inputs: title (required), initialContent.
delete_documentMove Google Doc to trashADestructiveIdempotent
Delete a Google Doc by moving it to the user’s Google Drive trash. It is NOT permanently deleted and can be restored from the Drive trash for 30 days. Only Google Docs files are accepted. Only call this when the user clearly asked to delete this specific document; if it is ambiguous which document is meant, ask the user first.
Inputs: documentId (required).
delete_textDelete text from Google DocADestructive
DESTRUCTIVE: delete the content in the index range [startIndex, endIndex) of a Google Doc (endIndex is exclusive). Get the indexes from get_document or find_text immediately before calling. Strongly recommended: pass expectedText with the exact text currently in that range (including any "\n" paragraph breaks); if it does not match, nothing is deleted and the current text is returned, which protects against stale indexes. The document’s final newline cannot be deleted (the maximum endIndex is bodyEndIndex-1). Deleting a paragraph break merges the two paragraphs; tables can only be deleted as a whole, although the text inside a cell can be deleted. Every later index shifts back by deletedLength. Deleted content can only be recovered from the Google Docs version history. To delete every occurrence of a phrase use replace_text with an empty replacementText.
Inputs: endIndex (required), documentId (required), startIndex (required), expectedText.
find_textFind text in a Google DocARead-only
Find every occurrence of a literal phrase in a Google Doc (including text inside table cells) and return the exact startIndex/endIndex of each match, its paragraph style, whether it is in a table, and a short context snippet. Use this to get exact indexes for index-based tools such as format_text, delete_text, insert_link or insert_text. Matching is literal (no wildcards or regular expressions), case-insensitive unless matchCase is true, and a match cannot span paragraphs or include the paragraph’s line break. Indexes are only valid until the document is edited: when applying several edits, work from the last occurrence backwards.
Inputs: text (required), documentId (required), matchCase, maxResults.
format_textFormat text in Google DocAIdempotent
Apply character formatting to the text in the index range [startIndex, endIndex) of a Google Doc (endIndex is exclusive): bold, italic, underline, strikethrough, fontSize (points), fontFamily (e.g. "Arial", "Roboto") and foregroundColor/backgroundColor (hex such as #1A73E8). Only the properties you pass are changed; all other formatting is kept. Pass false to remove bold, italic, underline or strikethrough. At least one property is required. Get indexes from get_document or find_text (append_text and insert_text also return the range of the new text). Does not change text or indexes.
Inputs: endIndex (required), documentId (required), startIndex (required), bold, +7 more.
get_auth_statusGet Google sign-in statusARead-only
Check whether this server is signed in to Google and holds the permissions required for Google Docs and Google Drive. Use it when another tool fails with NOT_AUTHENTICATED or AUTH_EXPIRED, or after the user finishes signing in via authenticate. Never returns tokens.
Inputs: no named parameters.
get_documentRead Google DocARead-only
Read a Google Doc: returns its title, URL, plain-text content and (by default) a structure outline listing every top-level paragraph and table with exact startIndex/endIndex, heading style and alignment. Also returns bodyEndIndex (valid insertion indexes are 1..bodyEndIndex-1). Use this before index-based edits such as insert_text, delete_text or format_text. Long documents are truncated to maxTextLength characters.
Inputs: documentId (required), maxTextLength, includeStructure.
insert_linkInsert hyperlink in Google DocAIdempotent
Turn the existing text in the index range [startIndex, endIndex) of a Google Doc into a hyperlink to url (http, https and mailto links only). The text itself is not changed and any link already on it is replaced. To link new text, first add it with insert_text or append_text (both return the new text’s range), then link that range. Get indexes from get_document or find_text. Does not change indexes.
Inputs: url (required), endIndex (required), documentId (required), startIndex (required).
insert_page_breakInsert page break into Google DocA
Insert a page break at an index of a Google Doc, so the content after it starts on a new page. The index must be inside an existing body paragraph (not inside a table, header, footer or footnote); to break before a paragraph use its startIndex from get_document or find_text. Inserting shifts every later index, so re-read the document with get_document before further index-based edits.
Inputs: index (required), documentId (required).
insert_tableInsert table into Google DocA
Insert an empty table with the given number of rows and columns at an index of a Google Doc. Google inserts a paragraph break before the table, so the table starts at index + 1 (returned as tableStartIndex). The index must be inside an existing paragraph — not at a table’s start and not inside a footnote; to add a table at the end use bodyEndIndex-1 from get_document. Every cell starts with an empty paragraph: call get_document afterwards to get exact cell indexes, then fill cells with insert_text starting from the LAST cell so earlier indexes stay valid. Inserting shifts every later index.
Inputs: rows (required), index (required), columns (required), documentId (required).
insert_textInsert text into Google DocA
Insert text at a specific index of a Google Doc. Get the index from get_document (the structure outline’s startIndex/endIndex) or find_text; the body starts at index 1 and the largest valid index is bodyEndIndex-1. To insert at the start of a paragraph use its startIndex. The inserted text takes the style of the neighbouring text, and "\n" creates new paragraphs. Inserting shifts every later index by insertedLength, so when making several index-based edits work from the end of the document backwards or re-read it with get_document. To add text at the end use append_text; to change existing wording use replace_text.
Inputs: text (required), index (required), documentId (required).
list_documentsList Google DocsARead-only
List Google Docs the user can access in Google Drive, most recently modified first. Optionally filter by text contained in the document name (search). Returns documentId, name, URL, createdTime and modifiedTime, plus nextPageToken for pagination. To search inside document content use search_documents.
Inputs: limit, search, pageToken.
replace_textReplace text in Google DocADestructive
Replace ALL occurrences of searchText throughout the entire Google Doc with replacementText, in one operation. An empty replacementText DELETES every occurrence. Matching is plain text (no regular expressions) and case-insensitive unless matchCase is true, so a short search such as "an" may also match inside other words. If the search text is short or could match more than intended, preview the matches with find_text first, and use insert_text/delete_text for a single occurrence. Returns occurrencesChanged (0 means nothing matched and the document is unchanged). Indexes after each changed occurrence shift when the lengths differ. No index is needed.
Inputs: documentId (required), searchText (required), replacementText (required), matchCase.
search_documentsSearch Google DocsARead-only
Search the user’s Google Drive for Google Docs by name and/or content. Only Google Docs the user can access and that are not in the trash are returned (other file types are never included).
searchIn "name": case-insensitive match on the document name. Drive matches words that start with the query ("Prop" finds "FYP Proposal"), so a fragment from the middle of a word may not match. Results sorted by most recently modified.
searchIn "content": Google Drive full-text search of document content. It is word/prefix based (not exact substring or phrase matching), also matches document names, and may lag behind very recent edits because Drive indexes content asynchronously. Results are ordered by relevance.
searchIn "both" (default): name OR full-text match, ordered by relevance. Returns documentId, name, URL, createdTime and modifiedTime for each match, plus nextPageToken for pagination. To locate text inside one specific document use find_text; to list recent documents use list_documents.
Inputs: query (required), limit, searchIn, pageToken.
set_alignmentSet paragraph alignment in Google DocAIdempotent
Set the horizontal alignment of every paragraph that overlaps the index range [startIndex, endIndex): START (left in left-to-right text), CENTER, END (right in left-to-right text) or JUSTIFIED. Whole paragraphs are aligned even if the range covers only part of one. Get paragraph indexes from get_document’s structure outline or find_text. Does not change text or indexes.
Inputs: endIndex (required), alignment (required), documentId (required), startIndex (required).
set_paragraph_styleSet paragraph style in Google DocAIdempotent
Set the named paragraph style — NORMAL_TEXT, TITLE, SUBTITLE or HEADING_1 to HEADING_6 — of every paragraph that overlaps the index range [startIndex, endIndex). Whole paragraphs are restyled even if the range covers only part of one, so a range inside a single line changes just that line’s paragraph. Use it to turn a line into a heading or back into normal text. Get paragraph startIndex/endIndex from get_document’s structure outline or find_text. Does not change text or indexes.
Inputs: style (required), endIndex (required), documentId (required), startIndex (required).
sign_outSign out of GoogleADestructiveIdempotent
Sign out: revoke this server’s Google access and delete the locally stored OAuth tokens. After this, every Google Docs tool fails until authenticate is called again. Only use it when the user explicitly asks to sign out or switch accounts.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools map cleanly to distinct resources and actions: document lifecycle, text insertion, formatting, and search are clearly separated. The only mild ambiguity is list_documents vs. search_documents, both of which can filter by name, but their descriptions make the intended use cases clear.
The majority of tools follow a consistent snake_case verb_noun pattern, such as get_document, create_document, insert_text, and delete_text. Minor deviations like sign_out and authenticate break the strict pattern, but the overall naming is predictable and readable.
21 tools is on the heavier side, but the breadth of Google Docs functionality—auth, document CRUD, text editing, formatting, tables, lists, links, and search—justifies the count. Each tool has a distinct role, and the set does not feel padded or redundant.
The surface covers the full document lifecycle plus rich editing, formatting, search, and auth flows, with no obvious dead ends. Minor gaps exist—such as no rename, export, image insertion, or comment handling—but these are reasonable omissions for a core Google Docs MCP server.
Maintenance
Related MCP Connectors
Google Docs MCP Pack — read, create, and edit Google Docs via OAuth. Reuses the google_sheets…
Online office suite for AI agents: edit docs, sheets, slides and PDFs in browser or via MCP.
An agent-first office suite Claude & ChatGPT read and write over one MCP URL.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for Google Docs — create, read, edit, format, and manage documents through 26 tools via the Model Context Protocol.8 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables management of Google Drive files, Docs, Sheets, Slides, and Calendar events through natural language using the MCP protocol.7,588 npm235MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Google Docs and Sheets that enables AI assistants to read, create, edit, style, export, and collaborate on documents using local OAuth authentication.19 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI assistants to interact with a user's Google Drive, including listing, searching, reading, creating, updating, and deleting files, with authentication via Google OAuth.1-