mcp-google-docs

by dev-ithitchhiker
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides tools for Google Drive manipulation including listing files, copying files, renaming files, and creating various types of documents including empty spreadsheets and template-based spreadsheets.

  • Offers comprehensive Google Sheets functionality for managing sheets, manipulating data (rows/columns/cells), creating and modifying charts, and updating cell formats. Includes capabilities for sheet listing, copying, renaming, and data retrieval.

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

How to install (Installation)

1. Virtual Environment Setup

macOS/Linux

# 가상 환경 생성 (Create virtual environment) python -m venv venv # 가상 환경 활성화 (Activate virtual environment) source venv/bin/activate

Windows

# 가상 환경 생성 (Create virtual environment) python -m venv venv # 가상 환경 활성화 (Activate virtual environment) venv\Scripts\activate

2. Install Required Packages:

pip install -r requirements.txt

3. Google Cloud Console Setup

  1. Create a project in Google Cloud Console.
  2. Create an OAuth 2.0 client ID.
  3. Enable required APIs:
    • Google Sheets API
    • Google Drive API

4. Environment Variables Setup:

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)

How to use (Usage)

1. Run the Program:

python main.py

2. Use Tools via MCP:

# 예시: 파일 목록 조회 (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 (Google Drive folder ID)
  • MCPGD_TOKEN_PATH : Path to token storage file (Optional, Default: ~/.mcp_google_spreadsheet.json)

License

MIT License

ID: 1oos2ptkkj