From ai-ms365
Use this skill whenever the user asks for anything involving Microsoft 365 — Outlook mail, Outlook calendar, Teams, SharePoint, OneDrive, Excel-on-OneDrive, or Azure AD users/contacts — OR asks to log in / authenticate the MS365 MCP. Trigger phrases include "send mail", "schreib eine Mail", "Termin", "meeting", "Kalender", "Outlook", "Teams Nachricht", "OneDrive", "SharePoint", "Excel-Datei in OneDrive", "login mcp", "ms365 login", "login ms365", "anmelden ms365", "MS365 anmelden", "verify login", "auth ms365". Provides guidance on which mcp__ms365__* tools to call, what their arguments mean, and how to handle authentication and common pitfalls.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-ms365:ai-ms365The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This plugin exposes the [@softeria/ms-365-mcp-server](https://github.com/Softeria/ms-365-mcp-server)
This plugin exposes the @softeria/ms-365-mcp-server
(started in --org-mode, so Teams and SharePoint tools are available).
All tools appear in the MCP namespace ms365, i.e. as mcp__ms365__<tool>. Use the tool list
returned by the runtime as the source of truth — the names below are the stable ones from the
upstream server. If a tool name listed here does not exist at runtime, prefer a near-named tool
shown in /mcp over guessing.
The server uses Microsoft Graph with the user's Azure AD app (credentials are loaded by
run.js from ~/.claude/.env/ms365.env; the user supplies their own). On the very first
call in a fresh session, an interactive device-code login is required.
Important: the in-cowork
mcp__ms365__logintool cannot complete the login. It returns the device code immediately, but the long-running polling that waits for the user to finish in the browser gets killed when cowork's MCP sandbox tears down the server (~1 min after the tool returns). The user finishes the browser flow but no process is alive to receive the token.Workaround: the login must run in a normal terminal (the wrapped
run.js --loginflow). The plugin ships a script for that. Once it succeeds, the token lands in a file that in-cowork calls read back automatically.
verify-login fails OR the user asks to log inIf the user expresses a login intent ("login mcp", "ms365 login", "anmelden", "auth", etc.)
or mcp__ms365__verify-login returns success: false ("No valid token found" / "Silent
token acquisition failed"):
mcp__ms365__login — it returns a device code but the polling that waits
for the browser flow gets killed when cowork tears down the MCP server (~1 min after the
tool call returns), so the token never arrives./ai-ms365-login slash command — it prints a clean step-by-step
terminal-based login guide for both macOS and Windows. If you can't invoke another slash
command from the current context, print the same instructions verbatim from
commands/ai-ms365-login.md. The user-facing path is always:
bash ~/.config/ms-365-mcp/login.sh%USERPROFILE%\.config\ms-365-mcp\login.cmd
These are auto-installed by run.js on every cowork start (the plugin itself lives in
a session-randomized sandbox path that nobody can guess, so we can't point users there).mcp__ms365__verify-login
to confirm the token is now picked up from the file cache. On success: true, proceed
with whatever they originally wanted.The token persists across cowork sessions. Re-login is only needed if they explicitly call
mcp__ms365__logout, the refresh token rotates out, or the Azure secret is rotated.
list-mail-messages — list inbox/folder; common args: top (count, default 10), folder
(e.g. inbox, sentitems), search (KQL-like).read-mail — read full body of one message by messageId.send-mail — args: to (string or array), subject, body. HTML body is supported via the
bodyType: "html" field if available.delete-mail, move-mail, mark-read — write operations; always confirm with the user
before sending or deleting.list-calendar-events — args: startDate, endDate in ISO 8601 (e.g. 2026-05-01T00:00:00Z).create-calendar-event — args: subject, start, end, attendees (array of emails),
location, body. Use isOnlineMeeting: true to add a Teams link.update-calendar-event, delete-calendar-event — confirm before destructive ops.list-teams — Teams the user is a member of.list-channels — args: teamId.send-teams-message — args: teamId, channelId, message.list-team-messages — recent messages in a channel.list-drive-items — list files/folders. Default drive is OneDrive; pass a driveId for
SharePoint document libraries.download-drive-item, upload-drive-item — file content.search-drive — full-text search over OneDrive/SharePoint.get-current-user, search-users, get-user-by-email.list-worksheets, read-range, update-range, create-worksheet. Args generally take an
Excel file path or driveItemId.list-mail-messages with top: N, folder: "inbox".[date] from — subject (preview…).send-mail.create-calendar-event with isOnlineMeeting: true if Teams link wanted.list-calendar-events with that range.Mon 09:00–10:00 — subject (location).2026-05-02T14:00:00Z or with offset). Don't
pass "next Tuesday at 2pm" — convert first.nextLink,
pass it back to fetch more.Authorization_RequestDenied, the scope is missing — tell
the user; do not retry blindly.--org-mode. If a
user reports those tools missing, the plugin is misconfigured — .mcp.json must include
--org-mode (it does by default in ai-ms365).InvalidAuthenticationToken, first try
mcp__ms365__verify-login. If it can't recover, point the user at login.sh / login.cmd
(see Authentication section above) — do not call mcp__ms365__login, it can't complete
inside cowork./ai-ms365 <text>Treat <text> as a free-form Microsoft 365 request and route it to the right tool family above.
For ambiguous requests (e.g. "send something to Alex"), ask one clarifying question before
acting. For destructive operations (send, delete, move), always show a preview and require user
confirmation.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub bennoloeffler/claude-code-personal-agent-plugins-skills --plugin ai-ms365