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

Give your AI agent a Google Sheet to work from

AI agents are only as good as the data they can reach. PasteSheet publishes any Google Sheet as an MCP server, so Claude, Cursor, ChatGPT, or your own agent can discover tabs, read the schema, and query rows on demand — safely, because the connection can only read.

Last updated

Key facts

  • 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.
  • 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
  • Google's hosted Workspace MCP servers cover Gmail, Drive, Calendar, Chat and the People API — not Sheets. Its managed Google Cloud MCP servers do not cover Sheets either. source
  • Google does publish an open-source Workspace MCP server (a Gemini CLI extension) that includes Sheets — but you run it yourself, and it still needs a Google Cloud project and OAuth credentials. There is no hosted, zero-setup Google Sheets MCP server from Google. source
  • 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.

A spreadsheet your agent can actually query

Agents work best against structured, up-to-date facts: a product list, a policy table, a roster, a pricing grid. A Google Sheet is where teams already keep that data. PasteSheet exposes it as a Model Context Protocol server, so the agent gets real tools instead of a pasted screenshot that goes stale the moment someone edits a cell.

Crucially, this is publish, not write-back: public sheets can be published from a URL, while restricted sheets can be selected through a file-scoped Google account connection. Either way, PasteSheet exposes one read-only source that any agent — yours or a teammate's — can consume, with no write tool and no Google Cloud project for you to configure.

The tools your agent gets

Connect the endpoint and the agent can call three read-only tools:

  • list_tabs — discover the tabs in the sheet and the default one.
  • get_schema — read each column's name, alias, and type before querying.
  • query_rows — filter, partial-match, full-text search, sort, and paginate rows.

Connect a single sheet

Each endpoint has its own MCP URL. Copy it from the Connect via MCP panel and add it as a custom connector:

claude_desktop_config.json
{
  "mcpServers": {
    "pastesheet": {
      "url": "https://pastesheet.com/mcp/sheets/your-endpoint-id"
    }
  }
}

Querying beats stuffing the context window

The instinct with agent data is to load everything up front — dump the sheet into the system prompt and let the model sort it out. That works until it does not, and the failure is quiet: as rows accumulate, retrieval accuracy drops, arithmetic across hundreds of rows starts drifting, and token cost scales with sheet size on every single turn.

A query tool inverts that. The agent asks for what it needs, gets back the matching rows, and reasons over a small set. A 50,000-row sheet costs the same per turn as a 50-row one, because the sheet never enters the context window — only the answer does.

It also fixes staleness. A pasted table is a snapshot; a tool call reads the sheet as it is now, so an edit made two minutes ago is already reflected.

Designing a sheet an agent can use well

Agents read spreadsheets more literally than people do. A few habits make a large difference:

  • One header row, plain text. Merged cells and decorative title rows above the headers break column detection.
  • Name columns like fields, not labels. status beats Current Status ✅. Column aliases let you keep the pretty header for humans and a clean name for the agent.
  • One fact per cell. A cell holding "active, enterprise, EU" cannot be filtered on. Three columns can.
  • Keep types consistent down a column. A stray N/A in a number column is what turns a confident answer into a wrong one.
  • Split unrelated data into tabs. The agent calls list_tabs first, so clear tab names are free navigation.
  • Delete trailing empty rows. Otherwise counts and aggregates quietly include them.

Where the boundaries are

Two limits worth knowing before you build on this. First, the connection is read-only by construction — there is no write tool to call — so an agent cannot corrupt the source no matter what it is asked to do. That is the point, but it does mean write-back workflows need something else.

Second, keep source privacy and endpoint privacy separate. A restricted Google Sheet can be selected through Google Picker and read by PasteSheet without changing its Google sharing setting. You can then keep the endpoint behind a bearer key, or deliberately make the returned data public. A public endpoint is still public even when the source sheet remains restricted.

Read-only, so it is safe to hand out

Because the endpoint is read-only by design, it is safe to expose publicly or hand to a teammate: consumers can read and query the data but can never change the sheet. And there is no Google Cloud project, OAuth screen, or service account to set up — you paste a share URL and get a live API.

What it costs

Starter

For indie makers shipping a real app.

$9 /mo
Endpoints
10
Requests / mo
50,000
Row cap
5,000
  • MCP for AI agents
  • Full-text search
  • Aggregation for agents

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.

Frequently asked questions

Which agents and clients can connect?

Any MCP-compatible client — Claude Desktop, Claude web, Claude Code, and Cursor via the per-sheet URL, and ChatGPT via the workspace server with OAuth. Custom agents that speak MCP can connect the same way.

Can the agent modify my sheet?

No. The exposed tools only read data. An agent can query and analyze your sheet but cannot add, edit, or delete rows, which is what makes the source safe to share.

Do I need to write any code?

No. There is no Apps Script, service account, or server to deploy. Paste a public sheet URL, or connect Google and choose a restricted sheet in Picker; PasteSheet hosts the REST API and MCP server for you.

How does the agent handle large sheets?

query_rows supports filters, full-text search, sorting, and pagination, so the agent pulls just the rows it needs rather than the whole sheet — keeping responses fast and within context limits.

How do I connect an AI agent to Google Sheets?

Publish a public sheet from its URL, or connect Google and choose a restricted sheet in Picker. Add the resulting MCP endpoint to the agent as a custom connector. Any MCP-compatible client picks up the three read tools automatically, with no glue code or Google Cloud project for you to build.

Why not just paste the spreadsheet into the prompt?

Because it scales badly and goes stale. Loading rows into context makes every turn cost more as the sheet grows, degrades retrieval accuracy, and freezes the data at the moment you pasted it. A query tool returns only matching rows, from the live sheet.

Can an agent be tricked into changing the data?

No. Only read tools are exposed, so there is no write path for a prompt to reach. The worst outcome of a bad instruction is an unexpected query result, not a modified spreadsheet.

Can PasteSheet read a restricted Google Sheet?

Yes. Connect your Google account, choose the exact sheet in Google Picker, and PasteSheet reads the selected file through a file-scoped connection. The app implements no write path.

Does a private endpoint make the underlying sheet private?

No. Endpoint privacy controls who may query PasteSheet. Source privacy is controlled separately in Google, and a restricted source can remain restricted while the endpoint is public or bearer-key protected.

Can one agent read several sheets?

Yes. The workspace MCP server exposes every endpoint on your account through a single connection, so an agent can answer questions that span sheets without a connector per spreadsheet.

Is this the same as RAG?

No, and it is usually better for tabular data. RAG retrieves passages by semantic similarity, which suits prose. A sheet has real columns, so exact filters, sorts, and aggregates give precise answers instead of approximate ones.

Sources

Related use cases

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.