# Google Sheets — how to use (mcp.ai)

Read, create and update Google Sheets spreadsheets straight from your AI agent.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_googlesheets?ms=1796396040000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `googlesheets_list`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/googlesheets`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://new.mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/googlesheets/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/googlesheets/add/sheet` — Adds a new sheet to a spreadsheet. Supports three sheet types: GRID, OBJECT, and DATA_SOURCE. SHEET TYPES: - GRID (default): Standard spreadsheet with rows/columns. Use properties to set dimensions, t
  - body: { title?: string, properties?: object, force_unique?: boolean, spreadsheet_id: string, data_source_config?: object, object_sheet_config?: object }
- `POST https://api.mcp.ai/api/googlesheets/aggregate/column/data` — Searches for rows where a specific column matches a value and performs mathematical operations on data from another column.
  - body: { operation: string, sheet_name: string, search_value?: string, search_column?: string, target_column: string, case_sensitive?: boolean, has_header_row?: boolean, spreadsheet_id: string, percentage_total?: number, additional_filters?: object[] }
- `POST https://api.mcp.ai/api/googlesheets/append/dimension` — Tool to append new rows or columns to a sheet, increasing its size. Use when you need to add empty rows or columns to an existing sheet.
  - body: { length: integer, sheet_id: integer, dimension: string, spreadsheet_id: string, response_ranges?: string[], response_include_grid_data?: boolean, include_spreadsheet_in_response?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/batch/get` — Retrieves data from specified cell ranges in a Google Spreadsheet.
  - body: { ranges?: string[], majorDimension?: string, spreadsheet_id: string, valueRenderOption?: string, dateTimeRenderOption?: string, empty_strings_filtered?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/batch/update` — DEPRECATED: Use GOOGLESHEETS_VALUES_UPDATE instead. Write values to ONE range in a Google Sheet, or append as new rows if no start cell is given. IMPORTANT - This tool does NOT accept the Google Sheet
  - body: { values: string|integer|number|boolean[][], sheet_name: string, spreadsheet_id: string, value_input_option?: string, first_cell_location?: string, include_values_in_response?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/batch/update/values/by/data/filter` — Tool to update values in ranges matching data filters. Use when you need to update specific data in a Google Sheet based on criteria rather than fixed cell ranges.
  - body: { data: object[], spreadsheetId: string, valueInputOption: string, includeValuesInResponse?: boolean, responseValueRenderOption?: string, responseDateTimeRenderOption?: string }
- `POST https://api.mcp.ai/api/googlesheets/clear/basic/filter` — Tool to clear the basic filter from a sheet. Use when you need to remove an existing basic filter from a specific sheet within a Google Spreadsheet.
  - body: { sheet_id: integer, spreadsheet_id: string, response_ranges?: string[], response_include_grid_data?: boolean, include_spreadsheet_in_response?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/clear/values` — Clears cell content (preserving formatting and notes) from a specified A1 notation range in a Google Spreadsheet; the range must correspond to an existing sheet and cells.
  - body: { range: string, spreadsheet_id: string }
- `POST https://api.mcp.ai/api/googlesheets/create/chart` — Create a chart in a Google Sheets spreadsheet using the specified data range and chart type. Conditional requirements: - Provide either a simple chart via chart_type + data_range (basicChart), OR supp
  - body: { title?: string, sheet_id: integer, subtitle?: string, chart_spec?: object, chart_type: string, data_range: string, x_axis_title?: string, y_axis_title?: string, background_red?: number, spreadsheet_id: string, background_blue?: number, legend_position?: string, background_green?: number }
- `POST https://api.mcp.ai/api/googlesheets/create/google/sheet1` — Creates a new Google Spreadsheet in Google Drive. If a title is provided, the spreadsheet will be created with that name. If no title is provided, Google will create a spreadsheet with a default name 
  - body: { title?: string, folder_id?: string, folder_name?: string }
- `POST https://api.mcp.ai/api/googlesheets/create/spreadsheet/column` — Creates a new column in a Google Spreadsheet. Specify the target sheet using sheet_id (numeric) or sheet_name (text). If neither is provided, defaults to the first sheet (sheet_id=0).
  - body: { sheet_id?: integer, sheet_name?: string, insert_index?: integer, spreadsheet_id: string, response_ranges?: string[], inherit_from_before?: boolean, response_include_grid_data?: boolean, include_spreadsheet_in_response?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/create/spreadsheet/row` — Inserts a new, empty row into a specified sheet of a Google Spreadsheet at a given index, optionally inheriting formatting from the row above.
  - body: { sheet_id?: integer, sheet_name?: string, insert_index?: integer, spreadsheet_id: string, response_ranges?: string[], inherit_from_before?: boolean, response_include_grid_data?: boolean, include_spreadsheet_in_response?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/delete/dimension` — Tool to delete specified rows or columns from a sheet in a Google Spreadsheet. Use when you need to remove a range of rows or columns.
  - body: { sheet_id?: integer, dimension?: string, end_index?: integer, sheet_name?: string, start_index?: integer, spreadsheet_id: string, response_ranges?: string[], delete_dimension_request?: object, response_include_grid_data?: boolean, include_spreadsheet_in_response?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/delete/sheet` — Tool to delete a sheet (worksheet) from a spreadsheet. Use when you need to remove a specific sheet from a Google Sheet document.
  - body: { sheetId: integer, spreadsheetId: string, responseRanges?: string[], responseIncludeGridData?: boolean, includeSpreadsheetInResponse?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/execute/sql` — DEPRECATED: Use direct Google Sheets actions instead: - GOOGLESHEETS_VALUES_GET / GOOGLESHEETS_BATCH_GET for reads - GOOGLESHEETS_VALUES_UPDATE / GOOGLESHEETS_UPDATE_VALUES_BATCH / GOOGLESHEETS_SPREAD
  - body: { sql: string, dry_run?: boolean, delete_method?: string, spreadsheet_id: string }
- `POST https://api.mcp.ai/api/googlesheets/find/worksheet/by/title` — DEPRECATED: Use GetSpreadsheetInfo instead. Finds a worksheet by its exact, case-sensitive title within a Google Spreadsheet; returns a boolean indicating if found and the matched worksheet's metadata
  - body: { spreadsheet_id: string, worksheet_title: string }
- `POST https://api.mcp.ai/api/googlesheets/format/cell` — Applies text and background cell formatting to a specified range in a Google Sheets worksheet.
  - body: { red?: number, blue?: number, bold?: boolean, green?: number, range?: string, italic?: boolean, fontSize?: integer, text_link?: string, underline?: boolean, sheet_name?: string, text_color?: string, font_family?: string, padding_top?: integer, border_color?: string, border_style?: string, padding_left?: integer, worksheet_id?: integer, end_row_index?: integer, padding_right?: integer, strikethrough?: boolean, wrap_strategy?: string, padding_bottom?: integer, spreadsheet_id: string, text_direction?: string, start_row_index?: integer, background_alpha?: number, background_color?: string, end_column_index?: integer, number_format_type?: string, start_column_index?: integer, vertical_alignment?: string, text_rotation_angle?: integer, horizontal_alignment?: string, number_format_pattern?: string, hyperlink_display_type?: string, text_rotation_vertical?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/get/sheet/names` — Lists all worksheet names from a specified Google Spreadsheet (which must exist), useful for discovering sheets before further operations.
  - body: { exclude_hidden?: boolean, spreadsheet_id: string }
- `POST https://api.mcp.ai/api/googlesheets/get/spreadsheet/by/data/filter` — Returns the spreadsheet at the given ID, filtered by the specified data filters. Use this tool when you need to retrieve specific subsets of data from a Google Sheet based on criteria like A1 notation
  - body: { dataFilters?: object[], spreadsheetId: string, includeGridData?: boolean, excludeTablesInBandedRanges?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/get/spreadsheet/info` — Retrieves metadata for a Google Spreadsheet using its ID. By default, returns essential information (ID, title, sheet properties) to avoid payload size issues. Use the fields parameter for comprehensi
  - body: { fields?: string, ranges?: string[], spreadsheet_id?: string, include_grid_data?: boolean, exclude_tables_in_banded_ranges?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/get/table/schema` — DEPRECATED: Use GOOGLESHEETS_GET_SHEET_NAMES and GOOGLESHEETS_GET_SPREADSHEET_INFO for sheet structure metadata, and GOOGLESHEETS_VALUES_GET for direct range inspection. This action is used to get the
  - body: { sheet_name?: string, table_name: string, sample_size?: integer, spreadsheet_id: string }
- `POST https://api.mcp.ai/api/googlesheets/insert/dimension` — Tool to insert new rows or columns into a sheet at a specified location. Use when you need to add empty rows or columns within an existing Google Sheet.
  - body: { spreadsheet_id: string, response_ranges?: string[], insert_dimension: object, response_include_grid_data?: boolean, include_spreadsheet_in_response?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/list/tables` — DEPRECATED: Use GOOGLESHEETS_GET_SHEET_NAMES for tab discovery and GOOGLESHEETS_GET_SPREADSHEET_INFO for full sheet metadata. This action is used to list all tables in a Google Spreadsheet, call this 
  - body: { min_rows?: integer, min_columns?: integer, min_confidence?: number, spreadsheet_id: string }
- `POST https://api.mcp.ai/api/googlesheets/lookup/spreadsheet/row` — Finds the first row in a Google Spreadsheet where a cell's entire content exactly matches the query string, searching within a specified A1 notation range or the first sheet by default.
  - body: { query: string, range?: string, case_sensitive?: boolean, spreadsheet_id: string, value_render_option?: string, normalize_whitespace?: boolean, date_time_render_option?: string }
- `POST https://api.mcp.ai/api/googlesheets/query/table` — DEPRECATED: Use GOOGLESHEETS_VALUES_GET / GOOGLESHEETS_BATCH_GET for table reads and GOOGLESHEETS_LOOKUP_SPREADSHEET_ROW for row lookup/filter workflows. Execute SQL-like SELECT queries against Google
  - body: { sql: string, spreadsheet_id: string, include_formulas?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/search/developer/metadata` — Tool to search for developer metadata in a spreadsheet. Use when you need to find specific metadata entries based on filters.
  - body: { dataFilters: object[], spreadsheetId: string }
- `POST https://api.mcp.ai/api/googlesheets/search/spreadsheets` — Search for Google Spreadsheets using various filters including name, content, date ranges, and more.
  - body: { query?: string, order_by?: string, page_token?: string, max_results?: integer, search_type?: string, starred_only?: boolean, created_after?: string, modified_after?: string, shared_with_me?: boolean, include_trashed?: boolean, include_shared_drives?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/set/basic/filter` — Tool to set a basic filter on a sheet in a Google Spreadsheet. Use when you need to filter or sort data within a specific range on a sheet.
  - body: { filter: object, spreadsheetId: string, responseRanges?: string[], responseIncludeGridData?: boolean, includeSpreadsheetInResponse?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/sheet/from/json` — DEPRECATED: Use GOOGLESHEETS_CREATE_GOOGLE_SHEET1 + GOOGLESHEETS_UPDATE_VALUES_BATCH (or GOOGLESHEETS_VALUES_UPDATE / GOOGLESHEETS_SPREADSHEETS_VALUES_APPEND) instead. Creates a new Google Spreadsheet
  - body: { title: string, sheet_json: object[], sheet_name: string }
- `POST https://api.mcp.ai/api/googlesheets/spreadsheets/sheets/copy/to` — Tool to copy a single sheet from a spreadsheet to another spreadsheet. Use when you need to duplicate a sheet into a different spreadsheet.
  - body: { sheet_id: integer, spreadsheet_id: string, destination_spreadsheet_id: string }
- `POST https://api.mcp.ai/api/googlesheets/spreadsheets/values/append` — Tool to append values to a spreadsheet. Use when you need to add new data to the end of an existing table in a Google Sheet.
  - body: { range: string, values: string|integer|number|boolean[][], spreadsheetId: string, majorDimension?: string, insertDataOption?: string, valueInputOption: string, includeValuesInResponse?: boolean, responseValueRenderOption?: string, responseDateTimeRenderOption?: string }
- `POST https://api.mcp.ai/api/googlesheets/spreadsheets/values/batch/clear` — Tool to clear one or more ranges of values from a spreadsheet. Use when you need to remove data from specific cells or ranges while keeping formatting and other properties intact.
  - body: { ranges: string[], spreadsheet_id: string }
- `POST https://api.mcp.ai/api/googlesheets/spreadsheets/values/batch/get/by/data/filter` — Tool to return one or more ranges of values from a spreadsheet that match the specified data filters. Use when you need to retrieve specific data sets based on filtering criteria rather than entire sh
  - body: { dataFilters: object[], spreadsheetId: string, majorDimension?: string, valueRenderOption?: string, dateTimeRenderOption?: string }
- `POST https://api.mcp.ai/api/googlesheets/update/sheet/properties` — Tool to update properties of a sheet (worksheet) within a Google Spreadsheet, such as its title, index, visibility, tab color, or grid properties. Use this when you need to modify the metadata or appe
  - body: { spreadsheetId: string, responseRanges?: string[], updateSheetProperties: object, responseIncludeGridData?: boolean, includeSpreadsheetInResponse?: boolean }
- `POST https://api.mcp.ai/api/googlesheets/update/spreadsheet/properties` — Tool to update SPREADSHEET-LEVEL properties such as the spreadsheet's title, locale, time zone, or auto-recalculation settings. Use when you need to modify the overall configuration of a Google Spread
  - body: { fields: string, properties: object, spreadsheetId: string, responseRanges?: string[], responseIncludeGridData?: boolean, includeSpreadsheetInResponse?: boolean }

## More
- Page: https://new.mcp.ai/googlesheets
- Agent spec (llms.txt): https://new.mcp.ai/googlesheets/llms.txt
- Postman collection: https://new.mcp.ai/googlesheets/postman.json
