How to connect Google Sheets to Claude Code (full setup guide)

Feb 16, 2026

Step-by-step guide to connecting Google Sheets to Claude Code using the mcp-google-sheets MCP server. Choose between an automated one-command setup or a detailed manual walkthrough.

Why connect Google Sheets to Claude Code?

Claude Code is a powerful AI assistant that lives in your terminal. But by default, it can't access your Google Sheets. You'd have to download CSVs and feed them in manually. That's slow, error-prone, and breaks your flow.

By connecting Google Sheets directly to Claude Code via MCP (Model Context Protocol), you unlock the ability to read, write, search, and manipulate spreadsheets in real time, all from your terminal. No copy-pasting. No downloads. Just ask Claude to pull data from a sheet, update cells, or analyze your spreadsheet, and it happens instantly.

This guide walks you through the full setup using mcp-google-sheets, an open-source MCP server built by xing5.

What is MCP?

MCP (Model Context Protocol) is the standard way to extend Claude Code with external tools. Think of it like plugins. Each MCP server gives Claude new capabilities. The mcp-google-sheets server gives Claude the ability to interact with Google Sheets.

The MCP server runs locally on your machine. When Claude needs to read or write a spreadsheet, it sends a request to this local server, which then talks to the Google Sheets API on your behalf.

What you'll need

The setup requires a few tools and accounts. If you choose the guided setup (option 1 below), Claude will check for each of these automatically, install what's missing, and walk you through the rest. You don't need to set any of this up beforehand.

  • Claude Code installed and working (the CLI tool from Anthropic) -> this is the only thing you need to install yourself.

  • Python 3.8+ installed on your system (included in guided setup)

  • Google Cloud CLI (gcloud), available from cloud.google.com/sdk/docs/install (included in guided setup)

  • A Google account with access to the spreadsheets you want to use

  • A Google Cloud project (free to create, and the guided setup can help you make one)

Choose your setup method

There are two ways to set this up. Pick whichever suits you best:

  1. Guided setup (recommended). Drop a single file into your project and let Claude walk you through everything interactively. It checks prerequisites, installs missing tools, authenticates with Google, enables APIs, and configures the MCP server. Fastest way to get started, and your whole team can reuse it.

  2. Manual setup. Follow a detailed step-by-step guide and run each command yourself. Best if you want to understand exactly what's happening at every step.

Both methods produce the exact same result. The guided setup simply automates the manual steps.

Option 1: guided setup

This method uses a Claude Code custom command, a Markdown file that tells Claude how to run the entire setup for you. You add one file to your project, run one slash command, and takes you through the setup. What is a Claude Code custom command?

Custom commands / skills are Markdown files you place in a special folder inside your project. When Claude Code starts, it scans this folder and registers each file as a slash command. The filename becomes the command name, so setup-google-sheets.md becomes /setup-google-sheets.

Step 1: find your project root folder

Your project root is the main folder of your codebase, the one you open in your editor or terminal. It usually contains files like .git, package.json, requirements.txt, or similar. For example: C:\Users\you\Projects\my-app or ~/projects/my-app.

Step 2: create the .claude/commands/ folder

Inside your project root, create this folder structure:

your-project/
├── .claude/
└── commands/
└── (command files go here)
├── src/
├── package.json
└──

The folder is called .claude (with a dot at the beginning). Inside it, create a subfolder called commands.

On Windows (pick one):

  • PowerShell: open PowerShell in your project folder and run: mkdir -Force .claude\commands

  • Command Prompt: run: mkdir .claude\commands

  • File Explorer: open your project folder. Right-click, then New, then Folder. Name it .claude. Open it, create another folder called commands. Windows might warn about the dot, click OK.

On macOS / Linux (pick one):

  • Terminal: cd /path/to/your/project && mkdir -p .claude/commands

  • Finder (macOS): press Cmd+Shift+. to show hidden files, then create the folders normally.

Step 3: create the command file

Inside .claude/commands/, create a new file called exactly:

setup-google-sheets.md

The filename matters because it becomes the slash command name. So this file registers as /setup-google-sheets.

How to create it:

  • Code editor (VS Code, Cursor, etc.): right-click on .claude/commands/, then New File, then name it setup-google-sheets.md

  • Terminal (macOS/Linux): touch .claude/commands/setup-google-sheets.md

  • PowerShell (Windows): New-Item .claude\commands\setup-google-sheets.md

Open the file and paste the entire contents of the command file provided at the bottom of this article. Save it.

Step 4: run the command

Restart Claude Code (close and reopen, or start a new session). Then type:

/setup-google-sheets

Claude will present you with four options:

  1. First-time setup installs everything from scratch (uv, GCP auth, MCP config)

  2. Switch Google account changes which Google account is connected

  3. Add/remove tools lets you customize which tools are loaded (to save tokens)

  4. Troubleshoot diagnoses and fixes common connection issues

Choose first-time setup and Claude will walk you through each step interactively, running commands for you and asking for your input when decisions are needed.

If the command doesn't appear
  • Check the folder path: it must be .claude/commands/ inside your project root (not your home folder)

  • Make sure the file extension is .md. Windows sometimes hides extensions, so your file might actually be setup-google-sheets.md.txt. Enable "show file extensions" in Explorer settings to check.

  • Make sure you restarted Claude Code after creating the file

Sharing with your team

Since .claude/commands/ lives inside your project, you can commit it to Git. Anyone who clones your repo gets the /setup-google-sheets command automatically. New team members just run it and follow the prompts, no manual setup guide needed.

Option 2: manual setup

If you prefer to run each step yourself, follow the guide below. This produces the exact same result as the guided setup above.

Install uv (Python package runner)

The MCP server is a Python package that runs via uv, specifically its uvx command, which can run Python packages without permanently installing them. Think of it like npx for Python.

uv is an extremely fast Python package manager made by Astral (the creators of Ruff). It replaces pip, virtualenv, and similar tools.

Windows (PowerShell):

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

macOS / Linux:

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

After installing, restart your terminal and verify:

uvx --version
Set up Google Cloud authentication

The MCP server uses Google's Application Default Credentials (ADC). This means it uses your personal Google login, no service accounts, no API keys, no secrets to manage.

Pick or create a Google Cloud project:

gcloud projects list

If you don't have one, create it (free):

gcloud projects create my-sheets-project --name="My Sheets Project"

Enable the required APIs (replace YOUR_PROJECT_ID):

gcloud services enable sheets.googleapis.com drive.googleapis.com --project=YOUR_PROJECT_ID

This enables the Google Sheets API (read/write data) and Google Drive API (list/search spreadsheets).

Authenticate:

gcloud auth application-default login --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive"

Your browser will open. Sign in and grant access. Then set the quota project:

gcloud auth application-default set-quota-project YOUR_PROJECT_ID

To check which Google account is active: gcloud auth list. To switch accounts, re-run the login command above.

Configure the MCP server

Claude Code reads MCP config from ~/.claude.json. First, find your full uvx path (MCP servers don't inherit your shell's PATH):

Windows: where uvx / macOS/Linux: which uvx

Then add the config using Python (safest approach because .claude.json changes frequently):

python -c "
import json, os
path = os.path.expanduser('~/.claude.json')
with open(path, 'r') as f:
    data = json.load(f)

project_key = None
for key in data.get('projects', {}):
    project_key = key
    break

if project_key:
    data['projects'][project_key].setdefault('mcpServers', {})['google-sheets'] = {
        'command': 'FULL_PATH_TO_UVX_HERE',
        'args': [
            'mcp-google-sheets@latest',
            '--include-tools',
            'get_sheet_data,update_cells,list_spreadsheets,list_sheets,add_rows,find_in_spreadsheet,batch_update_cells,get_sheet_formulas,get_multiple_sheet_data,get_multiple_spreadsheet_summary,batch_update,search_spreadsheets'
        ]
    }
    with open(path, 'w') as f:
        json.dump(data, f, indent=2)
    print('Done! Restart Claude Code to activate.')
else:
    print('No project found in .claude.json.')
"

Important: replace FULL_PATH_TO_UVX_HERE with the actual path from the previous step.

Restart and verify

Restart Claude Code. Check that google-sheets appears in your MCP servers (/mcp). Try asking Claude:

  • "List my Google Sheets"

  • "Read data from [spreadsheet name]"

  • "Add a row to [spreadsheet name]"

Available tools (12 default)

Both setup methods enable 12 tools that cover most use cases (~8,000 tokens):

Tool

What it does

get_sheet_data

Read cell ranges from a sheet

update_cells

Write values to specific cells

list_spreadsheets

List all spreadsheets you have access to

list_sheets

List tabs within a spreadsheet

add_rows

Append new rows to the bottom of a sheet

find_in_spreadsheet

Search for values across a spreadsheet

batch_update_cells

Bulk write to multiple cell ranges at once

get_sheet_formulas

Read formulas (not computed values) from cells

get_multiple_sheet_data

Read from multiple tabs in one call

get_multiple_spreadsheet_summary

Get overview of multiple spreadsheets at once

batch_update

Advanced batch operations (formatting, merging, etc.)

search_spreadsheets

Search spreadsheets by name

7 additional tools are available (add_columns, create_spreadsheet, create_sheet, copy_sheet, rename_sheet, share_spreadsheet, list_folders). All 19 tools = ~13,000 tokens. Minimal 4 tools = ~3,000 tokens. Use the guided setup's "add/remove tools" option to customize.

Security: what you should know

Let's be transparent about what this setup does:

What's good
  • Your Google credentials stay local. The MCP server authenticates with Google on your machine. Your Google login tokens are never sent to Anthropic. However, any spreadsheet data that Claude reads will be sent to Anthropic's API as part of your conversation, just like anything else you share with Claude.

  • No API keys or secrets in config. Authentication uses Google's ADC system with credentials in a secure, system-managed location.

  • Access. You're using your own Google login, so the MCP server has exactly the same access you do, nothing more.

  • Open source. The server is fully open source at github.com/xing5/mcp-google-sheets.

What to be aware of
  • Full account access. The MCP server can access every spreadsheet your Google account can see. There's no way to restrict it to specific sheets.

  • Claude can write, not just read. Tools like update_cells, add_rows, and batch_update can modify spreadsheets. Claude asks permission before using tools, but always review what it's about to do.

  • Third-party package. mcp-google-sheets is maintained by an independent developer, not Google or Anthropic. Though the code is highly vetted by the Github community.

  • @latest tag. The config uses mcp-google-sheets@latest, so uvx fetches the newest version each time. Pin to a specific version (e.g., mcp-google-sheets==0.3.0) for extra safety.

Recommendations
  • Review the source code before installing

  • Use a dedicated Google account if your main account has sensitive data

  • Consider pinning the package version instead of @latest

  • Regularly check gcloud auth list to verify the connected account

Troubleshooting

MCP server doesn't appear in Claude Code
  • Restart Claude Code after editing the config

  • Check ~/.claude.json. The entry must be inside your project's mcpServers object, not at the top level

  • Verify the uvx path is absolute and correct

Authentication errors
  • Re-run gcloud auth application-default login with the full scopes

  • Set the quota project: gcloud auth application-default set-quota-project YOUR_PROJECT_ID

  • Verify Sheets and Drive APIs are enabled

"Permission denied" on a specific spreadsheet
  • The MCP server uses your Google account's permissions. If you can't access a sheet in your browser, Claude can't either

  • Check gcloud auth list to verify the correct account

Cost

Everything is free except Claude Code: Google Cloud project (free to create), Sheets API (free up to 300 requests/minute), Drive API (free), uv/uvx (open source), mcp-google-sheets (open source). Normal Claude Code usage won't come close to any limits.

Appendix: the full command file

This is the complete content for the guided setup command file. Copy everything in the code block below and paste it into .claude/commands/setup-google-sheets.md in your project (see option 1 above for detailed instructions on where to put this file).

# Google Sheets MCP Setup Wizard

You are a setup wizard that helps the user connect Google Sheets to Claude Code via the `xing5/mcp-google-sheets` MCP server.

## Step 1: Ask what the user needs

Use AskUserQuestion to present these options:

**Question:** "What would you like to do?"
**Options:**
1. **First-time setup** "Install everything from scratch (uv, GCP auth, MCP config)"
2. **Switch Google account** "Change which Google account the Sheets MCP uses"
3. **Add/remove tools** "Change which Google Sheets tools are loaded (affects token usage)"
4. **Troubleshoot** "The MCP server isn't connecting or isn't working"

Then follow the matching path below.

---

## Path 1: First-time setup

Execute these steps IN ORDER. Do not skip steps. Run commands for the user don't just tell them to run things.

### 1.1 Check prerequisites

Run these checks in parallel:
```bash
uv --version 2>/dev/null || echo "NOT_INSTALLED"
uvx --version 2>/dev/null || echo "NOT_INSTALLED"
gcloud --version 2>/dev/null || echo "NOT_INSTALLED"
python --version 2>/dev/null || python3 --version 2>/dev/null || echo "NOT_INSTALLED"
```

**If `uv`/`uvx` is not installed:**
- Detect platform: check if running on Windows (`win32`) or macOS/Linux
- Windows: `powershell -c "irm https://astral.sh/uv/install.ps1 | iex"`
- macOS/Linux: `curl -LsSf https://astral.sh/uv/install.sh | sh`
- Tell the user they may need to restart their terminal or set PATH

**If `gcloud` is not installed:**
- Detect platform: check if running on Windows (`win32`) or macOS/Linux
- Windows: `winget install Google.CloudSDK --accept-package-agreements --accept-source-agreements`
- macOS (with Homebrew): `brew install google-cloud-sdk`
- Linux (Debian/Ubuntu):
  ```bash
  curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \
  echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list && \
  apt-get update && apt-get install -y google-cloud-cli
  ```
- Linux (Fedora/RHEL):
  ```bash
  curl -fsSL https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg | rpm --import - && \
  tee /etc/yum.repos.d/google-cloud-sdk.repo << 'EOF'
  [google-cloud-cli]
  name=Google Cloud CLI
  baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
  enabled=1
  gpgcheck=1
  gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
  EOF
  dnf install -y google-cloud-cli
  ```
- Tell the user they may need to restart their terminal for gcloud to be available on PATH
- After install, re-check: `gcloud --version 2>/dev/null`
- If still not found, tell the user to install manually from https://cloud.google.com/sdk/docs/install and re-run this setup. STOP here.

**If Python is not installed:**
- Detect platform: check if running on Windows (`win32`) or macOS/Linux
- Windows: `winget install Python.Python.3.12 --accept-package-agreements --accept-source-agreements`
- macOS (with Homebrew): `brew install python3`
- macOS (without Homebrew): Tell the user to install from https://python.org
- Linux (Debian/Ubuntu): `sudo apt update && sudo apt install -y python3`
- Linux (Fedora/RHEL): `sudo dnf install -y python3`
- Tell the user they may need to restart their terminal for Python to be available on PATH
- After install, re-check: `python --version 2>/dev/null || python3 --version 2>/dev/null`
- If still not found, tell the user to install manually from https://python.org and re-run this setup. STOP here.

### 1.2 GCP project setup

Check existing projects:
```bash
gcloud projects list 2>/dev/null
```

**If projects exist:** Ask the user which project to use, or whether to create a new one.
**If no projects:** Create one:
```bash
gcloud projects create claude-sheets --name="Claude Sheets"
```

### 1.3 Enable APIs

Run this with the chosen project ID:
```bash
gcloud services enable sheets.googleapis.com drive.googleapis.com --project=PROJECT_ID
```

### 1.4 Authenticate

Authentication requires two gcloud logins: a regular `gcloud auth login` and an ADC (Application Default Credentials) login with Sheets/Drive scopes. Both use the same helper-script pattern below.

#### Auth helper pattern

Since `gcloud auth --no-launch-browser` is interactive (prints a URL, waits for a code on stdin), use a Python helper script that bridges between gcloud and Claude Code via temp files.

**Step A:** Write the helper script. Replace `GCLOUD_COMMAND` with the actual gcloud command for each auth step:

```python
#!/usr/bin/env python3
import subprocess, os, sys, time, re

URL_FILE = '/tmp/gcloud_auth_url.txt'
CODE_FILE = '/tmp/gcloud_auth_code.txt'
RESULT_FILE = '/tmp/gcloud_auth_result.txt'

for f in [URL_FILE, CODE_FILE, RESULT_FILE]:
    if os.path.exists(f):
        os.remove(f)

proc = subprocess.Popen(
    GCLOUD_COMMAND,  # e.g. ['gcloud', 'auth', 'login', '--no-launch-browser']
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT,
    text=True
)

output = ''
while True:
    line = proc.stdout.readline()
    if not line and proc.poll() is not None:
        break
    output += line
    # Look for the Google auth URL
    if 'accounts.google.com' in line:
        url = line.strip()
        with open(URL_FILE, 'w') as f:
            f.write(url)

# Wait for the user to provide the auth code via CODE_FILE
for _ in range(120):
    if os.path.exists(CODE_FILE) and os.path.getsize(CODE_FILE) > 0:
        with open(CODE_FILE, 'r') as f:
            code = f.read().strip()
        proc.stdin.write(code + '\n')
        proc.stdin.flush()
        break
    time.sleep(1)

remaining_output = proc.communicate(timeout=30)[0] or ''
output += remaining_output

with open(RESULT_FILE, 'w') as f:
    f.write(output)
```

**Step B:** Run the helper in the background:
```bash
python3 /tmp/gcloud_auth_helper.py &
```

**Step C:** Poll for the URL file (up to 15 seconds):
```bash
for i in $(seq 1 15); do
  if [ -f /tmp/gcloud_auth_url.txt ] && [ -s /tmp/gcloud_auth_url.txt ]; then
    cat /tmp/gcloud_auth_url.txt
    exit 0
  fi
  sleep 1
done
echo "TIMEOUT"
```

**Step D:** Show the URL to the user via AskUserQuestion. Tell them to open it in their browser, sign in, and paste the verification code back using the "Other" option.

**Step E:** Write the user's code to the code file:
```bash
echo "THE_CODE_FROM_USER" > /tmp/gcloud_auth_code.txt
```

**Step F:** Poll for the result file (up to 30 seconds) and verify success:
```bash
for i in $(seq 1 30); do
  if [ -f /tmp/gcloud_auth_result.txt ] && [ -s /tmp/gcloud_auth_result.txt ]; then
    cat /tmp/gcloud_auth_result.txt
    exit 0
  fi
  sleep 1
done
echo "TIMEOUT"
```

#### Auth step 1: gcloud login

Write the helper script with this command:
```python
GCLOUD_COMMAND = ['gcloud', 'auth', 'login', '--no-launch-browser']
```
Run the helper pattern (Steps A–F). Verify output contains "You are now logged in as".

#### Auth step 2: Application Default Credentials

Clean up the temp files from step 1, then write a new helper script with:
```python
GCLOUD_COMMAND = [
    'gcloud', 'auth', 'application-default', 'login',
    '--no-launch-browser',
    '--scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive'
]
```
Run the helper pattern (Steps A–F). Verify output contains "Credentials saved".

#### Set quota project

After both auth steps succeed:
```bash
gcloud auth application-default set-quota-project PROJECT_ID
```

### 1.5 Configure MCP server

Detect the platform and find the `uvx` binary path:
```bash
# Windows
where uvx 2>/dev/null || echo "C:\\Users\\$USER\\.local\\bin\\uvx.exe"
# macOS/Linux
which uvx 2>/dev/null
```

Now add the MCP server to `.claude.json`. The config lives in the `projects` section under the current project path.

Read `~/.claude.json` and add to the correct project's `mcpServers`:

```json
"google-sheets": {
  "command": "FULL_PATH_TO_UVX",
  "args": [
    "mcp-google-sheets@latest",
    "--include-tools",
    "get_sheet_data,update_cells,list_spreadsheets,list_sheets,add_rows,find_in_spreadsheet,batch_update_cells,get_sheet_formulas,get_multiple_sheet_data,get_multiple_spreadsheet_summary,batch_update,search_spreadsheets"
  ]
}
```

IMPORTANT: Use the full absolute path to `uvx` / `uvx.exe` in the `command` field. Relative paths or bare `uvx` may not work because MCP servers don't inherit the user's PATH.

Use Python to safely modify the JSON (the file changes frequently, so read-then-edit may fail):
```python
import json
with open(CLAUDE_JSON_PATH, 'r') as f:
    data = json.load(f)

data['projects'][PROJECT_KEY]['mcpServers']['google-sheets'] = {
    'command': UVX_PATH,
    'args': [
        'mcp-google-sheets@latest',
        '--include-tools',
        'get_sheet_data,update_cells,list_spreadsheets,list_sheets,add_rows,find_in_spreadsheet,batch_update_cells,get_sheet_formulas,get_multiple_sheet_data,get_multiple_spreadsheet_summary,batch_update,search_spreadsheets'
    ]
}

with open(CLAUDE_JSON_PATH, 'w') as f:
    json.dump(data, f, indent=2)
```

### 1.6 Verify & finish

Tell the user:
- "Setup complete! Restart Claude Code to activate the Google Sheets MCP."
- Show which Google account is connected: `gcloud auth list`
- List the 12 tools that were enabled and briefly explain each

---

## Path 2: Switch Google account

### 2.1 Show current account
```bash
gcloud auth list
```

### 2.2 Re-authenticate

Use the same auth helper pattern from Path 1 step 1.4, but only the ADC step (auth step 2). The user is already logged in, they just need new ADC credentials with the Sheets/Drive scopes.

### 2.3 Confirm
```bash
gcloud auth list
```

Tell the user: "Account switched. Restart Claude Code to use the new account."

---

## Path 3: Add/remove tools

### 3.1 Show available tools

Present this list and ask which tools they want enabled (multi-select):

| Tool | Description |
|------|-------------|
| `get_sheet_data` | Read cell ranges from a sheet |
| `update_cells` | Write values to specific cells |
| `list_spreadsheets` | List all spreadsheets you have access to |
| `list_sheets` | List tabs/sheets within a spreadsheet |
| `add_rows` | Append new rows to the bottom of a sheet |
| `add_columns` | Add new columns to a sheet |
| `find_in_spreadsheet` | Search for values across a spreadsheet |
| `batch_update_cells` | Bulk write to multiple cell ranges at once |
| `create_spreadsheet` | Create a new spreadsheet |
| `create_sheet` | Add a new tab to an existing spreadsheet |
| `copy_sheet` | Copy a tab to another spreadsheet |
| `rename_sheet` | Rename a tab |
| `share_spreadsheet` | Share a spreadsheet with others |
| `get_sheet_formulas` | Read formulas (not computed values) from cells |
| `get_multiple_sheet_data` | Read from multiple tabs in one call |
| `get_multiple_spreadsheet_summary` | Get overview of multiple spreadsheets |
| `batch_update` | Advanced batch operations |
| `search_spreadsheets` | Search spreadsheets by name |
| `list_folders` | List Drive folders |

**Token guidance:**
- All 19 tools: ~13,000 tokens
- Recommended 12 (default): ~8,000 tokens
- Minimal 4 (`get_sheet_data,update_cells,list_spreadsheets,list_sheets`): ~3,000 tokens

### 3.2 Update config

Read `~/.claude.json`, find the `google-sheets` MCP server entry, and update the `--include-tools` argument with the user's selection. Use the Python JSON approach (same as Path 1 step 1.5).

### 3.3 Confirm

Tell the user: "Tools updated. Restart Claude Code to apply changes."

---

## Path 4: Troubleshoot

### 4.1 Run diagnostics

Run ALL of these in parallel and collect results:

```bash
# Check uv/uvx
uv --version 2>/dev/null || echo "uv: NOT INSTALLED"
uvx --version 2>/dev/null || echo "uvx: NOT INSTALLED"

# Check gcloud auth
gcloud auth list 2>/dev/null

# Check ADC credentials exist
cat ~/.config/gcloud/application_default_credentials.json 2>/dev/null || \
cat ~/AppData/Roaming/gcloud/application_default_credentials.json 2>/dev/null || \
echo "ADC: NOT FOUND"

# Check if Sheets API is enabled
gcloud services list --enabled --filter="name:sheets.googleapis.com" 2>/dev/null

# Check if Drive API is enabled
gcloud services list --enabled --filter="name:drive.googleapis.com" 2>/dev/null

# Try running the MCP server directly to see errors
uvx mcp-google-sheets@latest --help 2>&1 | head -5
```

Also read `~/.claude.json` and check that the `google-sheets` entry exists in the correct project's `mcpServers`.

### 4.2 Diagnose

Based on the results, identify the issue and fix it:

| Symptom | Cause | Fix |
|---------|-------|-----|
| `uvx: NOT INSTALLED` | uv not installed | Run the install script from Path 1, step 1.1 |
| `ADC: NOT FOUND` | Never authenticated | Run auth from Path 1, step 1.4 |
| Sheets API not in enabled list | API not enabled | Run enable from Path 1, step 1.3 |
| No `google-sheets` in `.claude.json` | Config missing | Add it via Path 1, step 1.5 |
| MCP shows in list but errors | Auth expired or scopes wrong | Re-run auth from Path 2 |
| `command` path is wrong | uvx path changed or relative | Find correct path with `where uvx` / `which uvx` and update |

### 4.3 Verify fix

After applying the fix, re-run the relevant diagnostic to confirm. Then tell the user to restart Claude Code.

---

## General rules

- Always RUN commands for the user, don't just show them
- Use `AskUserQuestion` when a decision is needed
- Use full absolute paths in all MCP config (not relative, not bare command names)
- Use the Python JSON approach to modify `.claude.json` (it changes frequently and file-edit tools may race)
- After any config change, always tell the user to restart Claude Code
- Be concise don't over-explain unless the user asks "why"