# 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: 2026-07-13 · Source: <https://pastesheet.com/guides/google-sheets-mcp-vscode>*

## 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](https://code.visualstudio.com/docs/copilot/chat/mcp-servers))
- 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](https://modelcontextprotocol.io/specification/2025-06-18))
- 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](https://pastesheet.com/guides/google-sheets-mcp) 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](https://pastesheet.com/guides/google-sheets-mcp-cursor) and [Windsurf](https://pastesheet.com/guides/google-sheets-mcp-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:

```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 — $0/month.** For side projects and trying things out.

- Endpoints: 3
- Requests: 2,000 / month
- Rows per endpoint: 500
- Tabs per endpoint: 1
- Rate limit: 60 / minute

## 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

- [Use MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) — Microsoft
- [Model Context Protocol specification](https://modelcontextprotocol.io/specification/2025-06-18) — Model Context Protocol

## Related guides

- [Google Sheets MCP Server for Cursor](https://pastesheet.com/guides/google-sheets-mcp-cursor) — Add a Google Sheet to Cursor as an MCP server so the editor's AI can query your spreadsheet while you code. No backend — copy one URL and you are connected.
- [Google Sheets MCP Server for Windsurf](https://pastesheet.com/guides/google-sheets-mcp-windsurf) — Add a Google Sheet to Windsurf as an MCP server so Cascade can query your spreadsheet while you code. One URL, no backend, no Google Cloud project.
- [Google Sheets MCP for Claude Code](https://pastesheet.com/guides/google-sheets-mcp-claude-code) — Add a Google Sheet to Claude Code as an MCP server with one command. Query spreadsheet data from your terminal-based agent — no backend and no code to write.
- [Google Sheets MCP Server for Claude & ChatGPT](https://pastesheet.com/guides/google-sheets-mcp) — Turn any public or private Google Sheet into an MCP server so Claude, Cursor, and ChatGPT can read and query it in plain English. No code, no backend.

---

[PasteSheet](https://pastesheet.com) turns any Google Sheet into a live REST API and MCP server for AI agents — no backend, no code. Canonical HTML version of this page: <https://pastesheet.com/guides/google-sheets-mcp-vscode>
