Token导航 LogoToken导航TokenDH.com
Google Docs & Drive MCP Server logo
文档知识未说明官方级别未说明来源级核验

Google Docs & Drive MCP Server

MCP Server

为AgenticLedger AI Agent平台提供全面的Google文档和Drive集成的生产就绪MCP服务器。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
TypeScriptClaude文档处理Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

oregpt

提供方

oregpt

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

GoogleDocsMCP - AgenticLedger Platform

Google Docs & Drive MCP Server

![TypeScript](https://www.typescriptlang.org/) ](https://nodejs.org/) ![License: MIT](https://opensource.org/licenses/MIT) ![Google Docs API](https://developers.google.com/docs/api) ![Google Drive API](https://developers.google.com/drive/api)

Production-ready MCP server providing comprehensive Google Docs and Drive integration for the AgenticLedger AI Agent Platform.

🚀 Features

  • 30+ Production-Ready Tools - Document editing, formatting, comments, Drive file operations
  • OAuth 2.0 Authentication - Secure user-based authorization with automatic token refresh
  • Multi-Tab Document Support - Work with new Google Docs multi-tab feature
  • Rich Text Formatting - Bold, italic, colors, fonts, paragraph styles, named styles
  • Comment Management - Full CRUD operations on document comments
  • Google Drive Integration - List, search, create, move, copy, delete documents
  • Type-Safe - Full TypeScript with Zod schema validation
  • 100% Documented - Comprehensive guides for developers and AI agents

📦 Quick Start

Installation

# Clone repository
git clone https://github.com/oregpt/Agenticledger_MCP_DocsOnly.git
cd Agenticledger_MCP_DocsOnly

# Install dependencies
npm install

# Build
npm run build

Authentication Setup

  1. Create Google Cloud Project (see GOOGLE_CLOUD_SETUP.md)
  2. Enable Google Docs API + Google Drive API
  3. Configure OAuth Consent Screen
  4. Create OAuth 2.0 credentials and download credentials.json
  5. Place credentials.json in this directory
  6. Run first-time authorization:
node dist/server.js
# Follow OAuth flow in browser
# token.json will be created automatically

Run Tests

npm run test:integration

🛠️ Available Tools (30+)

Document Access & Editing (5 tools)

  • readGoogleDoc - Read document (text/json/markdown formats)
  • appendToGoogleDoc - Append text to end of document
  • insertText - Insert text at specific index
  • deleteRange - Delete content range
  • listDocumentTabs - List tabs in multi-tab documents

Formatting & Styling (3 tools)

  • applyTextStyle - Character-level formatting (bold, colors, fonts)
  • applyParagraphStyle - Paragraph formatting (alignment, spacing, styles)
  • formatMatchingText - Legacy formatting tool

Document Structure (4 tools)

  • insertTable - Create tables
  • insertPageBreak - Insert page breaks
  • insertImageFromUrl - Insert image from URL
  • insertLocalImage - Upload and insert local image

Comment Management (6 tools)

  • listComments - List all document comments
  • getComment - Get specific comment details
  • addComment - Create comment anchored to text
  • replyToComment - Reply to existing comment
  • resolveComment - Mark comment as resolved
  • deleteComment - Remove comment

Google Drive Integration (12 tools)

  • listGoogleDocs - List all documents
  • searchGoogleDocs - Search documents by name/content
  • getRecentGoogleDocs - Get recently modified documents
  • getDocumentInfo - Get file metadata
  • createDocument - Create new document
  • createFromTemplate - Create from template
  • createFolder - Create Drive folder
  • listFolderContents - List folder files
  • getFolderInfo - Get folder metadata
  • moveFile - Move to different folder
  • copyFile - Create copy
  • renameFile - Rename document
  • deleteFile - Delete (move to trash)

📖 Documentation

For Developers

For AI Agents

Example Files

  • credentials.example.json - OAuth credentials format
  • token.example.json - Token format example
  • test-integration.ts - Integration test suite

💡 Example Usage

Read Document

const result = await readGoogleDoc({
  documentId: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
  format: "text"  // or "json" or "markdown"
});

Append Text

await appendToGoogleDoc({
  documentId: "1BxiMVs0XRA...",
  textToAppend: "\n\nNew section added by AI Agent"
});

Apply Formatting

await applyTextStyle({
  documentId: "1BxiMVs0XRA...",
  target: {
    textToFind: "Important Note",
    matchInstance: 1
  },
  style: {
    bold: true,
    foregroundColor: "#FF0000",
    fontSize: 14
  }
});

Create Document

const newDoc = await createDocument({
  title: "AI Generated Report",
  folderId: "your-folder-id"
});

Work with Multi-Tab Documents

// List tabs
const tabs = await listDocumentTabs({
  documentId: "1BxiMVs0XRA..."
});

// Read specific tab
await readGoogleDoc({
  documentId: "1BxiMVs0XRA...",
  tabId: tabs.data.tabs[0].tabId
});

🔐 Security

  • Never commit credentials (credentials.json, token.json)
  • OAuth tokens expire after 1 hour (auto-refresh handled)
  • Revoke access at https://myaccount.google.com/permissions
  • User-based authentication - only accesses user's documents
  • Monitor usage in Google Cloud Console

📊 Performance

  • Average Response Time: 725ms per operation (includes Drive API)
  • Document Read: ~300ms (fast, cached by Google)
  • Text Editing: ~450ms (simple updates)
  • Drive Operations: ~650ms (includes Drive API calls)
  • API Quotas: 300 requests per minute per user

🔄 Multi-Tab Document Support

Google Docs now supports multiple tabs. This server fully supports this feature:

// Tab-aware tools accept optional tabId parameter
- readGoogleDoc
- appendToGoogleDoc
- insertText
- deleteRange

Usage:

  1. List tabs with listDocumentTabs
  2. Target specific tab with tabId parameter
  3. Works without tabId (targets first tab/legacy doc body)

🤝 Contributing

This is an AgenticLedger platform-customized version of a-bonus/google-docs-mcp.

AgenticLedger Customizations:

  • Platform-specific documentation
  • Integration test suite
  • AI agent guides
  • Example files and templates
  • Enhanced error handling

📜 License

MIT License - See LICENSE file

🔗 Links

  • Repository: https://github.com/oregpt/Agenticledger_MCP_DocsOnly
  • Upstream Source: https://github.com/a-bonus/google-docs-mcp
  • AgenticLedger Platform: [Platform Documentation]
  • Google Docs API: https://developers.google.com/docs/api
  • Google Drive API: https://developers.google.com/drive/api

📞 Support

  1. Check Documentation:

- README_AGENTICLEDGER.md - Integration guide - PLATFORM_INTEGRATION_REPORT.md - Tool reference - GOOGLE_CLOUD_SETUP.md - OAuth help - CLAUDE.md - Advanced features

  1. Run Diagnostics:
   npm run test:integration
  1. Review Examples:

- See test-integration.ts for real API usage examples

🆚 Comparison: Docs vs Sheets

Use GoogleDocsMCP when:

  • Creating reports, letters, proposals
  • Need rich text formatting
  • Working with narrative content
  • Require document structure (headings, TOC)
  • Need comment collaboration

Use GoogleSheetsMCP when:

  • Working with tabular data
  • Need calculations/formulas
  • Creating charts and graphs
  • Data analysis tasks
  • Structured records

Status: ✅ Production Ready Version: 1.0.0 Last Updated: 2025-11-03 Total Tools: 30+ Platform: AgenticLedger

目录标签

目录标签

TypeScriptClaude文档处理文档编辑本地部署GoogleDrive集成多标签文档支持评论管理文本格式化

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauthlocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP