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

Google SpreadsheetとGoogle Driveを操作するためのMetro Control Protocol(MCP)ツール。 A tool for manipulating Google Spreadsheet and Google Drive using MCP (Metoro Control Protocol).

機能(Features)

Google Drive 機能 (Google Drive Features)

  • ファイルリストの照会 (List files)
  • ファイルのコピー (Copy files)
  • ファイル名の変更(Rename files)
  • 空のスプレッドシートの作成 (Create empty spreadsheets)
  • テンプレートベースのスプレッドシートの作成 (Create spreadsheets from templates)
  • 既存のスプレッドシートのコピー (Copy existing spreadsheets)

Google シート機能 (Google シート機能)

  • シートリストの照会 (List 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

# 가상 환경 생성 (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 の設定(Google Cloud Console Setup)

  1. Google Cloud Console でプロジェクトを作成します。 (Create a project in Google Cloud Console)
  2. OAuth 2.0 クライアント ID を生成します。 (Create OAuth 2.0 client ID)
  3. 必要な API を有効にします: (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)

使用方法(Usage)

1. プログラムの実行 (Run the Program):

python main.py

2. MCP によるツールの使用 (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 : Google OAuth 2.0 クライアント シークレット ファイルのパス (Path to Google OAuth 2.0 client secret file)
  • MCPGD_FOLDER_ID : Google Drive フォルダ ID (Google Drive folder ID)
  • MCPGD_TOKEN_PATH : トークン保存ファイルのパス (Path to token storage file, Optional, Default: ~/.mcp_google_spreadsheet.json)

ライセンス(License)

MITライセンス

ID: 1oos2ptkkj