PluginBench
MCP Server
Active
MIT

io.github.rlrghb/outlook MCP Server

io.github.rlrghb/outlook

Scriptable CLI and MCP server for Outlook mail, calendar, contacts, tasks, and OneDrive via Microsoft Graph.

What is the io.github.rlrghb/outlook MCP server?

The olk MCP server is a scriptable CLI and MCP server for Microsoft Outlook and OneDrive, supporting mail, calendars, contacts, tasks, and file management through Microsoft Graph. It works with both personal Outlook.com accounts and enterprise Microsoft 365 accounts, offering read and write capabilities with safety defaults for unattended operations.

olk provides terminal and programmatic access to Outlook and OneDrive data. Use it to search mail, view calendars, manage contacts and tasks, browse files, and automate workflows. It supports both personal and enterprise accounts, with JSON output for scripting and an MCP interface for AI agents.

How to install io.github.rlrghb/outlook

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "outlook": {
      "command": "npx",
      "args": [
        "-y",
        "olkcli",
        "mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • mail list — List emails with filtering and field selection
  • mail search — Search mail by sender, subject, and other criteria
  • mail send — Send email messages
  • mail drafts create — Create email drafts with optional HTML and inline images
  • mail reply — Create reply or reply-all drafts
  • calendar view — View calendar events for a specified number of days
  • contacts search — Search contacts by name or other fields
  • contacts list — List all contacts
  • todo lists list — List task lists
  • drive ls — Browse and list OneDrive files
  • auth login — Authenticate with personal or enterprise accounts
  • auth status — Check the signed-in account
  • whoami — Display the current signed-in account
  • changes — Synchronize and retrieve changes across mail, calendar, contacts, and tasks
  • mcp — Run as an MCP server for AI agents

Use cases

  • Search and retrieve emails by sender, subject, or content, then process results programmatically
  • View upcoming calendar events and integrate them into workflows or notifications
  • Manage contacts and task lists through the command line or MCP interface
  • Create and send emails with HTML formatting and embedded images
  • Browse and list OneDrive files for document management and automation

io.github.rlrghb/outlook MCP server FAQ

What is olk?

olk is a scriptable CLI and MCP server that gives you terminal and programmatic access to Outlook mail, calendars, contacts, tasks, and OneDrive files. It works with personal Outlook.com and enterprise Microsoft 365 accounts.

Is olk free?

Yes, olk is open-source software licensed under the LICENSE file in the repository. You need a Microsoft account (personal or enterprise) to use it.

How do I install olk?

Install via Homebrew (`brew install rlrghb/tap/olk`), Go (`go install github.com/rlrghb/olkcli/cmd/olk@latest`), or npm (`npm install -g olkcli`).

How do I use olk with Claude or Cursor?

Run `olk mcp` to start the MCP server, then configure your Claude or Cursor client to connect to it. See the MCP and AI agents documentation for setup details.

What authentication does olk require?

olk uses OAuth 2.0 via Microsoft Graph. Run `olk auth login` for personal accounts or `olk auth login --enterprise` for work/school accounts. Refresh tokens are stored securely in the OS keychain.

Can I use olk for unattended automation?

Yes. Use flags like `--no-write`, `--no-send`, and `--no-input` for read-only unattended runs. Output to JSON with `--json --results-only` for scripting.

README (reference)

Source of truth, from the repository.

olk — 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

NeedCommand
Check the signed-in accountolk auth status or olk whoami
Find message IDs and subjectsolk mail list --json --results-only --select id,subject,from
Search mailolk mail search "from:person@example.com subject:urgent"
View the next weekolk calendar view --days 7
Search contactsolk contacts search "Alex"
List task listsolk todo lists list
Browse OneDriveolk drive ls
Send mailolk mail send --to person@example.com --subject "Hi" --body "Hello"
Draft HTML with an inline imageolk mail drafts create --to person@example.com --subject "Steps" --html --body '<img src="cid:steps">' --inline steps=steps.png
Synchronize changesolk changes --json
Use JSON for scriptsolk mail list --json --results-only
Use as an MCP serverolk 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-input for 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-untrusted for 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

Contributing

make build
make test
make lint

See development and releases for repository structure, validation, CI, and publishing details.

License

See LICENSE.

Related MCP servers

Live docs MCP server. 598+ libraries, evidence-verified answers, code audit, snippets, dispatch.

5
TypeScript
View repository →

Source-linked market intelligence for AI agents researching public-company tickers.

0
Python
MIT
View repository →

Public-site SEO/AEO readiness scans with evidence scores, issues, and clear measurement scope.

View repository →

Market data, on-node ML price forecasts, Brazil macro archive, LLM inference. USDC via x402.

0
Python
MIT
View repository →
LOLosbeto logo

Losbeto

Active

x402-paid market intelligence: forex, stocks, Brazil macro (BCB/B3) + crypto.

0
JavaScript
View repository →

Drive the iOS Simulator via semantic accessibility-tree snapshots. Sub-200ms, no WebDriverAgent.

0
TypeScript
MIT
View repository →