AI Integration Guide

How to Connect Claude Desktop to Google Sheets via MCP: A Complete Setup Guide

Step-by-step guide to connecting Claude Desktop to Google Sheets using the Model Context Protocol (MCP). Covers OAuth and service account setup, configuration, and troubleshooting common errors.

25 Mar 2026 ·7 min read ·Pranoti Kshirsagar
Claude DesktopMCPGoogle SheetsAI IntegrationAutomation

If you use Claude Desktop and want it to read, edit, and manage your Google Sheets directly, the Model Context Protocol (MCP) is the cleanest and most secure way to do it. No copy-pasting data, no exporting CSVs — just natural language commands like “update cell B5” or “list all my spreadsheets.”

I recently set this up for my own workflow and documented every step — including the troubleshooting rabbit holes — so you can get it done in under 30 minutes. This guide covers prerequisites, step-by-step configuration, authentication options, and common errors with solutions.

What You’ll Achieve

By the end of this guide, your Claude Desktop will be able to directly interact with any Google Sheet you give it access to. That means reading data ranges, writing to cells, appending rows, creating new spreadsheets, and even sharing them — all from within a Claude conversation.

The connection uses MCP (Model Context Protocol), an open standard by Anthropic for connecting AI assistants to external tools. The MCP server we’ll use is mcp-google-sheets, a Python-based bridge between Claude Desktop and the Google Sheets API.

Prerequisites

Before you start, make sure you have these ready:

  • Claude Desktop — the latest version installed on macOS or Windows
  • A Google account — personal Gmail or Google Workspace both work
  • A Google Cloud project — free to create at console.cloud.google.com
  • Terminal/command line access — you’ll need to run a few commands
  • Python package manager (uv) — we’ll install this during setup

Authentication: Service Account vs OAuth

The MCP server supports two authentication methods. Choose the one that fits your situation before proceeding.

Option A: Service Account (Best for Automation)

A service account is a separate Google identity that accesses only the sheets you explicitly share with it. It’s headless (no browser login needed) and ideal for server-like setups. However, creating the JSON key requires your Google Cloud organisation policy to allow it — and many Workspace accounts block this by default.

If you hit an error like “Service account key creation is disabled”, see the Troubleshooting section below. Or simply use Option B instead.

OAuth lets you authenticate as yourself via a browser login. No organisation policy issues, no service account keys. You create an OAuth Client ID, download a small JSON file, and log in once. This is the path I recommend for solo users and small teams.

Step-by-Step Setup (OAuth Route)

Step 1: Enable Google APIs

Go to Google Cloud Console. Create a new project or select an existing one. Then enable two APIs:

  • Google Sheets API — search for it in APIs & Services → Library → Enable
  • Google Drive API — same process, search and enable

Both APIs are required. The Sheets API handles cell-level operations, while the Drive API is needed to list and discover your spreadsheets. Missing the Drive API is a common error — see Troubleshooting below.

Step 2: Create OAuth Credentials

In your Google Cloud project, go to APIs & Services → Credentials.

If prompted to configure an OAuth consent screen, choose Internal (for Workspace users) or External (for personal Gmail). Fill in the basics — app name, support email, developer email — and save through the remaining screens.

Then click + Create Credentials → OAuth Client ID. Set the application type to Desktop app, give it a name, and click Create. Download the JSON file and save it somewhere permanent on your computer, for example:

~/.config/mcp-gsheets/credentials.json

Step 3: Install uv (Python Package Manager)

The MCP server is a Python application. uv is a fast Python package manager that lets you run it without a permanent install. Open your terminal and run:

macOS/Linux:

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

Windows:

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Close and reopen your terminal, then verify with uvx --version. You should see a version number.

Step 4: Edit Claude Desktop Config

Claude Desktop uses a JSON config file to register MCP servers. Open it:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the following inside the mcpServers object. If the file already has other MCP servers configured, add this block alongside them:

"google-sheets": {
  "command": "/Users/YOUR_USERNAME/.local/bin/uvx",
  "args": ["mcp-google-sheets@latest"],
  "env": {
    "CREDENTIALS_PATH": "/path/to/your/credentials.json",
    "TOKEN_PATH": "/path/to/your/token.json"
  }
}

Replace YOUR_USERNAME with your actual system username. Replace the paths with where you saved your OAuth JSON and where you want the token stored. On macOS, always use the full path to uvx (not just uvx) to avoid ENOENT errors.

Step 5: Restart and Authenticate

Fully quit Claude Desktop (Cmd+Q on macOS, not just close the window) and reopen it. On first launch, your browser will open asking you to log in with your Google account and approve Sheets and Drive permissions.

After you approve, a token is saved locally at the TOKEN_PATH you specified. You only need to do this once.

Step 6: Verify the Connection

In Claude Desktop, look for a tools icon near the chat input. Click it — you should see google-sheets listed as a connected server. Test it by typing:

“List all my spreadsheets”

Claude will ask for permission to use the tool, then return your spreadsheets. If this works, you’re done.

What You Can Do Now

With the MCP connection active, you can give Claude commands like:

  • “Read data from A1:E10 in my Budget spreadsheet”
  • “Update cell B5 in Sheet1 to ‘Completed’”
  • “Create a new spreadsheet called Q2 Revenue Tracker”
  • “Append these rows to my project log”
  • “Share this spreadsheet with colleague@example.com as an editor”

The server exposes 19 tools covering read, write, batch operations, formatting, and sharing. You can reduce context usage by enabling only the tools you need — add an --include-tools flag to your config with a comma-separated list of tool names.

Troubleshooting

“Service account key creation is disabled”

Google Cloud projects created after May 2024 have service account key creation blocked by default via the iam.disableServiceAccountKeyCreation organisation policy. This is especially common with Google Workspace accounts.

Fix: If you’re a Workspace admin, go to IAM & Admin → Organization Policies at the organisation level (not project level). Search for disableServiceAccountKeyCreation, override the parent’s policy, and set enforcement to Off. Re-enable it after downloading the key.

Easier alternative: Skip the service account entirely and use the OAuth route described above. OAuth credentials are not affected by this policy.

“Google Drive API has not been used in project… or it is disabled”

This 403 error means you enabled the Sheets API but forgot the Drive API. The MCP server needs Drive access to list and discover spreadsheets.

Fix: Go to Google Cloud Console → APIs & Services → Library → search for “Google Drive API” → Enable. Wait 1–2 minutes for propagation, then retry.

“All authentication methods failed”

The server tried every auth method and none worked. This usually means the credentials file path is wrong in your config.

Fix: Double-check the CREDENTIALS_PATH in your claude_desktop_config.json. Make sure the path points to the actual file (including the .json extension) and that the filename matches exactly. Verify with ls /path/to/your/credentials.json in terminal.

“spawn uvx ENOENT” error

Claude Desktop can’t find the uvx command. This happens on macOS because Claude Desktop doesn’t inherit your shell’s PATH.

Fix: Use the full path to uvx in your config: /Users/YOUR_USERNAME/.local/bin/uvx instead of just uvx.

Two Organisation Policies Blocking Key Creation

Google Cloud has two separate constraints that both block service account key creation: iam.disableServiceAccountKeyCreation (legacy) and iam.managed.disableServiceAccountKeyCreation (managed). They can both be active simultaneously. If you disabled one but the error persists, check the other.

How to Check Logs

If something goes wrong, Claude Desktop logs MCP server output to a file. Check it with:

macOS: cat ~/Library/Logs/Claude/mcp-server-google-sheets.log Windows: Check %APPDATA%\Claude\Logs\

The log shows exactly where authentication fails and which APIs are missing. Always check the log before changing config — it saves time.

Security Considerations

The MCP approach is more secure than many alternatives because the server runs locally on your machine. Your credentials and data never pass through a third-party service. The OAuth token is stored locally, and you can revoke access at any time from your Google Account security settings.

If you use the service account route, the account can only access sheets you explicitly share with it — it has zero access to the rest of your Drive. For additional security, re-enable the key creation policy after downloading your service account key.

Ready to Streamline Your Workflow?

Once Claude Desktop is connected to Google Sheets, the possibilities expand quickly. You can build automated reporting workflows, have Claude analyse data directly from your sheets, or manage project trackers without leaving the conversation.

Want to see this in action or need help setting it up for your specific workflow? Get in touch →

Want more guides like this? Browse all AI Integration Guides or download the case study PDF.

Found this useful? Share it or explore more guides.