/ Annuaire / Playground / mcp-google-sheets
● Communauté xing5 ⚡ Instantané

mcp-google-sheets

par 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.

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

google-sheets.replay ▶ prêt
0/0

Installer

Choisissez votre client

~/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
    }
  }
}

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

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

Cursor utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la globale.

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

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "Edit Configuration".

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

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

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

Continue utilise un tableau d'objets serveur plutôt qu'une map.

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

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

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

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : mcp-google-sheets

Append daily metrics to a Google Sheet from any data source

👤 Ops / growth engineers ⏱ ~20 min intermediate

Quand l'utiliser : You want a lightweight dashboard in Sheets fed by whatever the agent can reach (Sentry, Stripe, a DB).

Prérequis
  • 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
Déroulement
  1. Identify the target sheet
    Use mcp-google-sheets to find the spreadsheet titled 'Daily KPIs'. Return its ID.✓ Copié
    → 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].✓ Copié
    → 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.✓ Copié
    → Chart shows today's data

Résultat : A live Sheets dashboard updated without opening the file.

Pièges
  • 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
Combiner avec : sentry · postgres

Deduplicate entries across multiple Google Sheets

👤 Data ops, CRM admins ⏱ ~25 min intermediate

Quand l'utiliser : Team members maintain separate Sheets and you need one clean consolidated list.

Déroulement
  1. Enumerate source sheets
    List all spreadsheets in my 'Leads 2026' Drive folder with list_spreadsheets.✓ Copié
    → 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.✓ Copié
    → Merged dataset with dup count
  3. Write consolidated sheet
    Create a new spreadsheet 'Leads 2026 - Consolidated' with deduped rows sorted by latest-touch.✓ Copié
    → Clean destination sheet

Résultat : One canonical sheet; originals untouched for audit.

Generate a Sheets report with formulas, not frozen values

👤 Finance analysts ⏱ ~30 min advanced

Quand l'utiliser : You want the sheet to recalculate when source tabs update.

Déroulement
  1. Create the shape
    Create a sheet 'Q1 Report' with tabs [summary, by_region, by_product].✓ Copié
    → 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.✓ Copié
    → Live-computing cells

Résultat : 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

Quand l'utiliser : You have a list of URLs/companies and want AI-generated descriptions or classifications per row.

Déroulement
  1. Import CSV
    Create a spreadsheet from this CSV: [paste]. Name it 'Leads Enriched'.✓ Copié
    → 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.✓ Copié
    → Two new populated columns

Résultat : Enriched list ready for outreach.

Combiner avec : firecrawl

Combinaisons

Associez-le à d'autres MCPs pour un effet 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.✓ Copié
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'.✓ Copié
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.✓ Copié

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
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

Coût et limites

Coût d'exécution

Quota d'API
Sheets API: 300 read + 300 write req/min/project, 60/user. Drive API: 1k req/100s/user
Tokens par appel
100–5000 depending on range size
Monétaire
Free within Google's default quotas
Astuce
Batch writes aggressively — batch_update_cells is one API call no matter how many cells

Sécurité

Permissions, secrets, portée

Portées minimales : https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.file
Stockage des identifiants : Service account JSON at SERVICE_ACCOUNT_PATH, or OAuth tokens at TOKEN_PATH
Sortie de données : sheets.googleapis.com, drive.googleapis.com
Ne jamais accorder : https://www.googleapis.com/auth/drive (full)

Dépannage

Erreurs courantes et correctifs

403 The caller does not have permission

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

Vérifier : 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

Vérifier : echo $SERVICE_ACCOUNT_PATH

Alternatives

mcp-google-sheets vs autres

AlternativeQuand l'utiliserCompromis
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

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills