FM

freema/mcp-gsheets

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

105 stars 24 forks 质量 91 趋势 20MIT

Freema/MCP-gsheets 是一个从 https://github.com/freema/mcp-gsheets. 导入的 MCP 服务器候选。

概览

Freema/MCP-gsheets 是一个从 https://github.com/freema/mcp-gsheets. 导入的 MCP 服务器候选。

概述(AI 翻译)

一个用于 Google Sheets API 集成的模型上下文协议(MCP)服务器。支持直接从 MCP 客户端(例如 Claude Code、Claude Desktop、Cursor 等)读取、写入和管理 Google Sheets 文档。

主要特色

  • 完整的谷歌表格集成:阅读、写入和管理电子表格
  • 高级操作:批处理操作、格式化、图表和条件格式化
  • 灵活认证:支持基于文件和JSON字符串的凭证
  • 生产就绪:采用TypeScript构建,具备全面的错误处理和全面测试覆盖

要求

  • Node.js v20 或更高
  • 支持 Sheets API 的 Google Cloud 项目
  • 带有JSON密钥文件的服务账户
  • NPM

开始

快速安装(推荐)

将以下配置添加到你的MCP客户端中:

[!注] 使用 mcp-gsheets@latest 确保你的 MCP 客户端始终使用最新版本的 Google 表格服务器。

MCP 客户端配置

克劳德密码 使用 Claude Code CLI 添加 MCP Google 表格服务器(指南):

添加后,编辑你的 Claude Code 配置,添加所需的环境变量:

Claude Desktop

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP Google Sheets Server

A Model Context Protocol (MCP) server for Google Sheets API integration. Enables reading, writing, and managing Google Sheets documents directly from your MCP client (e.g., Claude Code, Claude Desktop, Cursor, etc.).

Key Features

  • Complete Google Sheets Integration: Read, write, and manage spreadsheets
  • Advanced Operations: Batch operations, formatting, charts, and conditional formatting
  • Flexible Authentication: Support for both file-based and JSON string credentials
  • Production Ready: Built with TypeScript, comprehensive error handling, and full test coverage

Requirements

Getting Started

Add the following config to your MCP client:

{
  "mcpServers": {
    "mcp-gsheets": {
      "command": "npx",
      "args": ["-y", "mcp-gsheets@latest"],
      "env": {
        "GOOGLE_PROJECT_ID": "your-project-id",
        "GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json"
      }
    }
  }
}

[!NOTE] Using mcp-gsheets@latest ensures that your MCP client will always use the latest version of the MCP Google Sheets server.

MCP Client Configuration

Add to your Claude Desktop config:

在 GitHub 查看完整 README

安装

npx -y mcp-gsheets@latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcp-gsheets": { "command": "npx", "args": ["-y", "mcp-gsheets@latest"], "env": { "GOOGLE_PROJECT_ID": "your-project-id", "GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json" } } } }