Outlook MCP server
Commit Nov 16, 2026Allows an AI client to manage Microsoft Outlook mail, calendars, contacts, tasks, and OneDrive files via Microsoft Graph.
Also known as rlrghb/olkcli, olkcli
- Stars
- 23
- Tools
- 39
- Downloads, 30 days
- —
- Latest version
- 1.16.3
- Last commit
- Nov 16, 2026
- License
- MIT
What is Outlook MCP?
Outlook allows an AI client to manage Microsoft Outlook mail, calendars, contacts, tasks, and OneDrive files via Microsoft Graph. It exposes 39 tools, such as calendar_attachments_list, calendar_availability, calendar_calendars.
Summary generated from the project's README
About Outlook MCP server
Managing Microsoft Outlook communications and files through an AI client is possible with this MCP server. It connects to Microsoft Graph to provide access to mail, calendars, contacts, tasks, and OneDrive files. Developers can use it with personal Outlook.com accounts or enterprise Microsoft 365 accounts by using the appropriate login commands.
Users set up the server locally via the olk CLI, which can be installed through Homebrew, Go, or npm. The server handles authentication by storing refresh tokens in the OS keychain while keeping access tokens in memory. It provides specific tools for searching mail, viewing calendar schedules, searching contacts, listing todo lists, and browsing OneDrive directories.
This tool distinguishes itself by supporting complex tasks like creating HTML drafts with inline images under 3 MB. It also offers safety features such as a read-only mode using specific flags and the ability to wrap untrusted content for safer agent consumption. The server can output data in JSON, TSV, or aligned tables to facilitate scripting and integration.
What you can do with it
- 1Search and filter emailsFind specific messages using sender or subject criteria from your inbox.
- 2Manage calendar schedulesView your upcoming appointments and calendar events for a set number of days.
- 3Browse cloud storageList the files and directories stored in your OneDrive account.
Written from the project's README. Every use case is checked against a quote from it.
How to install Outlook MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Outlook MCP in Claude Code
$ claude mcp add olkcli -- npx -y olkcli mcpInstall Outlook MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"olkcli": {
"command": "npx",
"args": [
"-y",
"olkcli",
"mcp"
]
}
}
}Install Outlook MCP in VS Code
.vscode/mcp.json
{
"servers": {
"olkcli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"olkcli",
"mcp"
]
}
}
}Install Outlook MCP in VS Code CLI
$ code --add-mcp '{"name":"olkcli","type":"stdio","command":"npx","args":["-y","olkcli","mcp"]}'Install Outlook MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"olkcli": {
"command": "npx",
"args": [
"-y",
"olkcli",
"mcp"
]
}
}
}Install Outlook MCP in Codex
$ codex mcp add olkcli -- npx -y olkcli mcpInstall Outlook MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.olkcli] command = "npx" args = ["-y", "olkcli", "mcp"]
Install Outlook MCP in Gemini CLI
$ gemini mcp add -s user olkcli npx -- -y olkcli mcpInstall Outlook MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"olkcli": {
"command": "npx",
"args": [
"-y",
"olkcli",
"mcp"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for olkcli 1.16.3 in an isolated container with no network and no keys. It answered and listed 39 tools.
Outlook MCP tools 39
Read from the server with tools/listcalendar_attachments_listRead-onlyList event attachments
calendar_availabilityRead-onlyCheck availability / free-busy
calendar_calendarsRead-onlyList available calendars
calendar_deltaRead-onlyIncremental sync of calendar events (delta)
calendar_eventsRead-onlyList calendar events
calendar_find_timesRead-onlyFind available meeting times
calendar_getRead-onlyGet event details
calendar_viewRead-onlyCalendar view with expanded recurring events
changesRead-onlyUnified delta digest across mail, calendar, and contacts
contacts_deltaRead-onlyIncremental sync of contacts (delta)
contacts_getRead-onlyGet contact details
contacts_listRead-onlyList contacts
| calendar_attachments_list | List event attachments | Read-only |
| calendar_availability | Check availability / free-busy | Read-only |
| calendar_calendars | List available calendars | Read-only |
| calendar_delta | Incremental sync of calendar events (delta) | Read-only |
| calendar_events | List calendar events | Read-only |
| calendar_find_times | Find available meeting times | Read-only |
| calendar_get | Get event details | Read-only |
| calendar_view | Calendar view with expanded recurring events | Read-only |
| changes | Unified delta digest across mail, calendar, and contacts | Read-only |
| contacts_delta | Incremental sync of contacts (delta) | Read-only |
| contacts_get | Get contact details | Read-only |
| contacts_list | List contacts | Read-only |
Show all 39 toolsShow fewer tools
contacts_searchRead-onlySearch contacts
drive_getRead-onlyGet item details
drive_infoRead-onlyShow drive details and quota
drive_lsRead-onlyList folder contents
drive_recentRead-onlyRecently accessed files
drive_searchRead-onlySearch files
drive_sharedRead-onlyFiles shared with me
drive_versionsRead-onlyList file version history
mail_attachmentsRead-onlyList/download attachments
mail_batchRead-onlyFetch up to 20 messages by ID in one request ($batch)
mail_categories_listRead-onlyList available categories
mail_deltaRead-onlyIncremental sync of a mail folder (delta)
mail_folders_listRead-onlyList all visible mail folders recursively
mail_getRead-onlyGet a message
mail_listRead-onlyList messages in inbox
mail_ooo_getRead-onlyGet auto-reply settings
mail_rules_listRead-onlyList inbox rules
mail_searchRead-onlySearch messages
mail_threadRead-onlyList all messages in a conversation thread
people_searchRead-onlySearch people directory
todo_checklist_listRead-onlyList checklist items
todo_getRead-onlyGet task details
todo_links_listRead-onlyList linked resources
todo_listRead-onlyList tasks in a list
todo_lists_listRead-onlyList task lists
versionRead-onlyShow version information
whoamiRead-onlyShow current user profile
| contacts_search | Search contacts | Read-only |
| drive_get | Get item details | Read-only |
| drive_info | Show drive details and quota | Read-only |
| drive_ls | List folder contents | Read-only |
| drive_recent | Recently accessed files | Read-only |
| drive_search | Search files | Read-only |
| drive_shared | Files shared with me | Read-only |
| drive_versions | List file version history | Read-only |
| mail_attachments | List/download attachments | Read-only |
| mail_batch | Fetch up to 20 messages by ID in one request ($batch) | Read-only |
| mail_categories_list | List available categories | Read-only |
| mail_delta | Incremental sync of a mail folder (delta) | Read-only |
| mail_folders_list | List all visible mail folders recursively | Read-only |
| mail_get | Get a message | Read-only |
| mail_list | List messages in inbox | Read-only |
| mail_ooo_get | Get auto-reply settings | Read-only |
| mail_rules_list | List inbox rules | Read-only |
| mail_search | Search messages | Read-only |
| mail_thread | List all messages in a conversation thread | Read-only |
| people_search | Search people directory | Read-only |
| todo_checklist_list | List checklist items | Read-only |
| todo_get | Get task details | Read-only |
| todo_links_list | List linked resources | Read-only |
| todo_list | List tasks in a list | Read-only |
| todo_lists_list | List task lists | Read-only |
| version | Show version information | Read-only |
| whoami | Show current user profile | Read-only |
Automated checks
Ran Nov 13, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packageolkcli looks like @aloth/olcliFinding
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHubolk — Microsoft Outlook in Your Terminal
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.
Install
brew install rlrghb/tap/olk
# or
go install github.com/rlrghb/olkcli/cmd/olk@latest
The npm package is olkcli; the installed command is olk:
npm install -g olkcli
See macOS notes if macOS asks for Keychain access after an upgrade.
Quick start
olk auth login
olk auth status
olk mail list --json --results-only --select id,subject,from
olk mail search 'from:person@example.com subject:urgent'
olk calendar view --days 7
olk contacts search "Alex"
olk todo lists list
olk drive ls
For work/school accounts and enterprise-only features:
olk auth login --enterprise
Common commands
| 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 a reply-all with an extra Cc | olk mail reply <ID> --reply-all --draft --body "$(cat reply.txt)" --cc person@example.com |
| 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.
Inline images in HTML drafts
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:
olk mail reply <ID> --draft --html \
--body '<p>See both images:</p><img src="cid:logo"><img src="cid:steps">' \
--inline logo=logo.png --inline steps=steps.png
olk mail drafts create --to person@example.com --subject "Instructions" --html \
--body '<p>Follow these steps:</p><img src="cid:steps">' \
--inline steps=steps.png
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.
Output and scripting
Results are written to stdout; diagnostics and prompts go to stderr.
olk mail list --json --results-only | jq '.[].subject'
olk contacts list --plain
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.
Safety defaults
- Use
--no-write --no-send --no-inputfor unattended read-only runs. - MCP exposes curated tools and requires explicit opt-in for mutations.
- External mail, calendar, contact, and file text can be wrapped with
--wrap-untrustedfor agent-safe consumption. - Refresh tokens are stored in the OS keychain; access tokens are kept in memory only.
Read the security and privacy guide before connecting an agent or sharing logs.
Documentation
- Command reference
- Authentication and accounts
- Scripting and synchronization
- MCP and AI agents
- Security and privacy
- Enterprise app setup
- Development and releases
- Agent instructions
Contributing
make build
make test
make lint
See development and releases for repository structure, validation, CI, and publishing details.
License
See LICENSE.
Outlook MCP questions
How do I add Outlook MCP to Claude Code?
Run claude mcp add olkcli -- npx -y olkcli mcp in your terminal. Add --scope user to make it available in every project.
How do I add Outlook MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Outlook MCP provide?
It exposes 39 tools, including calendar_attachments_list, calendar_availability, calendar_calendars, calendar_delta, calendar_events.
What accounts are supported?
It works with both personal Outlook.com accounts and enterprise Microsoft 365 accounts.
How are authentication tokens handled?
Refresh tokens are stored in your operating system's keychain, while access tokens are kept only in memory.
Is there a way to run the tool without making changes?
Yes, you can use specific flags to ensure unattended runs are read-only.