Google Docs MCP Server

April 14, 2025 ยท View on GitHub

A Google Docs MCP (Model Context Protocol) Server. This package provides functionalities to access, read, and edit Google Docs documents.

How to Install

Clone the repository and set up for local use:

  1. Clone the repository:

    git clone https://github.com/your-username/google-docs-mcp.git
    cd google-docs-mcp
    
  2. Install dependencies:

    npm install
    
  3. Set up Google Cloud authentication by following our detailed guide.

Usage

Using with Claude App, Cline, Roo Code, Cursor

When using with the Claude App, you need to set up your configuration directly:

{
  "mcpServers": {
    "Google Docs communication server": {
      "command": "node",
      "args": ["/absolute/path/to/google-docs-mcp/build/index.js"],
      "env": {
        "GOOGLE_DOCS_CREDENTIALS_PATH": "/path/to/credentials.json",
        "GOOGLE_DOCS_TOKEN_PATH": "/path/to/token.json"
      }
    }
  }
}

Environment Variables

  • GOOGLE_DOCS_CREDENTIALS_PATH: Path to Google API credentials file (default: credentials.json in the project root directory)
  • GOOGLE_DOCS_TOKEN_PATH: Path to authentication token file (default: token.json in the project root directory)

Authentication Setup ๐Ÿ”‘

Follow the detailed guide mentioned in the installation section to set up Google Cloud authentication.

Tools ๐Ÿ› ๏ธ

  1. google_docs_hello

    • Basic greeting functionality ๐Ÿ‘‹
    • Inputs:
      • name (string): Name of the person to greet
    • Returns: Greeting message
  2. google_docs_read_document

    • Read a Google Docs document ๐Ÿ“„
    • Inputs:
      • documentId (string): ID of the document to read
    • Returns: Document content and metadata
  3. google_docs_update_document

    • Update a Google Docs document ๐Ÿ“
    • Inputs:
      • documentId (string): ID of the document to update
      • content (string): New content for the document
    • Returns: Update status or confirmation
  4. google_docs_update_document_title

    • Update the title of a Google Docs document โœ๏ธ
    • Inputs:
      • documentId (string): ID of the document to update the title for
      • newTitle (string): The new title for the document
    • Returns: Update status or confirmation

License

MIT License