PasteSheet icon PasteSheet logo mark — a spreadsheet grid with a curly brace on a green rounded square PasteSheet

Connect Google Sheets to Claude Code

Claude Code can read a Google Sheet over MCP straight from your terminal. Register the endpoint once with the CLI and the agent can query your data while it works.

Last updated

Key facts

  • Claude Code registers remote MCP servers from the CLI — claude mcp add --transport http <name> <url> — and manages them with claude mcp list and claude mcp remove. source
  • MCP is an open protocol built on JSON-RPC 2.0. A server exposes Resources, Prompts and Tools to any MCP client — Claude, Cursor, ChatGPT, VS Code and Windsurf all speak it. source
  • PasteSheet's MCP server exposes three tools — list_tabs, get_schema and query_rows — and is read-only by design: an agent can query your sheet but can never modify it.
  • It needs no Google Cloud project, no OAuth consent screen and no service-account JSON. You paste a share URL, and MCP is included on the Free plan.

How do you add Google Sheets to Claude Code?

Run claude mcp add --transport http pastesheet <your-mcp-url>. Claude Code registers HTTP MCP servers from the CLI, and PasteSheet turns any Google Sheet into one of those URLs, so your terminal agent can query the spreadsheet without a Google Cloud project or a local server.

Once it is registered, Claude Code can list the sheet's tabs, read its schema, and run filtered queries against it mid-task — useful when the data you need (fixtures, config, a content table) lives in a spreadsheet rather than the repo.

Connect in three steps

From a connected endpoint to a querying agent:

  1. 1 In PasteSheet, open the endpoint's Connect via MCP panel and copy its MCP URL.
  2. 2 Register it with claude mcp add --transport http pastesheet <your-mcp-url> (add a --header for a private endpoint).
  3. 3 Run claude, confirm the server with claude mcp list, and ask a question about your sheet — the agent calls the read tools for you.

Add the server with one command

Claude Code registers HTTP MCP servers from the CLI. Point it at your endpoint's MCP URL:

terminal
claude mcp add --transport http pastesheet \
  https://pastesheet.com/mcp/sheets/your-endpoint-id

Private endpoints

For a private endpoint, pass a bearer header when you add the server:

terminal
claude mcp add --transport http pastesheet \
  https://pastesheet.com/mcp/sheets/your-endpoint-id \
  --header "Authorization: Bearer YOUR_KEY"

Use it

Run claude and ask about your data — the agent calls list_tabs, get_schema, and query_rows as needed. Manage the connection later with claude mcp list and claude mcp remove pastesheet.

For the full picture of how the MCP connection works, see the Google Sheets MCP overview.

What Claude Code can do with your sheet

With the endpoint registered, the agent can, mid-task:

  • Read a specific tab or a filtered slice of rows without leaving the terminal.
  • Check whether a metric crossed a threshold before it writes code or a report.
  • Cross-reference fixtures, config, or a content table that lives in a sheet rather than the repo.
  • Look up a single value — an ID, a price, a feature flag — on demand.

No install, just a URL

Unlike managed connectors that make you pip-install a CLI, log into a broker, and authorize Google, PasteSheet is one claude mcp add command against a URL. There is no Google Cloud project, no OAuth consent screen, and no local server to keep running — and because the connection is read-only, the agent can query your sheet but never change it.

Requirements

MCP is included on the Free plan. Connect any public endpoint over MCP with no Google Cloud project and no credit card. Private endpoints and the account-wide workspace server need a paid plan (from Starter ($9/mo)) for the keys and OAuth they authenticate with.

Pro adds full-text search and aggregation (count, sum, avg, group_by) that your AI agent can call through query_rows.

Starter

For indie makers shipping a real app.

$9 /mo
Endpoints
10
Requests / mo
50,000
Row cap
5,000
  • MCP for AI agents

Frequently asked questions

How do I add a Google Sheet to Claude Code?

Run claude mcp add --transport http pastesheet <your MCP URL>. The agent then exposes the sheet's read tools automatically.

How do I authenticate a private endpoint?

Pass --header "Authorization: Bearer YOUR_KEY" when running claude mcp add. Public endpoints need no header.

How do I check the connection worked?

Run claude mcp list to see pastesheet registered, then ask Claude Code a question about your data. Remove it later with claude mcp remove pastesheet.

Claude Code is not connecting to the server — what is wrong?

Make sure you passed --transport http and the full MCP URL, and that a private endpoint includes the Authorization: Bearer header. Open the endpoint's Connect via MCP panel in PasteSheet to copy the exact URL.

Is it read-only, and does it work in the VS Code extension?

Yes to read-only — the agent can query but never edit the sheet. The same MCP URL works anywhere Claude Code runs, including the VS Code and JetBrains extensions.

Sources

Related guides

Turn your sheet into an API in minutes

Paste a Google Sheet URL and get a live REST API and MCP server — no backend, no code, free to start.