Graph Mail MCP
Graph Mail MCP
Microsoft 365 メール向けのローカル stdio Model Context Protocol サーバーです。Microsoft Graph を通じて、Outlook/Exchange Online の検索、読み取り、スレッド、添付ファイル、下書きワークフローを制御しながら利用できます。
メッセージを送信、削除、移動、コピー、アーカイブ、既読化することはありません。生の Graph URL、生の OData、および無制限の Graph リクエストは公開されません。
要件
Microsoft Edge を使用した Windows
Node.js 22 以上
Exchange Online を利用できる Microsoft 365 の仕事用または学校用アカウント
委任アクセス許可
Mail.ReadWrite
個人用 Microsoft アカウントはデフォルトで無効です。共有メールボックスには、さらに Exchange の委任と Mail.ReadWrite.Shared が必要です。
インストール
git clone https://github.com/hanhandly/graph-mail-mcp.git
Set-Location graph-mail-mcp
npm ci
npm run build
Copy-Item config.example.json config.local.jsonconfig.local.json は Git では無視されます。認証の前に、特に tenant、allowedMailboxScopes、共有メールボックスの設定を確認してください。
認証
node dist\cli.js -c config.local.json doctor
node dist\cli.js -c config.local.json auth login --account-hint user@contoso.com
node dist\cli.js -c config.local.json auth statusログインすると、分離された Microsoft Edge プロファイルが開き、委任認証に Graph Explorer が使用されます。Playwright が Sign in をクリックし、ヒントされたアカウントを選択して、必要なメール権限がすでに同意されているかどうかを確認します。すでに同意されている場合は認証が自動的に続行され、そうでない場合は CLI がユーザーに付与すべき権限を伝えます。Playwright が Consent をクリックすることはありません。MFA と同意の確認はユーザー操作のままです。auth status はメタデータのみを返し、トークンを表示することはありません。
MCP クライアントの設定
クライアントの MCP 設定では絶対パスを使用してください:
{
"mcpServers": {
"graph-mail": {
"command": "node",
"args": [
"C:\\Tools\\graph-mail-mcp\\dist\\cli.js",
"-c",
"C:\\Tools\\graph-mail-mcp\\config.local.json",
"serve"
],
"cwd": "C:\\Tools\\graph-mail-mcp"
}
}
}一部のクライアントでは外側のキー名が異なりますが、command、args、cwd の値は同じです。serve の前に -c <config-path> を置いてください。サーバーは stdio を使用し、ネットワークポートを開きません。
MCP クライアントを再起動し、次の順に呼び出してください:
mail_auth_statusmail_list_foldersmail_search_messages
ツール
領域 | ツール |
認証とフォルダー |
|
検索と読み取り |
|
添付ファイル |
|
管理対象の下書き |
|
下書きの更新は、この MCP が作成し登録した下書きに限定されます。送信ツールはありません。
セキュリティ
Graph トランスポートは、デフォルトで拒否するポリシーのファイアウォールと、型付きリクエストコンパイラを使用します。トークンはリポジトリの外部に保存され、デフォルトでは Windows DPAPI で保護されます。ログとツールの応答は、アクセストークン、Cookie、認証ヘッダーを公開してはなりません。
Graph Explorer は、その共有アプリケーションに対して以前に同意された権限を返すことがあります。サーバーは Mail.Send を拒否し、実行時リクエストを制限しますが、厳密に最小権限のトークンを必要とするは、専用のアプリ登録または制約のある認証プロバイダーを使用してください。
Security、Tool reference、Configuration example、Architecture を参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hanhandly/graph-mail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server