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

Connect Google Sheets to VS Code

VS Code supports MCP servers in agent mode, which means Copilot can read a spreadsheet as easily as it reads your code — once you point it at one.

Last updated

Key facts

  • VS Code supports MCP servers in Copilot agent mode. They are declared in an mcp.json file — .vscode/mcp.json to scope a server to one workspace, or your user configuration to have it everywhere. 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 a Google Sheet to VS Code?

Register a Google Sheets MCP server in VS Code's mcp.json and Copilot's agent mode can query the sheet while you code. PasteSheet turns any Google Sheet into that server from a pasted URL, so there is no Google Cloud project and nothing running locally.

It is the same trick as Cursor and Windsurf — the editors differ, the protocol does not.

Add the server

Create .vscode/mcp.json in your workspace (or add to your user config) and paste the MCP URL:

.vscode/mcp.json
{
  "servers": {
    "pastesheet": {
      "type": "http",
      "url": "https://pastesheet.com/mcp/sheets/your-endpoint-id"
    }
  }
}

Then use it in agent mode

Open Copilot Chat, switch to Agent mode, and ask a question about your data. The agent discovers the sheet's tools, reads the schema, and queries only the rows it needs — you never name a tool yourself.

What it costs

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.

Free

For side projects and trying things out.

$0 /mo
Endpoints
3
Requests / mo
2,000
Row cap
500
  • MCP for AI agents
  • Private endpoints & keys

Frequently asked questions

Does VS Code support MCP servers?

Yes. VS Code supports MCP servers in Copilot agent mode. You register them in an mcp.json file, either per workspace or in your user configuration.

Does this need a GitHub Copilot subscription?

You need whatever plan gives you Copilot agent mode in VS Code. PasteSheet itself only provides the MCP server — what your editor can do with it depends on your editor.

Can Copilot write to the sheet?

No. The tools PasteSheet exposes are read-only, so the agent can query and analyse the spreadsheet but cannot change it.

Where do I put mcp.json?

Use .vscode/mcp.json to scope the server to one project, or add it to your user-level configuration to make the sheet available across every workspace.

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.