Google Sheets Import and Export MCP Server
Provides tools to import data from Google Sheets as dataset rows and export data into Google Sheets by appending, replacing, or upserting rows. Supports tab/range selection, header-based or column-based mapping, adding new columns, key-based upserts, and authentication via Google service account keys or OAuth credentials.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Google Sheets Import and Export MCP Server
An MCP server for the Mamba Labs Google Sheets Import and Export actor on Apify. Google Sheets in and out of Apify, on your own Google credentials.
What's Inside
Related MCP server: Google Sheets MCP Server
What it does
Give a Google Sheet URL. In read mode the actor returns one row per sheet row, keyed by the header row. In append, replace, or upsert mode it writes the items of an Apify dataset, or a list of rows you pass, into the sheet: it adds new columns to the header as they appear, and in upsert mode it updates the rows whose key column value already exists. Writes use your own Google service account key or OAuth token. A sheet shared as anyone with the link reads with no credential.
All of the work runs on Apify. This package is a thin client that starts the actor run, waits for it, and hands back the dataset rows.
Quick start
You need Node.js 18 or newer and an Apify account with an API token.
Add this to your Claude Desktop config (claude_desktop_config.json), Cursor, or any MCP client:
{
"mcpServers": {
"mamba-google-sheets-import-export": {
"command": "npx",
"args": [
"-y",
"@mambalabsdev/mcp-google-sheets-import-export"
],
"env": {
"APIFY_TOKEN": "your-apify-token"
}
}
}
}Restart the client. The google_sheets_import_export tool appears.
Prerequisites
Node.js 18 or newer.
An Apify API token from console.apify.com/account/integrations, set as
APIFY_TOKEN. The server lists its tool without a token; a call needs one.
Example prompts
"Read this Google Sheet and give me the rows as JSON."
"Append these 50 leads to my Google Sheet, matching the existing columns."
"Update the rows in my sheet whose email matches, and add the new ones."
Tool
google_sheets_import_export. One tool. Example arguments:
{
"mode": "read",
"spreadsheet": "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit#gid=0"
}Inputs
Every buyer facing input of the actor. Omitted inputs take the actor's own defaults.
Input | Type | Required | Description |
| string | no | read (default): the sheet becomes one dataset row per sheet row. append: add rows after the last row. replace: clear the tab, then write the rows. upsert: overwrite the rows whose key_column value is already in the sheet and add the rest. The three write modes need a credential below. |
| string | no | The Google Sheets URL as copied from the browser, or the spreadsheet ID. A #gid= in the URL picks that tab. |
| string | no | Optional. The tab name, or its gid number. Default: the gid in the URL, else the first tab. In a write mode a tab name that does not exist is created. |
| string | no | Optional, read mode. An A1 range without the tab name, for example A1:F500 or B:D. Default: the whole tab. |
| boolean | no | true (default) or false. When true, read rows are keyed by the header row, and writes match your row keys to the header columns and add new columns at the end. When false, read rows are keyed by column letter and writes go column by column in key order. |
| string | no | Write modes. The Apify dataset whose items go into the sheet, for example the default dataset of another run. In an Apify integration, pass the triggering run's resource.defaultDatasetId variable. Fields starting with # are skipped. |
| array | no | Write modes, instead of a dataset. A JSON list of objects, one per sheet row, for example [{"name": "Ann", "email": "ann@example.com"}]. |
| array | no | Optional, write modes. Only these keys are written, in this order. Default: every key in the rows, in first seen order. |
| string | no | Upsert mode. The column whose value identifies a row, for example email or url. A row whose value is already in that column is overwritten in place; the rest are added. Rows with no value in it are skipped. |
| string | no | raw (default): every value is stored exactly as given, so text starting with = is not run as a formula. user_entered: Google parses values as if typed, so formulas run and dates and numbers are converted. |
| number | no | Most rows to read or write in this run, 1 to 1,000,000 (default 100,000). |
| string | no | Your own service account key file, pasted whole. Share the spreadsheet with its client_email as an Editor (Viewer to read). It is sent only to Google and is never stored, logged, or written to a row. |
| string | no | Instead of a service account: a refresh token from your own Google OAuth client with the spreadsheets scope. Needs oauth_client_id and oauth_client_secret from the same client. |
| string | no | The client ID that issued the refresh token. |
| string | no | The client secret that issued the refresh token. |
| string | no | Instead of the above: a current OAuth access token with the spreadsheets scope. It expires in about an hour, so it suits a single run. |
| string | no | Optional. The run stops before a charge that would pass this amount, and never writes a block of rows it could not charge. Summary rows are always returned. |
Pricing
Pay per event on Apify, billed to your Apify account. Prices in USD.
Event | Free plan | Bronze | Silver | Gold |
| $0.01 | $0.0095 | $0.009 | $0.0085 |
| $0.005 | $0.00475 | $0.0045 | $0.00425 |
| $0.002 | $0.002 | $0.002 | $0.002 |
Empty, refused, and failed reads and writes, the summary row, and refused input are free. Mamba Labs pays the platform costs of the run. Mamba Labs pays the platform costs of the run, Apify proxy traffic included.
Full actor documentation
apify.com/mambalabs/google-sheets-import-export
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Google Sheets via Apify: write Apify datasets or JSON rows to a sheet, or read a sheet as JSON.
Write rows to Google Sheets (append, replace, update by key) or read a tab. No OAuth needed.
Read and write Google Sheets with your own service account: list tabs, read, append, update, export.
Export scraper results to Google Sheets or import a spreadsheet as clean data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and manage Google Sheets using the Google Sheets API v4.MIT
- FlicenseNot gradedqualityDmaintenanceEnables reading and writing Google Sheets using API key or service account, with support for public and authenticated access.-
- AlicenseNot gradedqualityCmaintenanceEnables full CRUD over Google Sheets through a service account, including reading tabs and rows, finding rows by column value, appending, updating, deleting rows, and managing tabs.MIT
- AlicenseNot gradedqualityCmaintenanceEnables reading and writing Google Sheets, with server-side filtering and update-by-query, supporting credential-less reads for link-shared sheets and service-account writes.MIT