Content
# MCP Google Spreadsheet
A tool for manipulating Google Spreadsheet and Google Drive using MCP (Metoro Control Protocol).
## Features
### Google Drive Features
- List files
- Copy files
- Rename files
- Create empty spreadsheets
- Create spreadsheets from templates
- Copy existing spreadsheets
### Google Sheets Features
- List sheets
- Copy sheets
- Rename sheets
- Get sheet data
- Add/Delete rows
- Add/Delete columns
- Update cells
- Create/Update/Delete charts
- Update cell formats
## Installation
### 1. Virtual Environment Setup
#### macOS/Linux
```bash
# Create virtual environment
python -m venv venv
# Activate virtual environment
source venv/bin/activate
```
#### Windows
```bash
# Create virtual environment
python -m venv venv
# Activate virtual environment
venv\Scripts\activate
```
### 2. Install Required Packages:
```bash
pip install -r requirements.txt
```
### 3. Google Cloud Console Setup
1. Create a project in Google Cloud Console.
2. Create OAuth 2.0 client ID.
3. Enable required APIs:
- Google Sheets API
- Google Drive API
### 4. Environment Variables Setup:
```bash
export MCPGD_CLIENT_SECRET_PATH="/path/to/client_secret.json"
export MCPGD_FOLDER_ID="your_folder_id"
export MCPGD_TOKEN_PATH="/path/to/token.json" # Optional
```
## Usage
### 1. Run the Program:
```bash
python main.py
```
### 2. Use Tools via MCP:
```bash
# Example: List files
mcp list_files
# Example: Get sheet data
mcp get_sheet_data --spreadsheet-id "your_spreadsheet_id" --range "Sheet1!A1:D10"
# Example: Create chart
mcp create_chart --chart-type "LINE" --range "A1:B10" --sheet-name "Sheet1" --title "Sales Trend"
```
## Environment Variables
- `MCPGD_CLIENT_SECRET_PATH`: Path to Google OAuth 2.0 client secret file
- `MCPGD_FOLDER_ID`: Google Drive folder ID
- `MCPGD_TOKEN_PATH`: Path to token storage file, Optional, Default: ~/.mcp_google_spreadsheet.json
## License
MIT License
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
awesome-claude-skills
A curated list of awesome Claude Skills, resources, and tools for...
antigravity-awesome-skills
The Ultimate Collection of 130+ Agentic Skills for Claude...
memU
MemU is a memory framework for LLM and AI agents, organizing multimodal...
pipedream
Connect APIs, remarkably fast. Free for developers.