MCP Gmail
Gmail統合用のモデルコンテキストプロトコルサーバー。これにより、Claude Desktop(または任意のMCPクライアント)はGoogle Apps Scriptを介してGmailアカウントとやり取りできるようになります。
クイックスタート(ユーザー向け)
前提条件
- Node.js 18+ (
brew install node
でインストール) - Gmailアカウント
- Google Apps Scriptのデプロイメント
- Claude Desktop ( https://claude.ai/desktopからインストール)
構成
- Google Apps Scriptをデプロイする
- Google Apps Scriptにアクセスして新しいプロジェクトを作成します
code.gs
の内容全体をコピーし、スクリプトエディタに貼り付けます。- 「デプロイ」>「新しいデプロイ」をクリックします
- 展開タイプとして「Webアプリ」を選択します
- 次の設定を構成します。
- 実行者: 私
- アクセスできるユーザー: 誰でも
- 「デプロイ」をクリック
- プロンプトが表示されたら、アプリを確認して Gmail アカウントへのアクセスを許可します。
- デプロイURLをコピーし、セキュリティのためにランダムなAPIキーを生成します
注: このスクリプトにはGmailへのアクセス権限が必要です。スクリプトを初めてデプロイして実行する際、Googleからこれらの権限の確認と付与を求められます。以下の点にご注意ください。
- 「権限を確認」をクリックします
- Googleアカウントを選択してください
- 警告が表示された場合は「詳細設定」をクリックしてください
- 「[プロジェクト名] に移動 (安全ではありません)」をクリックします。
- 「許可」をクリックして、必要なGmail権限を付与します
- Claude Desktop 構成ファイルを開きます:
~/Library/Application Support/Claude/claude_desktop_config.json
これは、Claude デスクトップ メニューから見つけることができます。
- クロードデスクトップを開く
- MacのメニューバーでClaudeをクリック
- 「設定」をクリック
- 「開発者」をクリック
- 設定に以下を追加します。
注: YOUR_DEPLOYMENT_URL
とYOUR_API_KEY
実際の値に置き換えてください。
開発者向け
前提条件
- Node.js 18+ (
brew install node
でインストール) - Gmailアカウント
- Google Apps スクリプト
- Claude Desktop ( https://claude.ai/desktopからインストール)
- tsx (
npm install -g tsx
でインストール)
インストール
開発構成
- Claude Desktop がインストールされ、実行されていることを確認してください。
- まだインストールしていない場合は、tsx をグローバルにインストールします。
- Claude Desktop の設定を変更してください:
~/Library/Application Support/Claude/claude_desktop_config.json
MCP クライアントの構成に以下を追加します。
利用可能なツール
gmail_search_messages
: Gmailの検索クエリ構文を使用してメールを検索します(例: "subject:Meeting newer_than:1d")gmail_get_message
: 特定のメールの全内容と詳細を取得しますgmail_download_attachment
: 特定のメールから添付ファイルをダウンロードする
セキュリティに関する注意事項
VALID_API_KEY
は常に秘密にし、バージョン管理にコミットしないでください。このキーは、Google Apps Script の導入を通じて、承認されたクライアントのみが Gmail にアクセスできるようにするために役立ちます。
You must be authenticated.
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.
Gmail統合用のモデルコンテキストプロトコルサーバー。これにより、Claude Desktop(または任意のMCPクライアント)はGoogle Apps Scriptを介してGmailアカウントとやり取りできるようになります。
Related MCP Servers
- -securityAlicense-qualityServer for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.Last updated -57,424283JavaScriptMIT License
- -securityFlicense-qualityA specialized Model Context Protocol (MCP) server that integrates Google services (Gmail, Calendar, etc.) into your AI workflows. This server enables seamless access to Google services through MCP, allowing AI agents to interact with Gmail, Google Calendar, and other Google services.Last updated -103TypeScript
- -securityAlicense-qualityIntegrates with Gmail to enable sending, reading, drafting, and managing emails via the Model Context Protocol (MCP), allowing users to interact with email tasks through automated client prompts.Last updated -PythonGPL 3.0
- -securityFlicense-qualityAn integration server that provides Claude Desktop access to Gmail, enabling users to view recent emails and search their Gmail inbox using natural language commands.Last updated -6Python