google-docs-mcp-server

LLM2Docs (Unofficial)

google-docs-mcp-server

![LLM2Docs Logo](https://img.shields.io/badge/LLM2Docs-Unofficial-blue?style=for-the-badge&logo=google-docs) ![Version](https://img.shields.io/badge/version-1.0.0-green?style=for-the-badge) ![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge) ![Node.js](https://img.shields.io/badge/Node.js-18+-green?style=for-the-badge&logo=node.js) **Unofficial MCP bridge between LLMs and Google Docs** [Quick Start](#quick-start) • [Documentation](#documentation) • [Features](#features) • [Contributing](#contributing)

Overview

LLM2Docs is an unofficial Model Context Protocol (MCP) server for Google Docs. It lets large language models securely access, read, and interact with your documents — enabling smarter workflows and AI-assisted editing.

Key Benefits


Quick Start

Prerequisites

Note: Place your Google OAuth client credentials as credentials.json at the project root (same folder as package.json). The app will store tokens in token.json automatically after first login.

Installation

  1. Clone the repository
    git clone https://github.com/NoManNayeem/google-docs-mcp-server.git
    cd google-docs-mcp-server
    
  2. Install dependencies
    npm install
    
  3. Set up Google Cloud credentials
    • Create a Google Cloud Project
    • Enable Google Docs API and Google Drive API
    • Download credentials.json to the project root
  4. Build the project
    npm run build
    
  5. Configure Claude Desktop Add to your claude_desktop_config.json:
    {
      "mcpServers": {
        "llm2docs": {
          "command": "node",
          "args": ["/path/to/google-docs-mcp-server/build/index.js"],
          "env": {
            "NODE_ENV": "production"
          }
        }
      }
    }
    
  6. Deploy docs to GitHub Pages
    • Ensure docs/_config.yml has: url: https://nomanayeem.github.io and baseurl: /google-docs-mcp-server
    • Make sure docs/index.html uses /google-docs-mcp-server for local assets
    • Set Pages source to /docs in repository settings
  7. Start using with Claude Desktop
    • Restart Claude Desktop
    • Begin with: “Create a new Google Doc with a title and some content”

Features

Document Management

Text Operations

Font Management

Lists & Spacing

Text Formatting

Advanced Tables

Media & Images

Document Structure

Search & Content Management


Documentation

Use Cases

Technical Documentation

# Create a technical manual
"Create a new document titled 'API Documentation' with a table of contents"

# Format code blocks
"Format the code examples with monospace font and syntax highlighting"

# Add cross-references
"Create a bookmark called 'authentication' and link to it from the overview"

Content Creation

# Professional formatting
"Make the title bold, 24pt, and center-aligned"

# Create structured content
"Create a bulleted list of features and a numbered list of steps"

# Add media
"Insert an image from this URL and add a caption"

Document Management

# Search and organize
"Find all documents containing 'project' in the title"

# Batch operations
"Replace all instances of 'old-version' with 'new-version'"

# Quality control
"Check spelling in this document and get word count statistics"

Advanced Configuration

Environment Variables

NODE_ENV=production
LOG_LEVEL=info
GOOGLE_CREDENTIALS_PATH=./credentials.json

Custom Authentication

// Custom OAuth configuration
const authConfig = {
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  redirectUri: 'http://localhost:3000/callback'
};

Architecture

Core Components

google-docs-mcp-server/
├── src/
│   ├── index.ts              # Main server entry point
│   ├── auth.ts               # OAuth 2.0 authentication
│   ├── types.ts              # TypeScript definitions
│   └── tools/
│       ├── create.ts         # Document creation tools
│       ├── read.ts           # Reading and search tools
│       ├── update.ts         # Text modification tools
│       ├── format.ts         # Formatting and styling tools
│       ├── tables.ts         # Advanced table management
│       ├── media.ts          # Image and media handling
│       ├── structure.ts      # Document structure tools
│       └── search.ts         # Search and content management
├── build/                    # Compiled JavaScript
├── docs/                     # Documentation website
└── package.json              # Project configuration

Tool Categories

Category Tools Purpose
Document 4 tools Create, read, search documents
Text 4 tools Modify and manipulate text
Font 5 tools Complete font management
Lists 2 tools Bulleted and numbered lists
Formatting 8 tools Text styling and alignment
Tables 7 tools Advanced table operations
Media 5 tools Images and drawings
Structure 6 tools Document organization
Search 4 tools Content discovery and management

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
    
  3. Make your changes
  4. Run tests
    npm test
    
  5. Commit your changes
    git commit -m 'Add amazing feature'
    
  6. Push to the branch
    git push origin feature/amazing-feature
    
  7. Open a Pull Request

Code Style


License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments


Support


**Made with ❤️ for the AI and documentation community** [⭐ Star this repo](https://github.com/NoManNayeem/google-docs-mcp-server) • [🐛 Report Bug](https://github.com/NoManNayeem/google-docs-mcp-server/issues) • [💡 Request Feature](https://github.com/NoManNayeem/google-docs-mcp-server/issues)