Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the Google Sheets in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
Let your AI work with Google Sheets: read any range or several at once, see a spreadsheet's tabs and sizes, append rows to a table, write and update cells and formulas, create spreadsheets and add or rename tabs. Personal Google accounts and Google Workspace.
Try asking
Example prompts for Google Sheets
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Google Sheets, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Google Sheets + Gemini
Let your AI work with Google Sheets: read any range or several at once, see a spreadsheet's tabs and sizes, append rows to a table, write and update cells and formulas, create spreadsheets and add or rename tabs. Personal Google accounts and Google Workspace.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
Step 1 — Get credentials
- Open console.cloud.google.com, pick or create a project, then go to APIs & Services → Library and enable the Google Sheets API.
- Open APIs & Services → OAuth consent screen. Choose Internal if you are on Google Workspace (the simplest option), otherwise External. For External, set the publishing status to In production: while the app is in Testing, Google revokes its refresh tokens after 7 days and the connector stops working every week. For your own account you can click through the "unverified app" warning.
- Open APIs & Services → Credentials → Create credentials → OAuth client ID, choose the application type Web application and add the authorized redirect URI
https://cloud.anythingmcp.com/api/mcp-oauth/callback. If you host AnythingMCP yourself, enterhttps://your-anythingmcp-host/api/mcp-oauth/callbackinstead. - Paste the client ID into
GOOGLE_CLIENT_IDand the client secret intoGOOGLE_CLIENT_SECRET, then install the connector. - On the connector page, click Authorize with Provider and sign in with the Google account whose spreadsheets the AI should use. The refresh token is stored encrypted and access tokens are renewed automatically.
One Google client for all Google connectors: the same Cloud project and OAuth client can serve every Google connector: Gmail, Google Calendar, Google Drive, Google Sheets, Google Docs, Google Tasks, Search Console, Analytics and Ads. Enable each API in that project, reuse the same client ID and secret, and authorize each connector once. Each one asks only for its own permissions.
Finding a spreadsheet: paste the spreadsheet's link into the chat; its id is the long string in https://docs.google.com/spreadsheets/d/<id>/edit. To find spreadsheets by name, add the Google Drive connector as well. Values are written as if typed, so numbers, dates and formulas such as =SUM(B2:B20) work, and new rows are appended after the last row of a table without overwriting anything below it.
Permissions: the connector asks for https://www.googleapis.com/auth/spreadsheets: read and write every spreadsheet your account can open. It does not include Google Drive, so the connector cannot list, search, move or share spreadsheet files.
Read-only setup: change the scope in the connector's OAuth settings to https://www.googleapis.com/auth/spreadsheets.readonly, authorize again and disable gsheets_append_rows, gsheets_update_range, gsheets_batch_update_values, gsheets_create_spreadsheet, gsheets_add_sheet and gsheets_rename_sheet.
Switched off at install: gsheets_clear_range and gsheets_batch_update (it can delete tabs, rows and columns). Turn them on per tool if the AI needs them.
Common errors: 401 means the authorization expired or was revoked (always after 7 days while the consent screen is in Testing): click Authorize with Provider again. 403 PERMISSION_DENIED means the account cannot open or edit that spreadsheet, or the scope is read-only; 403 "Sheets API has not been used in project" means the Google Sheets API is not enabled in the Cloud project. 400 Unable to parse range means a tab name is misspelled or needs single quotes, as in 'Sales 2026'!A:C.
The connector does not find, share, move or delete spreadsheet files (the Google Drive connector does that) and does not run Apps Script.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Gemini
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart
gemini. - Run
/mcpinside Gemini CLI (orgemini mcp listin your shell):anythingmcpshould show as connected. - Start prompting: Gemini CLI can now call the
Google Sheetstools.
Available tools
| Tool | What it does |
|---|---|
gsheets_get_spreadsheet | Get a spreadsheet's structure without cell data: title, locale, time zone, URL, and every sheet (tab) with its sheetId, title, position… |
gsheets_read_range | Read the cell values of one range in A1 notation (e.g. "Sheet1!A1:D50") |
gsheets_batch_read | Read several ranges of one spreadsheet in a single call, e.g. ["Summary!A1:B10", "Data!A1:F100"] |
gsheets_append_rows | Append rows after the last row of the table found in range (e.g. "Sheet1!A:E" or just "Sheet1"), inserting new rows so nothing is… |
gsheets_update_range | Write values into a range, overwriting what is there (e.g. range "Sheet1!B2:C3" with [[1, 2], [3, 4]]) |
gsheets_batch_update_values | Write several ranges of one spreadsheet in a single call, overwriting them: data is a list of {"range": "Sheet1!A1:B2", "values": [[...]… |
gsheets_clear_range | Empty all values in a range (formatting and validation stay), e.g. "Sheet1!A2:Z" to keep the header row |
gsheets_create_spreadsheet | Create a new, empty spreadsheet in the root of the user's My Drive, with one sheet named "Sheet1" (or the locale's equivalent) |
gsheets_add_sheet | Add a sheet (tab) to a spreadsheet, optionally at a position |
gsheets_rename_sheet | Rename a sheet (tab). sheet_id is the numeric sheetId from gsheets_get_spreadsheet (0 for the first sheet of a new spreadsheet), not the… |
gsheets_batch_update | Run Sheets API batchUpdate requests for anything the other tools do not cover: formatting (repeatCell), sorting (sortRange), inserting or… |
Example prompts
- "Read the Orders tab of this spreadsheet and tell me the five customers with the highest total."
- "Append today's expenses to my expense sheet as new rows: date, description, amount."
- "Add a tab called Summary with the monthly totals and a SUM formula in the last row."
- "Create a new spreadsheet for the event guest list with the columns name, email, company and status."
FAQ
Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.
Next steps
Was this guide helpful?