mcpField
G
google-docs

google-docs

github.com/sanjay3290ドキュメント447555 回インストール7 週間前に更新
リポジトリ

google-docs について

Google Docs は、MCP サーバーを使わず、独立した OAuth 認証で Google Docs を操作する軽量スキルです。Google Workspace ユーザー向けに、コマンドラインでの文書操作を提供します。

主な機能

  1. 01独立した OAuth ログインとログアウト
  2. 02認証状態の確認
  3. 03内容を指定した文書の作成
  4. 04タイトルによる文書検索
  5. 05システムのキーチェーンでトークンを安全に保存

活用シーン

  1. 01議事録やプロジェクト計画の作成
  2. 02タイトルによる文書検索
  3. 03認証と Google Docs アクセスの管理

MCP 対応

このスキルは MCP サーバーを必要とせず、独立した OAuth 認証で Google Docs にアクセスします。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/sanjay3290/ai-skills --skill google-docs

インストール後、Claude Code で/google-docsを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

README.md
requirements.txt
scripts/
auth.py
docs.py
requirements.txt

詳細

Google Docs

スタンドアロンの OAuth 認証による軽量な Google Docs 連携です。MCP サーバーは必要ありません。

⚠️ Google Workspace アカウントが必要です。 個人の Gmail アカウントはサポートされていません。

初回セットアップ

Google で認証します(ブラウザーが開きます):

python scripts/auth.py login

認証状態を確認します:

python scripts/auth.py status

必要に応じてログアウトします:

python scripts/auth.py logout

コマンド

すべての操作は scripts/docs.py を介して行います。ログインしていない場合は、初回使用時に自動認証されます。

# Create a new document
python scripts/docs.py create "Meeting Notes"

# Create a document with initial content
python scripts/docs.py create "Project Plan" --content "# Overview\n\nThis is the project plan."

# Find documents by title
python scripts/docs.py find "meeting" --limit 10

# Get text content of a document
python scripts/docs.py get-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms

# Get text using a full URL
python scripts/docs.py get-text "https://docs.google.com/document/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"

# Append text to end of document
python scripts/docs.py append-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms "New paragraph at the end."

# Insert text at beginning of document
python scripts/docs.py insert-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms "Text at the beginning.\n\n"

# Replace text in document
python scripts/docs.py replace-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms "old text" "new text"

ドキュメント ID の形式

Google Docs のドキュメント ID は、1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms のような形式です。次の方法で指定できます:

  • URL 全体を使用する(ID は自動的に抽出されます)
  • ドキュメント ID のみを使用する
  • find コマンドの結果からドキュメント ID を取得する

トークン管理

トークンはシステムのキーリングを使用して安全に保存されます:

  • macOS:Keychain
  • Windows:Windows Credential Locker
  • Linux:Secret Service API(GNOME Keyring、KDE Wallet など)

サービス名:google-docs-skill-oauth

アクセストークンの有効期限が切れると、Google のクラウド関数を使用して自動的に更新されます。

コメント