MCP Catalogs
首页

mcp-google-sheets

by xing5·864·综合分 54

一个功能完善的 Google Sheets MCP 服务器,提供全面的工具支持和多种认证方式。

productivitydeveloper-toolsai-llm
201
Forks
24
活跃 Issue
本月
最近提交
2 天前
收录于

概述

这个 MCP 服务器在 AI 助手和 Google Sheets 之间建立了可靠的桥梁,提供 19 种全面的工具用于创建和修改电子表格。它支持服务账户和 OAuth 2.0 认证方式,README 中包含详细的设置说明。服务器由积极维护,最近有提交,并包含诸如工具过滤等 thoughtful 功能以减少上下文使用。所有工具都有清晰文档,包含参数说明和返回值。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:通过自然语言命令自动执行电子表格的数据录入和更新
:使用 AI 驱动的分析创建和管理报表和仪表板
:实现 AI 系统和 Google Sheets 之间的协作工作流程
:如何与 Google Sheets 进行身份验证?
:如何减少上下文窗口使用量?

什么时候选它

当您需要与Google Sheets进行全面的MCP集成,特别是如果您已经使用Google Workspace且需要AI驱动的电子表格自动化时,选择此服务器。

什么时候不要选它

如果您需要访问非Google电子表格服务,或者担心Google API配额和速率限制会影响重型自动化工作流程,请避免使用此方案。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • list_spreadsheets

    Lists spreadsheets in the configured Drive folder

  • create_spreadsheet

    Creates a new spreadsheet with the specified title

  • get_sheet_data

    Reads data from a range in a sheet/tab

  • update_cells

    Writes data to a specific range in a sheet

  • add_rows

    Adds empty rows to a sheet at a specified index

  • list_sheets

    Lists all sheet/tab names within a spreadsheet

  • create_sheet

    Adds a new sheet/tab to a spreadsheet

  • find_in_spreadsheet

    Search for values in a spreadsheet

  • copy_sheet

    Copies an existing sheet within or between spreadsheets

  • share_spreadsheet

    Shares a spreadsheet with specified users and roles

  • batch_update_cells

    Updates multiple ranges in one API call

  • get_multiple_sheet_data

    Fetches data from multiple ranges across different spreadsheets

可对比工具

mcp-excelmcp-notiongoogle-sheets-api-cli

安装

快速开始

# 安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 设置环境变量
export SERVICE_ACCOUNT_PATH="/path/to/your/service-account-key.json"
export DRIVE_FOLDER_ID="YOUR_DRIVE_FOLDER_ID"

# 运行服务器
uvx mcp-google-sheets@latest

Claude Desktop 配置

添加到 Claude Desktop 的 config.json:

{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": ["mcp-google-sheets@latest"],
      "env": {
        "SERVICE_ACCOUNT_PATH": "/path/to/credentials.json"
      }
    }
  }
}

对于工具过滤:

{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": ["mcp-google-sheets@latest", "--include-tools", "get_sheet_data,update_cells,list_spreadsheets"],
      "env": {
        "SERVICE_ACCOUNT_PATH": "/path/to/credentials.json"
      }
    }
  }
}

FAQ

如何与 Google Sheets 进行身份验证?
该服务器支持三种认证方式:服务账户(推荐)、OAuth 2.0 以及通过环境变量直接注入凭据。README 中提供了详细的设置说明。
如何减少上下文窗口使用量?
使用 --include-tools 命令行参数或 ENABLED_TOOLS 环境变量进行工具过滤,只启用您需要的工具,从而将使用量从 ~13,000 个标记减少到仅必要的工具。

mcp-google-sheets 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。