MCP Google Spreadsheet logo

MCP Google Spreadsheet

by dev-ithitchhiker

MCP Google Spreadsheet is a tool for manipulating Google Spreadsheet and Google Drive using MCP (Metoro Control Protocol). It allows users to automate various tasks related to file and sheet management.

View on GitHub

Last updated: N/A

What is MCP Google Spreadsheet?

MCP Google Spreadsheet is a tool designed to interact with Google Sheets and Google Drive through the Metoro Control Protocol (MCP). It provides functionalities to automate tasks such as file management, sheet manipulation, and data processing within the Google ecosystem.

How to use MCP Google Spreadsheet?

To use MCP Google Spreadsheet, you need to set up a virtual environment, install required packages using pip install -r requirements.txt, configure Google Cloud Console with necessary API access and OAuth 2.0 credentials, and set environment variables. Once configured, you can execute the main.py script and use MCP commands to perform actions like listing files, retrieving sheet data, and creating charts.

Key features of MCP Google Spreadsheet

  • List files and sheets

  • Copy and rename files and sheets

  • Create empty or template-based spreadsheets

  • Add/Delete rows and columns

  • Update cells and cell formats

  • Create/Update/Delete charts

Use cases of MCP Google Spreadsheet

  • Automating report generation from spreadsheet data

  • Batch processing of Google Drive files

  • Creating dynamic charts based on real-time data

  • Managing and organizing large datasets in Google Sheets

FAQ from MCP Google Spreadsheet

How do I authenticate with Google?

You need to create OAuth 2.0 client ID in Google Cloud Console and enable Google Sheets API and Google Drive API.

What environment variables are required?

MCPGD_CLIENT_SECRET_PATH (path to client secret file), MCPGD_FOLDER_ID (Google Drive folder ID), and optionally MCPGD_TOKEN_PATH (path to token storage file).

How do I list files in my Google Drive?

Use the mcp list_files command.

How do I get data from a specific sheet range?

Use the mcp get_sheet_data --spreadsheet-id "your_spreadsheet_id" --range "Sheet1!A1:D10" command.

How do I create a chart?

Use the mcp create_chart --chart-type "LINE" --range "A1:B10" --sheet-name "Sheet1" --title "Sales Trend" command.