multi-account-google-mcp
Provides tools for reading and managing Gmail across multiple accounts, including searching threads, reading messages and attachments, managing labels and drafts, handling filters, and sending, replying, forwarding, trashing, or marking messages as spam.
Enables interaction with multiple Google accounts and their Gmail, Google Drive, and Google Calendar services through OAuth, including cross-account searches, calendar availability checks, and per-account read/write permissions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
multi-account-google-mcp
複数の Google アカウント(Gmail / Drive / Calendar)を、1つの MCP サーバーから操作するためのセルフホスト型 MCP サーバー。 OAuth トークンは第三者のサービスに預けず、手元で AES-256-GCM で暗号化して保管する。
account: "all"やaccount: "group:lab"で、全アカウント・グループを横断して検索・予定表示・空き時間検索ができるアカウントごとに読み取り専用にできる(例: 大学のアカウントは読むだけ)
書き込み系(送信・返信・共有・削除など)は、アカウントの明示指定が必須
Claude Code(stdio)と Claude.ai のカスタムコネクタ(Streamable HTTP + MCP 認可)の両方に対応
開発中。実際の Google アカウントでの動作確認手順は docs/verification.md、設計は docs/design.md、 Claude.ai 向けの公開手順は docs/deploy.md、セキュリティ方針は SECURITY.md。
必要なもの
Node.js 22 以上
Google Cloud のプロジェクトと、「デスクトップアプリ」の OAuth クライアント(
mymcp oauth setupが手順を表示する)
Related MCP server: google-accounts-mcp
セットアップ(Claude Code)
npm install
npm run build
npm linkデータディレクトリと暗号鍵を作る
mymcp initGoogle Cloud で作った OAuth クライアントを登録する(手順が表示される)
mymcp oauth setupアカウントを追加する(ブラウザで Google にサインインする)
mymcp account add work --description "仕事用" --group mainClaude Code に登録する
mymcp connect claude-codeCLI
コマンド | 内容 |
| データディレクトリと暗号鍵を作る |
| Google Cloud の OAuth クライアントを登録する |
| アカウントを追加する。 |
| アカウントの一覧と状態(ACTIVE / EXPIRED / REVOKED) |
| 説明・グループ・権限を変える。 |
| 期限切れのアカウントを再認可する |
| Google 側でトークンを取り消してから削除する |
|
|
|
|
| MCP サーバーを stdio で起動する |
| Claude.ai 用に HTTP で起動する(docs/deploy.md) |
| HTTP モードのオーナーパスワード設定、接続済みクライアントの全取り消し |
ファイルの置き場所
内容 | 既定の場所 | 変更する環境変数 |
アカウント情報と暗号化トークン |
|
|
HTTP モードの認可状態(クライアント登録・トークンのハッシュ) |
|
|
暗号鍵 |
|
|
鍵ファイルは store.json とは別にバックアップすること。鍵を失うと、保存したトークンは復号できない(アカウントを追加し直せば復旧できる)。
MCP ツール
account には、エイリアス("work")、"all"、"group:NAME" を渡せる。「横断」の列が ○ のツールだけが "all" とグループに対応する。
書き込み系は単一エイリアスの明示が必須で、そのアカウントのそのサービスが write 権限でなければ拒否する。
サービス | ツール | 種別 | 横断 |
共通 |
| 読み取り | - |
Gmail |
| 読み取り | ○ |
Gmail |
| 読み取り | |
Gmail |
| 書き込み | |
Gmail |
| 書き込み | |
Gmail |
| 書き込み | |
Gmail |
| 書き込み | |
Drive |
| 読み取り | ○ |
Drive |
| 読み取り | |
Drive |
| 書き込み | |
Calendar |
| 読み取り | ○ |
Calendar |
| 読み取り | |
Calendar |
| 書き込み |
複数アカウントの結果は { results, errors, truncated } の形で返る。results の各項目には account が付き、失敗したアカウントは errors に入る(1つの失敗で全体は失敗しない)。
開発
npm test
npm run typecheckテストや手元の試験では MAGM_DATA_DIR と MAGM_KEY_FILE で一時ディレクトリを指定し、本物のデータに触れないようにする。
ライセンス
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your Gmail, Calendar, Drive, GitHub, Oura, wallet and confirmed profile facts in any MCP client.
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Hosted MCP for Google Workspace, Atlassian and Notion: one OAuth, per-user accounts, write access.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA multi-account, token-efficient MCP server for Google Workspace services including Gmail, Calendar, Drive, Docs, and Sheets. It enables secure management of multiple accounts with compact data retrieval and keychain-backed authentication for efficient workflow automation.4MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for multiple Google accounts, providing tools for Gmail, Drive, Calendar, Tasks, and Contacts with multi-account support and cross-MCP file handoff.MIT

exfu-multiaccountofficial
FlicenseNot gradedqualityCmaintenanceA local MCP server that lets AI assistants access Gmail, Drive, Docs, and Calendar across multiple Google accounts, routing each request by a human-readable account alias. It supports reading, searching, and writing with per-account tagging while keeping OAuth credentials secure and separate.-- AlicenseNot gradedqualityCmaintenanceA self-hosted MCP server that gives an AI client read, search, triage, drafting, attachment/export and label-management access to several Gmail or Google Workspace accounts at once, with each call naming an explicit account. Sending is disabled unless armed twice, mail deletion is impossible, and tokens, exports and audit data stay local.MIT