mcpField
O
outlook

outlook

Local
github.com/rlrghbCommunication21Updated 4d ago

About outlook

olk is a command line tool and MCP server for Microsoft Outlook and OneDrive, accessing mail, calendars, contacts, tasks and files through Microsoft Graph. It supports both personal Outlook.com accounts and enterprise Microsoft 365 accounts, suited to users who work with office data in a terminal or scripts.

Key features

  1. 01Mail listing, searching, sending and replying
  2. 02Calendar viewing and contact search
  3. 03Task list management
  4. 04OneDrive file browsing
  5. 05Script-friendly JSON and TSV output
  6. 06MCP mutations require explicit opt-in

Use cases

  1. 01Reading mail subjects and senders in scripts
  2. 02Drafting HTML mail with inline images from the command line
  3. 03Giving AI agents limited access to Outlook data

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"rlrghb-outlook": {
"command": "npx",
"args": [
"-y",
"olkcli"
]
}
}
}
Run commandnpx -y olkcli

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmolkcli1.16.1

Tools

40

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
outstringNoOutput directory for download
concisebooleanNoDrop large free-text fields (message/event/task bodies, previews, attendee lists) to reduce payload size.
event-idstringYesEvent ID
attachment-idstringYesAttachment ID

Details

From the project README

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:[email protected] 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:[email protected] 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 [email protected] --subject "Hi" --body "Hello"
Draft a reply-all with an extra Ccolk mail reply <ID> --reply-all --draft --body "$(cat reply.txt)" --cc [email protected]
Draft HTML with an inline imageolk mail drafts create --to [email protected] --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 [email protected] --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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.