/ Каталог / Песочница / mcp-google-sheets
● Сообщество xing5 ⚡ Сразу

mcp-google-sheets

автор xing5 · xing5/mcp-google-sheets

Give Claude read/write access to Google Sheets — 19 tools covering cells, rows, sheets, charts, formulas, and cross-sheet search.

mcp-google-sheets wraps Sheets + Drive APIs into ~19 MCP tools. Covers creating spreadsheets, batch cell updates, adding charts, searching across multiple files, and sharing. Auth via Google service account (recommended for headless) or OAuth 2.0.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

google-sheets.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": [
        "mcp-google-sheets"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": [
        "mcp-google-sheets"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": [
        "mcp-google-sheets"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "google-sheets": {
      "command": "uvx",
      "args": [
        "mcp-google-sheets"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "google-sheets",
      "command": "uvx",
      "args": [
        "mcp-google-sheets"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "google-sheets": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp-google-sheets"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add google-sheets -- uvx mcp-google-sheets

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: mcp-google-sheets

Append daily metrics to a Google Sheet from any data source

👤 Ops / growth engineers ⏱ ~20 min intermediate

Когда использовать: You want a lightweight dashboard in Sheets fed by whatever the agent can reach (Sentry, Stripe, a DB).

Предварительные требования
  • Google service account with Sheets + Drive API enabled — console.cloud.google.com → create SA → download JSON → set SERVICE_ACCOUNT_PATH
  • Sheet shared with the SA email — Sheets UI → Share → add [email protected] as Editor
Поток
  1. Identify the target sheet
    Use mcp-google-sheets to find the spreadsheet titled 'Daily KPIs'. Return its ID.✓ Скопировано
    → Spreadsheet ID
  2. Append today's row
    Append a row to sheet 'summary' with columns [date, signups, mrr, errors]. Use today's values from [your source].✓ Скопировано
    → add_rows confirms row appended at the bottom
  3. Update a chart if needed
    Verify the trailing-30d chart picked up the new row; if not, refresh it.✓ Скопировано
    → Chart shows today's data

Итог: A live Sheets dashboard updated without opening the file.

Подводные камни
  • Rate limit (429) after many single-cell updates — Use batch_update_cells — one call can modify hundreds of cells
  • Service account doesn't see the sheet — You must explicitly share the sheet with its email — SAs have no implicit access
Сочетать с: sentry · postgres

Deduplicate entries across multiple Google Sheets

👤 Data ops, CRM admins ⏱ ~25 min intermediate

Когда использовать: Team members maintain separate Sheets and you need one clean consolidated list.

Поток
  1. Enumerate source sheets
    List all spreadsheets in my 'Leads 2026' Drive folder with list_spreadsheets.✓ Скопировано
    → List of 5-20 sheets
  2. Pull all rows into memory
    Use get_multiple_sheet_data to pull the 'Leads' tab from each. Combine by email.✓ Скопировано
    → Merged dataset with dup count
  3. Write consolidated sheet
    Create a new spreadsheet 'Leads 2026 - Consolidated' with deduped rows sorted by latest-touch.✓ Скопировано
    → Clean destination sheet

Итог: One canonical sheet; originals untouched for audit.

Generate a Sheets report with formulas, not frozen values

👤 Finance analysts ⏱ ~30 min advanced

Когда использовать: You want the sheet to recalculate when source tabs update.

Поток
  1. Create the shape
    Create a sheet 'Q1 Report' with tabs [summary, by_region, by_product].✓ Скопировано
    → Sheet + tabs created
  2. Inject formulas referencing source
    In summary!B2, write =SUMIFS('source'!C:C, 'source'!A:A, ">=2026-01-01"). Use batch_update with formula values.✓ Скопировано
    → Live-computing cells

Итог: A self-updating report — change source data, numbers change.

Import a CSV and enrich each row with AI-generated columns

👤 Marketers, sales ops ⏱ ~30 min intermediate

Когда использовать: You have a list of URLs/companies and want AI-generated descriptions or classifications per row.

Поток
  1. Import CSV
    Create a spreadsheet from this CSV: [paste]. Name it 'Leads Enriched'.✓ Скопировано
    → Sheet with N rows
  2. Add and fill derived columns
    Add columns 'industry' and 'one_line_pitch'. For each row, derive them from the url/company and write back via batch_update_cells.✓ Скопировано
    → Two new populated columns

Итог: Enriched list ready for outreach.

Сочетать с: firecrawl

Комбинации

Сочетайте с другими MCP — эффект x10

google-sheets + sentry

Daily crash-free % logged to a KPI sheet

Every day, pull crash-free session % from Sentry and append a row to my 'Daily KPIs' sheet.✓ Скопировано
google-sheets + firecrawl

Scrape competitor pages weekly, write pricing into a sheet

Run firecrawl_extract on these 5 competitor pricing pages and write each plan as a row in 'Competitor Pricing'.✓ Скопировано
google-sheets + postgres

Export a daily DB query to Sheets for non-tech teammates

SELECT * FROM signups WHERE day = CURRENT_DATE; write to tab 'Signups' in my ops sheet.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
list_spreadsheets folder_id? Discover sheets in a folder 1 Drive API call
create_spreadsheet title: str, sheets?: str[] Fresh document 1 API call
get_sheet_data spreadsheetId, sheet, range? Read a range 1 API call
update_cells spreadsheetId, range, values Small writes 1 API call
batch_update_cells spreadsheetId, updates Any write >10 cells — avoids rate limits 1 API call
add_rows spreadsheetId, sheet, rows Append-only like logging 1 API call
add_chart spreadsheetId, sheet, chart_spec Visualize a range 1 API call
share_spreadsheet spreadsheetId, email, role Grant collab access 1 Drive call
search_spreadsheets query: str Find a value across many files N API calls

Стоимость и лимиты

Во что обходится

Квота API
Sheets API: 300 read + 300 write req/min/project, 60/user. Drive API: 1k req/100s/user
Токенов на вызов
100–5000 depending on range size
Деньги
Free within Google's default quotas
Совет
Batch writes aggressively — batch_update_cells is one API call no matter how many cells

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.file
Хранение учётных данных: Service account JSON at SERVICE_ACCOUNT_PATH, or OAuth tokens at TOKEN_PATH
Исходящий трафик: sheets.googleapis.com, drive.googleapis.com
Никогда не давайте: https://www.googleapis.com/auth/drive (full)

Устранение неполадок

Частые ошибки и исправления

403 The caller does not have permission

Share the sheet with the service account's email (client_email in the JSON)

Проверить: Open sheet → Share → confirm SA is listed
429 Quota exceeded

Use batch_update instead of many single updates; Sheets API limit is per-minute

Invalid range A1 notation

Range needs the sheet name: 'Sheet1!A1:C10', not 'A1:C10'

gcloud auth works but mcp doesn't

Set SERVICE_ACCOUNT_PATH explicitly to skip ambiguity

Проверить: echo $SERVICE_ACCOUNT_PATH

Альтернативы

mcp-google-sheets в сравнении

АльтернативаКогда использоватьКомпромисс
Zapier MCPYou already pay for Zapier and want non-code routingPer-task pricing; less direct control
Notion MCP (databases)You prefer Notion's database UX and don't need formulasNo formula engine

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills