Skip to main content
Glama
hanhandly

Graph Mail MCP

by hanhandly

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.json

config.local.json は Git では無視されます。認証の前に、特に tenantallowedMailboxScopes、共有メールボックスの設定を確認してください。

認証

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"
    }
  }
}

一部のクライアントでは外側のキー名が異なりますが、commandargscwd の値は同じです。serve の前に -c <config-path> を置いてください。サーバーは stdio を使用し、ネットワークポートを開きません。

MCP クライアントを再起動し、次の順に呼び出してください:

  1. mail_auth_status

  2. mail_list_folders

  3. mail_search_messages

ツール

領域

ツール

認証とフォルダー

mail_auth_status, mail_list_folders

検索と読み取り

mail_search_messages, mail_get_message, mail_get_thread

添付ファイル

mail_list_attachments, mail_get_attachment

管理対象の下書き

mail_create_draft, mail_update_draft

下書きの更新は、この MCP が作成し登録した下書きに限定されます。送信ツールはありません。

セキュリティ

Graph トランスポートは、デフォルトで拒否するポリシーのファイアウォールと、型付きリクエストコンパイラを使用します。トークンはリポジトリの外部に保存され、デフォルトでは Windows DPAPI で保護されます。ログとツールの応答は、アクセストークン、Cookie、認証ヘッダーを公開してはなりません。

Graph Explorer は、その共有アプリケーションに対して以前に同意された権限を返すことがあります。サーバーは Mail.Send を拒否し、実行時リクエストを制限しますが、厳密に最小権限のトークンを必要とするは、専用のアプリ登録または制約のある認証プロバイダーを使用してください。

SecurityTool referenceConfiguration exampleArchitecture を参照してください。

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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…

View all MCP Connectors

Latest Blog Posts

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