# Google Docs MCP

> Google Docs MCP is an open-source MCP server for files and documents. Read, edit and export Google Docs from an AI app, by exact index range. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted
- **Repository:** https://github.com/a1-x-tech/mcp-google-docs
- **MCP Registry name:** io.github.A1-x-Tech/mcp-google-docs
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [productivity](https://ai-powered.com/categories/productivity)
- **Listing updated:** 2026-11-18

## About

Edits are addressed by UTF-16 index ranges inside a document tab, and every insert or delete shifts the indexes that follow. The server therefore steers the assistant to re-read the text before each change and to work from the end of the document backwards, so a single paragraph can be replaced without disturbing the rest.

It is deliberately open about what the Docs API cannot do. Tabs can be read and targeted but not created, renamed or reordered. New comments cannot be anchored to a text range, so they attach at document level and can quote the passage they refer to. Replacing a whole body from Markdown is a separate, explicitly destructive step that drops comment anchors, headers, footers and extra tabs.

Exports to PDF, DOCX or Markdown are capped at 10 MB and leave out comments and suggestions. Inline images are fetched by Google from a public URL, so there is no way to upload an image file. The package runs locally over stdio with Node.js 20 or newer.

## Features

- **27 document tools:** Read as text, structure or Markdown, edit ranges, style text, manage lists, tables, breaks and images.
- **Comment threads:** List, reply to, resolve and add document-level comments.
- **Markdown both ways:** Create a document from Markdown or export to Markdown, PDF and DOCX.
- **Connect from chat:** An in-chat OAuth login with PKCE on 127.0.0.1 stores the tokens itself.
- **No general Drive access:** Drive endpoints are used only for export, conversion and comments.

## Good for

- Summarize a document together with its open comment threads
- Replace one paragraph without touching the rest of the file
- Create meeting notes from Markdown
- Export a spec to PDF or DOCX
- Insert a table and fill in its header row

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-google-docs --env GOOGLE_DOCS_CLIENT_SECRET='<GOOGLE_DOCS_CLIENT_SECRET>' --env GOOGLE_DOCS_REFRESH_TOKEN='<GOOGLE_DOCS_REFRESH_TOKEN>' --env GOOGLE_DOCS_ACCESS_TOKEN='<GOOGLE_DOCS_ACCESS_TOKEN>' -- npx -y @a1-x-tech/mcp-google-docs
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-google-docs": {
      "command": "npx",
      "args": [
        "-y",
        "@a1-x-tech/mcp-google-docs"
      ],
      "env": {
        "GOOGLE_DOCS_CLIENT_SECRET": "<GOOGLE_DOCS_CLIENT_SECRET>",
        "GOOGLE_DOCS_REFRESH_TOKEN": "<GOOGLE_DOCS_REFRESH_TOKEN>",
        "GOOGLE_DOCS_ACCESS_TOKEN": "<GOOGLE_DOCS_ACCESS_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-google-docs": {
      "command": "npx",
      "args": [
        "-y",
        "@a1-x-tech/mcp-google-docs"
      ],
      "env": {
        "GOOGLE_DOCS_CLIENT_SECRET": "<GOOGLE_DOCS_CLIENT_SECRET>",
        "GOOGLE_DOCS_REFRESH_TOKEN": "<GOOGLE_DOCS_REFRESH_TOKEN>",
        "GOOGLE_DOCS_ACCESS_TOKEN": "<GOOGLE_DOCS_ACCESS_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-google-docs": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@a1-x-tech/mcp-google-docs"
      ],
      "env": {
        "GOOGLE_DOCS_CLIENT_SECRET": "<GOOGLE_DOCS_CLIENT_SECRET>",
        "GOOGLE_DOCS_REFRESH_TOKEN": "<GOOGLE_DOCS_REFRESH_TOKEN>",
        "GOOGLE_DOCS_ACCESS_TOKEN": "<GOOGLE_DOCS_ACCESS_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-google-docs": {
      "command": "npx",
      "args": [
        "-y",
        "@a1-x-tech/mcp-google-docs"
      ],
      "env": {
        "GOOGLE_DOCS_CLIENT_SECRET": "<GOOGLE_DOCS_CLIENT_SECRET>",
        "GOOGLE_DOCS_REFRESH_TOKEN": "<GOOGLE_DOCS_REFRESH_TOKEN>",
        "GOOGLE_DOCS_ACCESS_TOKEN": "<GOOGLE_DOCS_ACCESS_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-google-docs": {
      "command": "npx",
      "args": [
        "-y",
        "@a1-x-tech/mcp-google-docs"
      ],
      "env": {
        "GOOGLE_DOCS_CLIENT_SECRET": "<GOOGLE_DOCS_CLIENT_SECRET>",
        "GOOGLE_DOCS_REFRESH_TOKEN": "<GOOGLE_DOCS_REFRESH_TOKEN>",
        "GOOGLE_DOCS_ACCESS_TOKEN": "<GOOGLE_DOCS_ACCESS_TOKEN>"
      }
    }
  }
}
```

## Tools

- `create_document`: Creates an empty document or one converted from Markdown.
- `read_document_text`: Reads the document text with fresh indexes for editing.
- `import_markdown`: Replaces the entire document body from Markdown.

## FAQ

### Can it create or rename tabs?

No. Tabs can be read and targeted, but the Docs API cannot create, rename, delete or reorder them.

### Does it expose general Drive access?

No. It uses Drive endpoints internally for export, Markdown conversion and comments, but offers no general-purpose Drive tool.

### What does a Markdown import do to an existing document?

It replaces the entire body, so comment anchors, positioned objects, headers, footers and extra tabs do not survive.

### How do I sign in to Google?

You can say "connect" in the chat and the server walks you through creating an OAuth client and approving access, or you can supply a client id, client secret and refresh token as environment variables.

### Is Google Docs MCP free?

Yes. Google Docs MCP is open source, so you can use and self-host it for free.

### How do I add Google Docs MCP to Claude Code?

Run this command in your terminal: claude mcp add mcp-google-docs --env GOOGLE_DOCS_CLIENT_SECRET='<GOOGLE_DOCS_CLIENT_SECRET>' --env GOOGLE_DOCS_REFRESH_TOKEN='<GOOGLE_DOCS_REFRESH_TOKEN>' --env GOOGLE_DOCS_ACCESS_TOKEN='<GOOGLE_DOCS_ACCESS_TOKEN>' -- npx -y @a1-x-tech/mcp-google-docs

### What are the best alternatives to Google Docs MCP?

The closest alternatives to Google Docs MCP are Ha MCP, Concord MCP, note1, SSRS2 and Csv.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Ha MCP](https://ai-powered.com/mcp/ha-mcp): Ha MCP is an open-source MCP server for productivity.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [SSRS2](https://ai-powered.com/mcp/ssrs2): SSRS2 is an MCP server for files and documents.
- [Csv](https://ai-powered.com/mcp/csv): Csv is a freemium MCP server for files and documents.
- [Zovo Spreadsheet Compare](https://ai-powered.com/mcp/zovo-spreadsheet-compare): Zovo Spreadsheet Compare is an MCP server for files and documents.
- [Jira](https://ai-powered.com/mcp/jira): Jira is a freemium MCP server for productivity.
- [InviteKit Calendar Files](https://ai-powered.com/mcp/invitekit-calendar-files): InviteKit Calendar Files is an MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/google-docs-mcp-2
