Skip to main content
Glama

mcp-google-docs

MCP Google Workspace 集成

一个全面的 MCP(Metoro 控制协议)工具,用于与 Google Workspace 服务(包括 Google 文档、表格、幻灯片和云端硬盘)进行交互。

特征

Google Drive 功能

  • 列出文件
  • 复制文件
  • 重命名文件
  • 创建空白电子表格
  • 从模板创建电子表格
  • 复制现有电子表格

Google 表格功能

  • 列表表
  • 复印件
  • 重命名工作表
  • 获取工作表数据
  • 添加/删除行
  • 添加/删除列
  • 更新单元格
  • 创建/更新/删除图表
  • 更新单元格格式

Google Docs 功能

  • 创建文档
  • 插入带格式的文本
  • 添加标题
  • 插入图片
  • 创建和管理表
  • 插入分页符
  • 添加水平线
  • 更新文档样式
  • 管理表格样式和内容

Google 幻灯片功能

  • 创建演示文稿
  • 添加幻灯片
  • 插入图片
  • 添加形状和线条
  • 更新文本样式
  • 修改幻灯片背景
  • 更新幻灯片布局
  • 添加幻灯片切换
  • 添加演讲者备注

安装

1.虚拟环境设置

macOS/Linux
# Create virtual environment python -m venv venv # Activate virtual environment source venv/bin/activate
视窗
# Create virtual environment python -m venv venv # Activate virtual environment venv\Scripts\activate

2.安装所需的软件包

pip install -r requirements.txt

3. Google Cloud Console 设置

  1. 在 Google Cloud Console 中创建项目
  2. 创建 OAuth 2.0 客户端 ID
  3. 启用所需的 API:
    • Google 表格 API
    • Google Drive API
    • Google 文档 API
    • Google 幻灯片 API

4.环境变量设置

export MCPGD_CLIENT_SECRET_PATH="/path/to/client_secret.json" export MCPGD_FOLDER_ID="your_folder_id" export MCPGD_TOKEN_PATH="/path/to/token.json" # Optional

用法

1.运行程序

python main.py

2. 通过 MCP 使用工具

Google Drive 示例
# List files mcp list_files # Copy a file mcp copy_file --file-id "file_id" --new_name "new_name"
Google 表格示例
# Get sheet data mcp get_sheet_data --spreadsheet_id "your_spreadsheet_id" --range "Sheet1!A1:D10" # Create chart mcp create_chart --chart_type "LINE" --range "A1:B10" --sheet_name "Sheet1" --title "Sales Trend"
Google 文档示例
# Create document mcp create_document --title "My Document" # Insert formatted text mcp insert_text_to_document --document_id "doc_id" --text "Hello World" --font_family "Arial" --font_size 12
Google 幻灯片示例
# Create presentation mcp create_presentation --title "My Presentation" # Add slide with content mcp add_slide_to_presentation --presentation_id "presentation_id" --title "Slide Title" --content "Slide Content"

环境变量

  • MCPGD_CLIENT_SECRET_PATH :Google OAuth 2.0 客户端密钥文件的路径
  • MCPGD_FOLDER_ID :Google Drive 文件夹 ID
  • MCPGD_TOKEN_PATH :令牌存储文件的路径(可选,默认值:~/.mcp_google_spreadsheet.json)

执照

MIT 许可证

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

使用 MCP(Metoro 控制协议)操作 Google 电子表格和 Google Drive 的工具。

  1. 特征
    1. Google Drive 功能
    2. Google 表格功能
    3. Google Docs 功能
    4. Google 幻灯片功能
  2. 安装
    1. 1.虚拟环境设置
    2. 2.安装所需的软件包
    3. Google Cloud Console 设置
    4. 4.环境变量设置
  3. 用法
    1. 1.运行程序
    2. 通过 MCP 使用工具
  4. 环境变量
    1. 执照

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        This MCP server integrates with Google Drive to allow listing, reading, and searching files, as well as the ability to read and write to Google Sheets.
        Last updated -
        91
        JavaScript
        MIT License
      • -
        security
        A
        license
        -
        quality
        A Model Context Protocol server that integrates with Google Drive and Google Sheets, enabling users to create, read, update, and manage spreadsheets through natural language commands.
        Last updated -
        134
        Python
        MIT License
        • Linux
        • Apple
      • A
        security
        F
        license
        A
        quality
        Provides a Model Context Protocol (MCP) server that enables LLMs to directly access and interact with Google Spreadsheet data.
        Last updated -
        2
        1
        TypeScript
        • Apple
      • A
        security
        F
        license
        A
        quality
        An MCP server that provides comprehensive Excel file operations, data analysis, and visualization capabilities for working with various spreadsheet formats like XLSX, CSV, and JSON.
        Last updated -
        8
        36
        Python

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/dev-ithitchhiker/mcp-google-docs'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server