Microsoft Exchange Online MCP

io.github.Servosity由 GitHub 帳號 Servosity 發布v0.1.1更新於 Nov 7, 2026

Exchange Online admin for MSPs: forwarding audits, EWS posture and offboarding, no PowerShell

發布方自己的服務:Exchange.news — Crypto offers, campaigns and news

概覽

AI 產生的概覽

非官方 MCP 伺服器,讓助理透過 REST 跨客戶租用戶稽核與管理 Microsoft Exchange Online 信箱,不需 PowerShell。

可以做什麼
  • 稽核郵件流向:轉寄稽核、全租用戶收件匣規則掃描,以及郵件追蹤以查明郵件為何未送達
  • 檢查通訊協定與入侵態勢:各信箱實際生效的 EWS、IMAP、POP 與 SMTP AUTH 狀態,以及單一信箱的商務電子郵件入侵排查
  • 檢視存取權限與離職處理:某使用者可開啟或代為寄送哪些信箱,以及離職人員的逐步 Exchange 處理計畫
  • 管理隔離區與一般信箱設定:隔離佇列與放行、信箱與資料夾權限、自動回覆、用戶端存取、通訊群組與傳輸規則
  • 依租用戶逐一呼叫原始 Get-* 與變更類 cmdlet,未確認前僅回傳預覽
適用情境
適合需要在多個客戶租用戶間回答重複性 Exchange Online 問題的 MSP 或 IT 管理員,例如是否有郵件被自動轉寄出去、哪些信箱在 EWS 停用前仍依賴它、離職人員的 Exchange 處理步驟為何。也適合能執行本機程式並持有租用戶權杖的助理。
執行需求
以 stdio 本機程序執行,可透過 .mcpb 擴充套件、shell 安裝腳本或外掛安裝;多代理 skills 安裝器需要 Node.js。需要為目標租用戶簽發、指向 outlook.office365.com 的 bearer 權杖,透過 EXCHANGE_ONLINE_TOKEN 設定或由 CLI 儲存,並具備 Exchange 角色(例如 Exchange Administrator),應用程式權杖另需 Exchange.ManageAsApp。HTTP 模式需要 EXCHANGE_ONLINE_MCP_HTTP_TOKEN,非本機位址還需 TLS 憑證。
安裝前請注意
此權杖對客戶信箱擁有實際管理權限,應依最小權限授權,因為工具只能做憑證允許的事。存在寫入與破壞性操作(權限變更、隔離區放行或刪除、行動裝置抹除、收件匣規則刪除、離職處理);這些操作在確認前只回傳預覽,設定 EXCHANGE_ONLINE_MCP_READ_ONLY=1 可移除寫入工具。除非設定 EXCHANGE_ONLINE_NO_LOCAL_DATA=1,收件匣規則掃描與隔離快照會儲存在本機。設定 EXCHANGE_ONLINE_BASE_URL 會把權杖送往該主機。軟體為 Beta 階段,非官方,與 Microsoft 無關聯。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Microsoft Exchange Online MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Microsoft Exchange Online + AI - for ChatGPT, Claude, GitHub Copilot, Microsoft 365 Copilot, Gemini, and any agent that speaks MCP

Unofficial. Community-built Claude Code Skill and MCP server for the Microsoft Exchange Online API. Not affiliated with, endorsed by, or sponsored by Microsoft Corporation.

[Exchange Online demo - animated preview]

▶ Watch the 30-second demo - demo data is simulated; every command shown exists in the real CLI.

Exchange Online admin for MSPs over REST: forwarding audits, EWS posture, offboarding and quarantine across client tenants, no PowerShell session. Works with the AI you already use - ChatGPT (Plus/Pro+), Claude Desktop, Codex, Claude Code, Claude Cowork, and GitHub Copilot - plus Microsoft 365 Copilot / Copilot Studio and Google Gemini via the remote path. Free, open source, runs on your laptop. Built for MSP owners. No code required.

Works with your agent

The six agents MSP owners actually use (self-serve, works today):

Your AI agentHow to install the Microsoft Exchange Online skill
Claude DesktopRun installer, then Settings > Extensions to register exchange-online-mcp (no JSON editing).
ChatGPT (paid plans)Run installer, host exchange-online-mcp over HTTPS with EXCHANGE_ONLINE_MCP_HTTP_TOKEN set, then register it as a Developer Mode connector if your connector settings can send the bearer token.
Codex CLIPaste the install prompt below.
Claude CodePaste the install prompt below.
Claude CoworkPaste the install prompt below.
GitHub Copilot (VS Code)Run installer, add exchange-online-mcp to mcp.json under the servers key, then pick Agent mode.

For ChatGPT, run exchange-online-mcp --transport http with EXCHANGE_ONLINE_MCP_HTTP_TOKEN set, on an HTTPS host; every request sends that token. See mcp-install.md.

Also for the Microsoft and Google stacks

Big install base, but an honest heads-up: these are the remote / enterprise path, not the local binary you just installed.

AgentWhat it takes
Microsoft 365 Copilot / Copilot StudioNot self-serve. Host exchange-online-mcp over HTTPS with EXCHANGE_ONLINE_MCP_HTTP_TOKEN set, then wire it into Copilot Studio (Tools > Add a tool > Model Context Protocol > Server URL) or a declarative agent, if it can send the bearer token. Needs a Copilot Studio license + tenant admin. See mcp-install.md.
Google GeminiGemini CLI is local - same as Claude Code. The Gemini app is remote - same HTTPS path as ChatGPT. See mcp-install.md.

Skill-native agents (also covered): Hermes and OpenClaw read this skill's SKILL.md directly and speak MCP - see their install sections below. Also works with Cursor, Windsurf, Cline, Continue.dev, and Zed via MCP. Full per-tool wire-up: docs/which-agent.md.

Run more than one agent? Install across all 51+ supported agents in one command: npx skills add Servosity/msp-skills@latest (requires Node.js, then run the per-skill installer for the CLI/MCP binaries). See docs/which-agent.md.

Install in 60 seconds

Fastest for Claude Desktop - one-click .mcpb

Download Microsoft Exchange Online MCP (.mcpb) - then open Claude Desktop > Settings > Extensions and select the file. One click, no JSON, no shell. (Browse every Microsoft Exchange Online release on the releases page.)

Prefer the Claude Code plugin? Add the marketplace once, then install - works immediately, no directory listing required:

/plugin marketplace add Servosity/msp-skills/plugin install exchange-online@msp-skills

Path A - paste one prompt into your AI agent (recommended)

Copy this into Claude Code, Codex CLI, or Claude Cowork:

Install the Microsoft Exchange Online Skill and MCP server from Servosity/msp-skills in this agent workspace. If this workspace uses a POSIX shell (macOS, Linux, WSL, or Bash), run bash <(curl -fsSL https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/exchange-online/install.sh). If it uses Windows PowerShell, run iwr -useb https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/exchange-online/install.ps1 | iex. Then authenticate per the README and run exchange-online-cli --help to explore.

The same prompt works in any agent that can run shell.

Path B - run the installer yourself

Windows (PowerShell):

powershell
iwr -useb https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/exchange-online/install.ps1 | iex

macOS / Linux:

bash
bash <(curl -fsSL https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/exchange-online/install.sh)

The installer drops both exchange-online-cli (the CLI) and exchange-online-mcp (the MCP server) into your user bin path. Claude Code, Codex, and Cowork discover the Skill via SKILL.md in this directory.

Verify:

bash
exchange-online-cli --version

Upgrade to the latest version

The installer always fetches the current release - re-run it to upgrade:

macOS / Linux:

bash
bash <(curl -fsSL https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/exchange-online/install.sh)

Windows (PowerShell):

powershell
iwr -useb https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/exchange-online/install.ps1 | iex

Claude Desktop .mcpb users: download the latest .mcpb (top of this section) and re-select it in Settings > Extensions. Claude Code plugin users: /plugin update exchange-online@msp-skills.

Add to Claude Desktop, GitHub Copilot, Gemini CLI, Microsoft 365 Copilot, or another MCP client

After the installer runs, see mcp-install.md and docs/which-agent.md for the per-agent wire-up - one section per agent, including the GitHub Copilot servers key and the remote Microsoft 365 Copilot / Copilot Studio path. Claude Desktop's Settings > Extensions panel is the simplest path; the MCP config block (for users who prefer editing JSON) is documented in mcp-install.md.

Install for Hermes

From the Hermes CLI:

bash
hermes skills install servosity/msp-skills/skills/exchange-online --force

Inside a Hermes chat session:

/skills install servosity/msp-skills/skills/exchange-online --force

Hermes speaks MCP natively, so it can also use the exchange-online-mcp server directly - same install path, same env vars.

Install for OpenClaw

Tell your OpenClaw agent (copy this):

Install the exchange-online skill from https://github.com/servosity/msp-skills/tree/main/skills/exchange-online. The skill defines how its required CLI (exchange-online-cli) can be installed via the openclaw: frontmatter block.

OpenClaw isn't generally available yet; the frontmatter wiring is pre-shipped and will activate the moment OpenClaw launches.

Authenticate

Set a bearer token for https://outlook.office365.com issued for the customer tenant you are working in (GDAP partners mint one per tenant; tokens last about an hour). App-only tokens need Exchange.ManageAsApp (cmdlet commands) or Exchange.ManageAsAppV2 (the Admin API v2.0 commands) plus an Exchange role such as Exchange Administrator:

bash
EXCHANGE_ONLINE_TOKEN=<value> exchange-online-cli doctor

On Windows (PowerShell):

powershell
$env:EXCHANGE_ONLINE_TOKEN = "<value>"; exchange-online-cli doctor

doctor checks config, paths and API reachability, and tries the credential with one read cmdlet (Get-AcceptedDomain) when it can. Run the read commands you need to confirm the token's Exchange role covers them.

What this skill does

Question your MSP keeps askingCommand
Is any mail auto-forwarding out of this tenant, and does policy block it?exchange-online-cli forwarding-audit 0550b473-9fd2-4dbb-a058-a1640b4bf458 --sweep --agent
Which inbox rules forward, redirect, delete or hide mail, tenant-wide?exchange-online-cli inbox-rules sweep 0550b473-9fd2-4dbb-a058-a1640b4bf458 --agent
Which mailboxes still have EWS, IMAP, POP or SMTP AUTH effectively on?exchange-online-cli ews-posture 0550b473-9fd2-4dbb-a058-a1640b4bf458 --all --agent
What compromise evidence does this mailbox show?exchange-online-cli bec triage 0550b473-9fd2-4dbb-a058-a1640b4bf458 [email protected] --agent
Which offboarding steps are done or pending for this leaver?exchange-online-cli offboard 0550b473-9fd2-4dbb-a058-a1640b4bf458 [email protected] --manager [email protected] --plan --agent
Which mailboxes can this user open or send as?exchange-online-cli access-map 0550b473-9fd2-4dbb-a058-a1640b4bf458 [email protected] --agent
Why did this email not arrive?exchange-online-cli where-is 0550b473-9fd2-4dbb-a058-a1640b4bf458 --recipient [email protected] --since 48h --agent
Which quarantine release requests are oldest across my tenants?exchange-online-cli quarantine queue --older-than 24h --agent

Full command reference: guide.md. For the AI-agent operating contract (--agent, --dry-run, when to confirm before mutating), see AGENTS.md.

What makes this different

Exchange Online administration usually means a PowerShell session per customer tenant. This connector calls the same REST admin endpoints the ExchangeOnlineManagement v3 module uses, one tenant per call, so an AI agent gets JSON answers with no PowerShell runtime or session to keep alive.

On top of the raw cmdlets it adds compound commands that each answer a whole question: forwarding-audit (mailbox forwarding, inbox rules, the outbound spam policy and remote domains in one verdict), bec triage (rules, forwarding, restricted-sender status, new mobile devices and outbound volume for one mailbox), ews-posture (each mailbox's effective protocol state once org defaults apply) and offboard (the Exchange side of a leaver with a per-step receipt). inbox-rules sweep and quarantine snapshot save results locally, so forwarding-audit and the cross-tenant quarantine queue can read them without another pass. API responses themselves are not kept in a response cache on disk.

The pain this closes

Microsoft began a phased shutdown of Exchange Web Services (EWS) in Exchange Online on October 1, 2026, with full retirement on April 1, 2027 (Microsoft 365 Message Center MC1227454). Every MSP has to find which client mailboxes still depend on EWS and the other legacy protocols, and the effective answer per mailbox depends on the org default and the mailbox override together. Meanwhile business email compromise keeps leaving inbox rules and forwarding behind, and those live per mailbox (Practical365, "Good Use of Microsoft 365 Auditing Can Halt Business Email Compromise Attempts").

  • ews-posture: the mailboxes that break, or stay exposed, when EWS and legacy auth go away.
  • forwarding-audit and inbox-rules sweep: whether mail is leaving a tenant, and which rule sends it.
  • bec triage: one mailbox's compromise evidence in one call.
  • offboard --plan: a leaver's Exchange steps, done or pending, before anything changes.

See pain-point.md for the longer narrative.

Frequently asked questions

Does this work with ChatGPT?

Yes, on Plus, Pro, Team, Business, Enterprise, and Education plans (Free tier does not yet expose Developer Mode). ChatGPT connects to remote MCP servers over HTTPS, not local stdio binaries. The Microsoft Exchange Online MCP server runs locally over stdio by default. Its HTTP mode (exchange-online-mcp --transport http) serves http://127.0.0.1:7777/mcp, refuses to start until EXCHANGE_ONLINE_MCP_HTTP_TOKEN is set, requires Authorization: Bearer <token> on every request, and needs --tls-cert/--tls-key for any other address. See mcp-install.md. Step-by-step in mcp-install.md.

Does this work with Codex, Cursor, Windsurf, Cline, Copilot, or Gemini?

Yes - all of them speak MCP. Cross-tool install commands are in the matrix above and the deep-dive in docs/which-agent.md.

Do I need to know how to code?

No. The recommended install is to paste one sentence into Claude Code or Codex - your agent reads SKILL.md and does the install. The fallback is a one-line installer per OS (bash or PowerShell). Neither path requires writing code. You'll enter your Microsoft Exchange Online credentials once.

Is my Microsoft Exchange Online data safe?

Your data stays on your machine. The CLI and MCP server are local binaries. The local store (inbox-rule sweeps and quarantine snapshots, with secret fields stripped; cmdlet reads are not saved) sits in a directory under your user account. The AI agent only sees what the CLI returns - typically a query result, not raw bulk data. Credentials come from your environment or the CLI's own credentials file (saved by auth set-token); they are never bundled into this repo or transmitted anywhere by MSP Skills.

Do I still need Exchange Online PowerShell?

Not for the cmdlets this connector covers: it calls the same REST admin endpoints the ExchangeOnlineManagement v3 module uses. Bulk policy creation, Purview compliance and Exchange Server on-premises stay with PowerShell or other tools.

What token does it need?

A bearer token for the resource https://outlook.office365.com, issued for the customer tenant you are working in, with an Exchange role that allows the cmdlets you run. Set EXCHANGE_ONLINE_TOKEN, or save it with exchange-online-cli auth set-token (it reads the token from stdin). Every command names the tenant ID.

Can an AI agent change mailboxes on its own?

Not over MCP without your approval: every state-changing cmdlet and offboard return a preview until the call carries confirm: true, and EXCHANGE_ONLINE_MCP_READ_ONLY=1 removes every write tool. On the command line, preview a write with --dry-run (offboard with --plan) before you run it.

What does it cost?

Free. Apache-2.0 licensed. You pay only for whichever AI agent you use (Claude, ChatGPT, Codex, etc.), and that's billed by your AI provider, not by us.

Safety model

TierExamplesRecommended agent policy
Readmailboxes list, inbox-rules sweep (removed over MCP in read-only mode), forwarding-audit, ews-posture, bec triage, access-map, message-trace list, where-is, quarantine listAllow
Write (routine)mailboxes set, mailbox-permissions add, send-as add, send-on-behalf set, folder-permissions set, auto-reply set, client-access set, distribution-groups add-member, transport-rules enable, quarantine release, blocked-senders removePreview with --dry-run, then a reviewed write (over MCP, confirm: true)
Destructive / configmobile-devices wipe, mobile-devices remove, quarantine delete, inbox-rules remove, mailbox-permissions remove, send-as remove, distribution-groups remove-member, folder-permissions remove, offboard, transport-rules disableHuman-in-the-loop only

The strongest control is the scope you grant the Microsoft Exchange Online credentials - the CLI can only do what the credentials are permitted to do. Full details, including how to lock it down, are in governance.md.

Status

Beta. Validated against the Microsoft Exchange Online API surface and being validated with MSPs running it live against their own production tenant in our weekly Build Sessions. RSVP at compoundingteams.com/build-sessions.


Standards. Conforms to the open Agent Skills spec (Anthropic, Dec 2025; 40+ agents). MCP-compatible - works with any MCP-capable agent including Hermes. OpenClaw-ready (frontmatter pre-wired, awaiting OpenClaw launch).

Maintained by Servosity. Apache-2.0 licensed. Built with CLI Printing Press. Last updated: 2026-10-29.

來源:skills/exchange-online/README.md,提交 62ab9f0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Nov 7, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Exchange 整合