Google Workspace MCP Server
Google Workspace MCP サーバー
Gmail およびカレンダー API と連携するためのツールを提供するモデルコンテキストプロトコル(MCP)サーバーです。このサーバーを使用すると、MCP インターフェースを介してメールやカレンダーの予定をプログラムで管理できます。
特徴
Gmailツール
list_emails: 受信トレイから最近のメールを一覧表示します(オプションでフィルタリング可能)search_emails: Gmail クエリ構文を使用した高度なメール検索send_email: CC と BCC をサポートして新しいメールを送信しますmodify_email: メールラベルを変更する(アーカイブ、ゴミ箱、既読/未読としてマーク)
カレンダーツール
list_events: 日付範囲でフィルタリングして今後のカレンダーイベントを一覧表示しますcreate_event: 参加者を指定した新しいカレンダーイベントを作成するupdate_event: 既存のカレンダーイベントを更新するdelete_event: カレンダーイベントを削除する
Related MCP server: Gmail AutoAuth MCP Server
前提条件
Node.js : Node.jsバージョン14以降をインストールします
Google Cloud Console のセットアップ:
新しいプロジェクトを作成するか、既存のプロジェクトを選択してください
Gmail API と Google カレンダー API を有効にします。
「APIとサービス」>「ライブラリ」に移動します
「Gmail API」を検索して有効にします
「Google カレンダー API」を検索して有効にします
OAuth 2.0 資格情報を設定します。
「APIとサービス」>「認証情報」に移動します
「認証情報を作成」>「OAuthクライアントID」をクリックします
「Webアプリケーション」を選択
「承認済みリダイレクト URI」に次の URL を含めるように設定します:
http://localhost:4100/codeクライアントIDとクライアントシークレットを書き留めます
セットアップ手順
Smithery経由でインストール
Smithery経由で Claude Desktop 用の gsuite-mcp を自動的にインストールするには:
npx -y @smithery/cli install @rishipradeep-think41/gsuite-mcp --client claude手動でインストールする
クローンとインストール:
git clone https://github.com/epaproditus/google-workspace-mcp-server.git cd google-workspace-mcp-server npm installOAuth 資格情報の作成: ルート ディレクトリに
credentials.jsonファイルを作成します。{ "web": { "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET", "redirect_uris": ["http://localhost:4100/code"], "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token" } }リフレッシュトークンを取得:
node get-refresh-token.jsこれにより、次のようになります。
Google OAuth認証のためにブラウザを開きます
次の権限を要求します。
https://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/gmail.send
資格情報を
token.jsonに保存しますコンソールにリフレッシュトークンを表示する
MCP 設定を構成する: MCP 設定ファイルにサーバー構成を追加します。
VSCode Claude 拡張機能の場合:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonClaude デスクトップ アプリの場合:
~/Library/Application Support/Claude/claude_desktop_config.json
これを
mcpServersオブジェクトに追加します。{ "mcpServers": { "google-workspace": { "command": "node", "args": ["/path/to/google-workspace-server/build/index.js"], "env": { "GOOGLE_CLIENT_ID": "your_client_id", "GOOGLE_CLIENT_SECRET": "your_client_secret", "GOOGLE_REFRESH_TOKEN": "your_refresh_token" } } } }ビルドと実行:
npm run build
使用例
Gmailの操作
最近のメールの一覧:
{ "maxResults": 5, "query": "is:unread" }メールを検索:
{ "query": "from:example@gmail.com has:attachment", "maxResults": 10 }メールを送信:
{ "to": "recipient@example.com", "subject": "Hello", "body": "Message content", "cc": "cc@example.com", "bcc": "bcc@example.com" }メールアドレスの変更:
{ "id": "message_id", "addLabels": ["UNREAD"], "removeLabels": ["INBOX"] }
カレンダー操作
イベント一覧:
{ "maxResults": 10, "timeMin": "2024-01-01T00:00:00Z", "timeMax": "2024-12-31T23:59:59Z" }イベントを作成:
{ "summary": "Team Meeting", "location": "Conference Room", "description": "Weekly sync-up", "start": "2024-01-24T10:00:00Z", "end": "2024-01-24T11:00:00Z", "attendees": ["colleague@example.com"] }更新イベント:
{ "eventId": "event_id", "summary": "Updated Meeting Title", "location": "Virtual", "start": "2024-01-24T11:00:00Z", "end": "2024-01-24T12:00:00Z" }イベントを削除:
{ "eventId": "event_id" }
トラブルシューティング
認証の問題:
必要なすべてのOAuthスコープが付与されていることを確認する
クライアントIDとシークレットが正しいことを確認する
リフレッシュトークンが有効かどうかを確認する
APIエラー:
API の割り当てと制限については、Google Cloud Console で確認してください。
プロジェクトで API が有効になっていることを確認する
リクエストパラメータが必要な形式と一致していることを確認する
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています。
Available Tools
8 toolscreate_eventC
Create a new calendar event
Inputs: end (required), start (required), summary (required), attendees, +2 more.
delete_eventB
Delete a calendar event
Inputs: eventId (required).
list_emailsB
List recent emails from Gmail inbox
Inputs: maxResults, query.
list_eventsC
List upcoming calendar events
Inputs: maxResults, timeMax, timeMin.
modify_emailA
Modify email labels (archive, trash, mark read/unread)
Inputs: id (required), addLabels, removeLabels.
search_emailsB
Search emails with advanced query
Inputs: query (required), maxResults.
send_emailC
Send a new email
Inputs: body (required), subject (required), to (required), bcc, +1 more.
update_eventB
Update an existing calendar event
Inputs: eventId (required), attendees, description, end, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Every tool has a clearly distinct purpose with no ambiguity. Calendar tools (create_event, delete_event, list_events, update_event) and email tools (list_emails, modify_email, search_emails, send_email) are cleanly separated by resource type and action, making misselection unlikely.
All tools follow a consistent verb_noun pattern with snake_case throughout. The naming is predictable and readable, with clear action verbs (create, delete, list, modify, search, send, update) paired with appropriate nouns (event, emails).
With 8 tools, this server is well-scoped for Google Workspace functionality. The count is appropriate, covering core calendar and email operations without being overwhelming or too sparse, with each tool earning its place.
The tool surface provides good coverage for calendar and email workflows, with CRUD operations for events and key email actions. Minor gaps exist, such as no direct email deletion tool (though modify_email handles archiving/trashing) and no calendar search, but agents can work around these.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Hosted MCP server for Gmail, Outlook, iCloud, Fastmail & Yahoo Mail with per-workspace controls.
- MyAgentMailDeprecatedcom.myagentmail
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with Gmail services, supporting email operations, draft management, and calendar functionality through Google API integration.2-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to manage Gmail through natural language interactions with features like sending emails, searching, and label management.MIT
- AlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that enables applications to interact with Gmail through a clean API, supporting email searching, sending, reading, and label management.MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to search, read, and send emails with attachment support through the Gmail API. It also provides tools for comprehensive label management and uses secure OAuth2 authentication for mailbox access.MIT