Home / MCP / Ultimate Google Docs & Drive MCP Server

Ultimate Google Docs & Drive MCP Server

Provides programmatic access to Google Docs and Drive for reading, writing, formatting, and file management via MCP

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "google_docs_mcp": {
            "command": "node",
            "args": [
                "dist/server.js"
            ]
        }
    }
}

This MCP server enables Claude Desktop and other MCP clients to read, write, format, and manage Google Docs and Google Drive through a single, scalable bridge. It exposes a rich set of document editing features and Drive file operations, letting you automate workflows, create or modify documents, organize folders, and handle comments programmatically with your AI assistant.

How to use

You connect your MCP client to this server to perform operations on Google Docs and Drive. Use the available tools to read documents, append content, insert text, format styling, manage pages and images, handle comments, and perform Drive actions like creating folders, uploading files, moving, copying, and renaming items. If you work with multi-tab Google Docs, you can read, write, and manage specific tabs using the tabId parameter to target the correct section.

How to install

Prerequisites: install Node.js and npm, and have Git installed. You also need a Google account with access to the Google Docs you will manage.

# 1) Install Node.js and npm (from https://nodejs.org) if you don’t have them

# 2) Clone the MCP server repository
git clone https://github.com/a-bonus/google-docs-mcp.git mcp-googledocs-server

# 3) Move into the project directory
cd mcp-googledocs-server

# 4) Place credentials.json (OAuth client) in this folder
# (credential file obtained from Google Cloud Console and renamed to credentials.json)

# 5) Install dependencies
npm install

# 6) Build the TypeScript source to JavaScript
npm run build

# 7) Start once to complete Google authorization (performed once for initial setup)
node ./dist/server.js

Configuration and security

You authenticate with Google using OAuth 2.0. You store the authorization token in token.json within the project folder. Keep credentials.json and token.json secure and do not commit them to version control.

Claude can automatically launch and connect to the server after you configure it in your MCP client. The standard approach is to run the server locally and point the MCP client to that process using a stdio config.

{
  "mcpServers": {
    "google_docs_mcp": {
      "command": "node",
      "args": ["dist/server.js"]
    }
  }
}

Troubleshooting

If you see connection or authorization issues, confirm that the correct Google APIs are enabled (Google Docs API and Google Drive API), that the credentials.json file is in the project root, and that you added your Google account as a Test User in the OAuth consent screen setup.

Notes on multi-tab documents

The server supports multi-tab Google Docs. Use the tabId parameter to target specific tabs for reading, appending, inserting, or deleting content. If tabId is omitted, operations default to the first tab or the document body for single-tab documents.

Available tools

readGoogleDoc

Read content from a Google Doc as plain text, JSON, or markdown. Supports reading with an optional tabId to target a specific tab.

appendToGoogleDoc

Append text to a Google Doc or a specific tab within the document.

insertText

Insert text at a specified index in a document or a specific tab.

deleteRange

Delete content within a specified range in a document or a specific tab.

listDocumentTabs

List all tabs in a Google Doc, including IDs and summaries.

insertTable

Create a table at a given index within a document.

insertPageBreak

Insert a page break at a specified position in a document.

insertImageFromUrl

Insert an image from a publicly accessible URL at a given position in a document.

insertLocalImage

Upload a local image to Google Drive and insert it into a document at a specified position.

fixListFormatting

Automatically detect and fix list formatting in a document.

listComments

List all comments in a document with authors, dates, and quoted text.

getComment

Retrieve a specific comment and its replies.

addComment

Add a new comment anchored to selected text in a document.

replyToComment

Add a reply to an existing comment.

resolveComment

Mark a comment as resolved if supported by the API.

deleteComment

Delete a comment from a document.

listGoogleDocs

List Google Docs accessible to your account.

searchGoogleDocs

Search Google Docs by keywords or metadata.

getRecentGoogleDocs

Retrieve recently accessed Google Docs.

getDocumentInfo

Fetch detailed metadata for a Google Doc.

createFolder

Create a new folder in Google Drive.

listFolderContents

List contents of a Drive folder.

getFolderInfo

Get metadata for a Drive folder.

moveFile

Move a file within Google Drive.

copyFile

Copy a file in Google Drive.

renameFile

Rename a file in Google Drive.

deleteFile

Delete a file from Google Drive.

createDocument

Create a new Google Doc from scratch.

createFromTemplate

Create a Google Doc from a template.