LLM2Docs (Unofficial)

LLM2Docs (Unofficial)

An unofficial MCP server for Google Docs that lets large language models securely access, read, and interact with documents, enabling smarter workflows and AI-assisted editing.

Category
访问服务器

README

LLM2Docs (Unofficial)

google-docs-mcp-server

<div align="center">

LLM2Docs Logo Version License Node.js

Unofficial MCP bridge between LLMs and Google Docs

Quick Start • Documentation • Features • Contributing

</div>


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

  • AI-Powered: Seamless integration with Claude Desktop and other LLMs
  • Comprehensive: 40+ tools for complete document management
  • Professional: Advanced formatting for technical documentation
  • Efficient: Batch operations and smart automation
  • Secure: OAuth 2.0 authentication with Google APIs
  • Unofficial: Built by the community, for the community

Quick Start

Prerequisites

  • Node.js 18+ installed
  • Google Cloud Project with APIs enabled
  • Claude Desktop for AI integration

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 {{ site.baseurl }} 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

  • Create Documents: New Google Docs with optional initial content
  • Read Documents: Complete document content retrieval
  • Search Documents: Find documents by name across your Drive
  • Document Metadata: Access creation dates, owners, and properties

Text Operations

  • Append Text: Add content to document ends
  • Insert Text: Place content at specific positions
  • Delete Text: Remove content from specified ranges
  • Replace Text: Find and replace text with precision

Font Management

  • Font Family: Change fonts (Arial, Times New Roman, Calibri, etc.)
  • Font Size: Precise point-based sizing
  • Font Weight: Bold/normal control
  • Font Style: Italic/normal formatting
  • Comprehensive Formatting: Apply multiple font changes simultaneously

Lists & Spacing

  • Bulleted Lists: Create with different bullet styles
  • Numbered Lists: Various numbering formats (decimal, roman, alpha)
  • Line Spacing: Single, 1.5x, double, or custom spacing
  • Paragraph Spacing: Control before/after paragraph spacing

Text Formatting

  • Case Transformation: Uppercase, lowercase, title case
  • Subscript/Superscript: Scientific notation support
  • Text Styling: Bold, italic, underline, strikethrough
  • Colors: Foreground and background color control
  • Headings: H1-H6, title, and subtitle styles

Advanced Tables

  • Table Formatting: Borders, colors, and professional styling
  • Cell Management: Merge cells horizontally or vertically
  • Row/Column Operations: Insert, delete, and manage table structure
  • Column Widths: Precise control over table dimensions
  • Header Rows: Professional table headers with formatting

Media & Images

  • Image Insertion: From URLs with automatic sizing
  • Image Resizing: Precise dimension control
  • Image Alignment: Left, center, right positioning
  • Image Captions: Accessibility-focused captions
  • Drawings: Insert shapes, arrows, and diagrams

Document Structure

  • Table of Contents: Auto-generated navigation
  • Section Breaks: Next page, continuous, even/odd page breaks
  • Bookmarks: Named anchors for navigation
  • Cross-References: Link to bookmarks and headings
  • Headers & Footers: Professional document headers with page numbers
  • Footnotes: Academic-style citations and notes

Search & Content Management

  • Find & Replace: Case-sensitive text replacement
  • Document Search: Find text with context and positions
  • Word Count: Comprehensive document statistics
  • Spell Check: Automated spelling suggestions
  • Content Analysis: Character counts, paragraph analysis

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

  • Use TypeScript for type safety
  • Follow ESLint configuration
  • Write comprehensive tests
  • Document new features

License

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


Acknowledgments

  • Anthropic for the Model Context Protocol specification
  • Google for the comprehensive Docs and Drive APIs
  • Claude AI for seamless integration capabilities
  • Open Source Community for inspiration and support

Support


<div align="center">

Made with ❤️ for the AI and documentation community

⭐ Star this repo • 🐛 Report Bug • 💡 Request Feature

</div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选