Microsoft Outlook & OneDrive: curated read-first mail, calendar, contacts & file tools for agents
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
olk is a scriptable CLI and MCP server for Outlook mail, calendars, contacts,
tasks, and OneDrive through Microsoft Graph. It works with personal Outlook.com
accounts and enterprise Microsoft 365 accounts.
The npm package is olkcli; the installed command is olk:
See macOS notes if macOS asks for Keychain access after an upgrade.
For work/school accounts and enterprise-only features:
| Need | Command |
|---|---|
| Check the signed-in account | olk auth status or olk whoami |
| Find message IDs and subjects | olk mail list --json --results-only --select id,subject,from |
| Search mail | olk mail search "from:person@example.com subject:urgent" |
| View the next week | olk calendar view --days 7 |
| Search contacts | olk contacts search "Alex" |
| List task lists | olk todo lists list |
| Browse OneDrive | olk drive ls |
| Send mail | olk mail send --to person@example.com --subject "Hi" --body "Hello" |
| Draft HTML with an inline image | olk mail drafts create --to person@example.com --subject "Steps" --html --body '<img src="cid:steps">' --inline steps=steps.png |
| Synchronize changes | olk changes --json |
| Use JSON for scripts | olk mail list --json --results-only |
| Use as an MCP server | olk mcp |
See the command reference for all commands and flags.
Use a cid: URL in the HTML and supply the matching image with repeatable
--inline CID=PATH flags. This works for new drafts and true threaded reply or
reply-all drafts:
Each CID must be unique and referenced by the HTML. Files must be images and
each must be under 3 MB, the Microsoft Graph simple-attachment limit. Draft
commands do not send mail; immediate sends and forwards do not accept
--inline.
Results are written to stdout; diagnostics and prompts go to stderr.
Output modes are JSON (--json), TSV (--plain), and aligned tables by
default. Use --concise to omit large bodies/previews and --select to limit
fields where supported. See scripting and sync.
--no-write --no-send --no-input for unattended read-only runs.--wrap-untrusted for agent-safe consumption.Read the security and privacy guide before connecting an agent or sharing logs.
See development and releases for repository structure, validation, CI, and publishing details.
See LICENSE.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/outlook-2)<a href="https://allmcps.com/mcp/outlook-2"><img src="https://allmcps.com/api/badge/outlook-2?style=directory" alt="Outlook on AllMCPs" /></a>