Back to MCP Catalog

Google Sheets Integration MCP Server

Cloud PlatformsPython
Interact with Google Sheets through AI assistants
Available Tools

list_spreadsheets

Lists spreadsheets in the configured Drive folder (Service Account) or accessible by the user (OAuth)

create_spreadsheet

Creates a new spreadsheet with the specified title

title

get_sheet_data

Reads data from a range in a sheet

spreadsheet_idsheetrange

update_cells

Writes data to a specific range, overwriting existing data

spreadsheet_idsheetrangedata

batch_update_cells

Updates multiple ranges in one API call

spreadsheet_idsheetranges

add_rows

Appends rows to the end of a sheet (after the last row with data)

spreadsheet_idsheetdata

list_sheets

Lists all sheet names within a spreadsheet

spreadsheet_id

create_sheet

Adds a new sheet (tab) to a spreadsheet

spreadsheet_idtitle

get_multiple_sheet_data

Fetches data from multiple ranges across potentially different spreadsheets in one call

queries

get_multiple_spreadsheet_summary

Gets titles, sheet names, headers, and first few rows for multiple spreadsheets

spreadsheet_idsrows_to_fetch

share_spreadsheet

Shares a spreadsheet with specified users/emails and roles

spreadsheet_idrecipientssend_notification

add_columns

Adds columns to a sheet

copy_sheet

Duplicates a sheet within a spreadsheet

rename_sheet

Renames an existing sheet

Google Sheets Integration provides a powerful bridge between AI assistants and Google Spreadsheets. It enables creating, reading, updating, and managing spreadsheets directly through natural language commands, making data manipulation and analysis more accessible. With comprehensive tools for spreadsheet operations including creating new sheets, updating cell data, batch operations, and sharing capabilities, this integration streamlines workflows for data management. The server supports multiple authentication methods, with service accounts being the recommended approach for the most seamless experience.

Overview

Google Sheets Integration allows AI assistants to interact with Google Spreadsheets, enabling powerful data manipulation and analysis through natural language. This MCP server acts as a bridge between MCP-compatible clients (like Claude Desktop) and the Google Sheets API.

Prerequisites

Before using this integration, you need to set up Google Cloud Platform credentials and enable the necessary APIs:

  1. Create a Google Cloud Platform project
  2. Enable the Google Drive API and Google Sheets API
  3. Set up authentication (Service Account recommended)

Installation

The easiest way to run the server is using uvx:

# Install uv if you haven't already
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Authentication Setup

Service Account (Recommended)

  1. In your Google Cloud Console, create a service account
  2. Generate and download a JSON key file for the service account
  3. Create a dedicated folder in Google Drive for spreadsheets
  4. Share this folder with the service account email (with Editor permissions)
  5. Note the folder ID from the Drive URL

Set the following environment variables:

# Linux/macOS
export SERVICE_ACCOUNT_PATH="/path/to/your/service-account-key.json"
export DRIVE_FOLDER_ID="YOUR_DRIVE_FOLDER_ID"

# Windows CMD
set SERVICE_ACCOUNT_PATH="C:\path\to\your\service-account-key.json"
set DRIVE_FOLDER_ID="YOUR_DRIVE_FOLDER_ID"

# Windows PowerShell
$env:SERVICE_ACCOUNT_PATH = "C:\path\to\your\service-account-key.json"
$env:DRIVE_FOLDER_ID = "YOUR_DRIVE_FOLDER_ID"

OAuth Authentication (Alternative)

If you prefer OAuth authentication:

  1. Create OAuth 2.0 Client ID credentials in Google Cloud Console
  2. Download the client secrets JSON file
  3. Set the environment variable:
export OAUTH_CLIENT_SECRETS_PATH="/path/to/client_secrets.json"

Running the Server

Once authentication is configured, run the server:

uvx mcp-google-sheets

The first time you run with OAuth, you'll need to complete the authentication flow in your browser.

Connecting to Claude Desktop

In Claude Desktop, add the MCP server configuration:

  1. Go to Settings > Model Context Protocol
  2. Add a new server with the appropriate configuration
  3. Test the connection

Usage Examples

Once connected, you can ask Claude to perform various spreadsheet operations:

  • "Create a new spreadsheet titled 'Monthly Budget'"
  • "List all my spreadsheets"
  • "Read data from cells A1:C10 in my Budget spreadsheet"
  • "Update the Sales column with these new figures"
  • "Share my presentation spreadsheet with my team members"

Troubleshooting

  • Authentication Errors: Verify your credentials are correctly set up and environment variables are properly defined
  • Permission Issues: Ensure the service account has appropriate access to the Drive folder
  • API Limits: Be aware of Google API quotas and rate limits for heavy usage

Related MCPs

AWS CLI
Cloud PlatformsPython

Execute AWS CLI commands securely through AI assistants

Kubernetes
Cloud PlatformsGo

Connect to and manage Kubernetes clusters through natural language

Cloudflare
Cloud PlatformsTypeScript

A Model Context Protocol server for Cloudflare services

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.