Integrations
Enables email operations including listing, searching, sending, and modifying emails with support for labels, read/unread status, and archive/trash actions
Enables web searches via Google's Custom Search API and returns formatted search results
Provides calendar management capabilities for creating, retrieving, updating, and deleting events, with support for attendees, locations, and time ranges
py-mcp-google-toolbox
AI アシスタントに、Gmail、Google カレンダー、Google ドライブ、Google 検索などの Google サービスとやり取りするための強力なツールを提供する MCP サーバー。
概要
py-mcp-google-toolbox は、次の Google 関連機能を提供します。
- Gmail の操作(読み取り、検索、送信、変更)
- Google カレンダーの管理(イベントの作成、一覧表示、更新、削除)
- Google ドライブの操作(検索、ファイルの読み取り)
- Google 検索統合(ウェブ検索)
目次
前提条件
- Python : Python 3.12以降をインストールします
- Google Cloud Console のセットアップ:
- Google Cloud Consoleに移動
- 新しいプロジェクトを作成するか、既存のプロジェクトを選択してください
- サービス API を有効にします。
- 「APIとサービス」>「ライブラリ」に移動します
- 「Gmail API」を検索して有効にします
- 「Google カレンダー API」を検索して有効にします
- 「Google Drive API」を検索して有効にします
- 検索フォームで「カスタム検索API」を有効にする
- GCP から OAuth 2.0 認証情報を設定します。
- 「APIとサービス」>「認証情報」に移動します
- 「認証情報を作成」>「OAuthクライアントID」をクリックします
- 「Webアプリケーション」を選択
- クライアントIDとクライアントシークレットを書き留めます
- クライアントID
- クライアントシークレット
- secret json をダウンロードし、credentials.json に名前を変更します。
- APIキーを生成する
- カスタム検索エンジンにアクセスしてIDを取得します
インストール
Gitクローン
構成
- UV パッケージ マネージャーをインストールします。
- 仮想環境を作成してアクティブ化します。
- 依存関係をインストールします:
- リフレッシュトークンを取得します(トークンの有効期限が切れている場合はこれを実行できます)
これにより、次のようになります。
- Google OAuth認証のためにブラウザを開きます
- 次の権限を要求します。
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
- 資格情報を
token.json
に保存します - コンソールにリフレッシュトークンを表示する
- 環境変数:
- credentials.json をプロジェクトのルートフォルダにコピーします (py-mcp-google-toolbox)
Dockerの使用
- Docker イメージをビルドします。
- コンテナを実行します。
ローカルの使用
- サーバーを実行します。
MCP設定を構成する
MCP 設定ファイルにサーバー構成を追加します。
クロードデスクトップアプリ
- Smithery経由で自動的にインストールするには:
- 手動でインストールするには
~/Library/Application Support/Claude/claude_desktop_config.json
を開きます。
これをmcpServers
オブジェクトに追加します。
カーソルIDE
~/.cursor/mcp.json
を開く
これをmcpServers
オブジェクトに追加します。
Docker用
ツールドキュメント
Gmailツール
list_emails
: Gmailの受信トレイからフィルタリングオプション付きで最近のメールを一覧表示しますsearch_emails
: 詳細なメール内容の取得を伴う高度な Gmail 検索を実行しますsend_email
: CC、BCC 受信者をサポートしてメールを作成して送信しますmodify_email
: ラベルを変更してメールの状態(既読/未読、アーカイブ、ゴミ箱)を変更します
カレンダーツール
list_events
: 指定された時間範囲内の今後のカレンダーイベントを取得します。create_event
: 出席者、場所、説明を含む新しいカレンダーイベントを作成しますupdate_event
: 柔軟なパラメータ更新で既存のカレンダーイベントを変更しますdelete_event
: イベントIDでカレンダーイベントを削除します
ドライブツール
read_gdrive_file
: Google ドライブのファイルからコンテンツを読み取り、取得しますsearch_gdrive
: カスタマイズ可能なクエリを使用して Google ドライブ内のファイルを検索します
検索ツール
search_google
: Google検索を実行し、フォーマットされた結果を返します
発達
ローカルテストの場合は、付属のクライアント スクリプトを使用できます。
ライセンス
MITライセンス
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Google ツールボックス
Related MCP Servers
- -securityAlicense-qualityIntegrates with Google Tasks to allow listing, reading, searching, creating, updating, and deleting tasks.Last updated -15TypeScriptMIT License
- -securityFlicense-qualityEnables managing Google Cloud Platform resources through natural language commands in Claude Desktop, supporting comprehensive operations across compute, storage, databases, networking, monitoring, and IAM without manual credential setup.Last updated -8Python
- -securityAlicense-qualityA tool that connects Google Ads with Claude AI, allowing users to analyze advertising data through natural language conversations and access campaign information, performance metrics, keyword analytics, and ad management.Last updated -60PythonMIT License
- -securityAlicense-qualityEnables AI assistants to interact with and manage Google Cloud Platform resources including Compute Engine, Cloud Run, Storage, BigQuery, and other GCP services through a standardized MCP interface.Last updated -1PythonMIT License