Skip to main content
Glama

outlook

Manage Outlook mail, calendar events, contacts, and Microsoft To Do from the terminal.

npm version Platforms Built with Rust & Ratatui License: MIT

BiteFoundry · Latest release notes

outlook TUI Demo


Highlights

Pillar

What You Get

Minimal-Chrome TUI

3-tier responsive ratatui workspace across Mail (1), Calendar (2), and Microsoft To Do (3) with HTML-rendered email preview, inline href toggle (h), Link Extractor (u), quoted-reply folding (z), structured Compose modal (c), zoxide File Picker (Ctrl+F), and Ctrl+K Omni-Switcher.

High-Res Terminal Images

Native inline rendering for attached and cid:/https:// email images across Kitty, iTerm2 (OSC 1337), Sixel (DCS q), and 24-bit Half-Blocks (▀) fallback with live zoom (+/-/0) and protocol cycling (p).

Local SQLite FTS5 + IPC Daemon

Bundled SQLite WAL + FTS5 cache (cache.db) with incremental delta sync, $batch neighbor hydration, optimistic triage (archive, flag, mark-read, complete), offline search, and cached CLI reads via outlook daemon.

4-in-1 Agent Interface

One static binary (Windows, macOS, Linux GLIBC 2.28 / AlmaLinux 8+) delivers TUI, scriptable CLI (--json), Axum HTTP REST API (outlook serve, :3939), and stdio MCP server (outlook mcp, 23 tools).


Related MCP server: outlook-mcp

Quick Start

# 1. Install the native CLI via npm
npm i -g @bitefoundry/outlook

# 2. Authenticate with Microsoft Entra ID (or automatically reuse your @bitefoundry/teams M365 session!)
outlook login

# 3. Launch the interactive TUI
outlook
outlook read MESSAGE_ID --json

Read a message and its attachment metadata. To save a file, use outlook download MESSAGE_ID --attachment ATTACHMENT_ID --dir .. For full detail, add --full in the CLI or pass compact: false to get_message in MCP.

For a company registration, use outlook login --client-id YOUR_CLIENT_ID --tenant-id YOUR_TENANT_ID. Without an override, Outlook uses the Microsoft Graph Command Line Tools client for its own interactive login. Register a desktop app · Outlook delegated permissions

Shared M365 Session & Token Brokers: When share_m365_auth = true (default), outlook seamlessly reuses or upgrades an existing @bitefoundry/teams session without a second browser login. Also supports --device-code, OUTLOOK_ACCESS_TOKEN, OUTLOOK_TOKEN_FILE, OUTLOOK_TOKEN_REFRESH_CMD (az account get-access-token), and custom Entra ID apps. Run outlook whoami or outlook doctor --online for JWT scope diagnostics.

Corporate TLS proxies: outlook trusts the bundled Mozilla roots and the OS trust store. If your network re-signs HTTPS with a private root CA, export it as PEM and set OUTLOOK_EXTRA_CA_PEM (SSL_CERT_FILE and NODE_EXTRA_CA_CERTS also work). outlook doctor shows which CA files were loaded. Details

Update a global npm install with npm install -g @bitefoundry/outlook@latest. For a standalone binary from GitHub Releases, use outlook update.


Keybindings Cheat Sheet

Key

Context

Action

1 / 2 / 3 (Alt+1..3)

Global

Switch Mail / Calendar / To Do Tasks tabs

Ctrl+K

Global

Omni-Switcher / Command Palette (> commands, # folders, @ contacts, / search)

j / k / ↑ / ↓

Global

Navigate folders, message list, calendar agenda, tasks, or reading pane

Tab / Enter / Esc

Global

Cycle pane focus (Folders ↔ List ↔ Reader) or close modal

c / r / R / f

Mail

Compose / Reply / Reply-All / Forward (Markdown + Ctrl+F attach + Ctrl+V image)

C / Ctrl+S

Mail / Compose

Start a separate composition / save the current draft to Outlook

e / g / m / Del

Mail

Archive / Flag / Move to folder / Delete (optimistic updates)

h / u / z

Mail Reader

Toggle inline href URLs / open Link Extractor / fold quoted reply history

t / F / U

Mail

Toggle Thread grouping / Focused Inbox / Unread filter

v / Alt+v / d

Mail Reader

High-res Inline Image Preview / download latest attachment (A for picker)

n / a / y / x

Calendar

New Event / RSVP Accept (a), Tentative (y), Decline (x)

Space / n

Tasks

Toggle To Do completion (Space) / create new task or list (n)

/ / Ctrl+D / Ctrl+B

Global

Search mail (FTS5 + Graph KQL) / toggle Cozy / Compact density / toggle sidebar

Ctrl+, / ? / Ctrl+Q

Global

Settings / full help overlay / safe quit


CLI, HTTP API & MCP

CLI Examples

# Mail: inspect inbox, read, reply, and send Markdown with attachments
outlook mail --folder inbox --unread --limit 20 --json
outlook read AAMkAGI2... --json
outlook read AAMkAGI2... --json --full
outlook read AAMkAGI2... --mark-read
outlook send --to elena.park@acme.dev --subject "v2.4 Release" \
  --body "**All canary checks passed.** See attached benchmarks." \
  --attach ./v24-benchmarks.pdf --importance high

# Calendar & To Do: view agenda, schedule Teams meeting, RSVP, and manage tasks
outlook calendar --days 7
outlook create-event --subject "Go / No-Go Review" \
  --start "2026-11-20T14:00:00Z" --end "2026-11-20T14:45:00Z" \
  --attendee elena.park@acme.dev --online
outlook add-task "Promote canary to 100%" --due 2026-11-20 --importance high
outlook daemon start

JSON output for mail, read, move, archive, search --remote, calendar, and event is compact by default. Pass --full with --json for full cached fields, HTML bodies, and attachment metadata (content_bytes_b64 is never embedded in CLI/MCP JSON; fetch attachment bytes with outlook download, or outlook download --offline for cached bytes). --compact remains a compatibility alias and conflicts with --full. Paginated JSON listings (mail, search --remote, folders, task-lists) include returned, has_more, and next_cursor; continue with --cursor <CURSOR>. Cursors are bound to the originating command, folder, query, and filter, while --limit and --full may change between pages. In mail --json, folder is the canonical folder ID string, and the first online listing of an uncached folder syncs the folder delta: up to 40 delta pages (about 2,000 messages) per call. A larger folder returns the newest messages right away with "sync_complete": false and continues the sync on the following listings (or in the TUI / serve background sync) until it is complete; the key is absent otherwise. In search --remote --json, hits holds local cache matches while remote holds Graph results, so the same message ID can appear in both arrays.

For read, message_id is an exact message ID; subject and ID-prefix resolution apply only to CLI read --offline (online callers should locate IDs with search first). Runtime failures with --json emit a structured JSON error object on stdout ({"ok": false, "error": {"code": ..., "message": ...}}) with exit code 1; exit code 2 indicates a CLI usage/parsing error printed as plain text on stderr. For sync --json (and doctor --online --json), check the ok field in the JSON output to determine overall success.

Use outlook mark for read and flag changes, and outlook move to change folders. MCP update_message supports both. In the TUI, Ctrl+S saves the current composition. Reopening and saving reuses the draft ID. Reply, reply-all, and forward drafts retain their source message relationship and quoted HTML.

outlook edit-draft DRAFT_ID --subject "Revised release notes" --json
outlook edit-draft DRAFT_ID --body 'The **final** checklist is attached.' --json
outlook update-event EVENT_ID --start 2026-11-23T09:00 --end 2026-11-23T09:30 --json
outlook update-task TASK_ID --list tasks --due 2026-11-25 --json

Each edit sends the specified fields. A draft subject change preserves the original body and its markup. Use --body-html to supply replacement HTML directly. Calendar edits leave the body, attendees, and recurrence out of the request. To Do edits leave the body and checklist out of the request. Message updates · Event updates · To Do updates

For create-event, RFC3339 times are exact instants and wall-clock times such as "2026-11-23 09:00" are read in the machine's time zone, or in --time-zone when given. --all-day needs YYYY-MM-DD for both --start and --end, with an exclusive end date (--start 2026-11-23 --end 2026-11-24 is one day).

For update-event, calendar wall-clock times such as 2026-11-23T09:00 use the event's original Graph time zone. Use date-only values with all-day events and give the exclusive end date. RFC3339 values such as 2026-11-23T09:00:00+09:00 are sent in UTC for timed events. Non-UTC recurring events require wall-clock times. To Do dates use midnight UTC, and RFC3339 To Do timestamps are converted to UTC. Event time and recurrence

Local HTTP REST API (outlook serve)

Start an Axum JSON server on 127.0.0.1:3939 (with live /openapi.json). Requests need a Bearer key: pass your own with --api-key, or use the random token the server prints to stderr at startup.

outlook serve --port 3939 --api-key "$OUTLOOK_API_KEY"
curl -H "Authorization: Bearer $OUTLOOK_API_KEY" \
  "http://127.0.0.1:3939/v1/mail/messages?folder=inbox&unread=true"
curl -X POST http://127.0.0.1:3939/v1/mail/send \
  -H "Authorization: Bearer $OUTLOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":["elena.park@acme.dev"],"subject":"Build green","markdown":"All checks passed!"}'

--allow-keyless serves loopback clients without a key. Browser apps are refused unless their origin is passed with --cors-origin; see Security.

Full endpoint & schema docs: docs/API.md · docs/openapi.yaml

MCP Server (outlook mcp)

Exposes 23 Microsoft Outlook tools over newline-delimited stdio JSON-RPC 2.0, including update_draft, update_event, and update_task.

# Claude Code
claude mcp add outlook -- outlook mcp
// Claude Desktop / Cursor / Windsurf MCP config
{
  "mcpServers": {
    "outlook": {
      "command": "outlook",
      "args": ["mcp"]
    }
  }
}

Full tool schemas & client setups: docs/MCP.md · docs/NPM.md


@bitefoundry Enterprise Terminal Suite

Package

Command

Domain

Interfaces

@bitefoundry/teams

teams

Microsoft Teams (Chats, Channels, Threads, Presence)

TUI · CLI · HTTP · MCP

@bitefoundry/outlook (this repo)

outlook

Microsoft Outlook (Mail, Calendar, To Do, Contacts)

TUI · CLI · HTTP · MCP

@bitefoundry/onenote

onenote

Microsoft OneNote (Notebooks, Sections, Pages)

TUI · CLI · HTTP · MCP

@bitefoundry/sharepoint

sharepoint, bitefoundry-onedrive

SharePoint & OneDrive (Sites, Drives, Lists, Files)

TUI · CLI · HTTP · MCP

@bitefoundry/atlassian

atlassian, confluence, conf

Jira & Confluence (Issues, Boards, Sprints, Wiki)

TUI · CLI · HTTP · MCP

@bitefoundry/notion

notion

Notion (Pages, Databases, Blocks, Comments)

TUI · CLI · HTTP · MCP


License & Disclaimer

Licensed under the MIT License.

Unofficial terminal client for Microsoft Outlook. Not affiliated with, endorsed by, or sponsored by Microsoft Corporation.

Available Tools

24 tools
complete_taskB

Mark a Microsoft To Do task as completed (or incomplete when completed: false).

Inputs: task_id (required), list, completed.

create_eventB

Create a new Outlook calendar event (optionally as an online Teams meeting).

Inputs: end (required), start (required), subject (required), body, +5 more.

create_taskC

Create a new task in a Microsoft To Do list.

Inputs: title (required), due, list, notes, +1 more.

delete_eventC

Delete a calendar event. Requires confirm: true.

Inputs: confirm (required), event_id (required).

delete_messageC

Delete an email message. Requires confirm: true.

Inputs: confirm (required), message_id (required).

download_attachmentA

Download an Outlook email attachment or inline screenshot to disk and return structured JSON { ok, path, file_name, mime_type, size_bytes, is_image } so multimodal AI agents can read media directly from disk. Fetches the full attachment bytes with Graph requests unless offline reads them from the cache; time grows with file size.

Inputs: message_id (required), offline, attachment, output_dir, +1 more.

forward_mailC

Forward an email message to one or more recipients.

Inputs: to (required), message_id (required), comment.

get_eventA

Read a calendar event by ID. Compact by default (omits body_html); pass fields: [...] for selective field projection (e.g. ['attendees', 'body_plain', 'recurrence', 'categories']) without pulling full HTML, or compact:false for all fields. 1 Graph request unless offline.

Inputs: event_id (required), fields, compact, offline.

get_messageA

Read an email by ID. Compact by default; pass fields: [...] for selective field projection (e.g. ['cc', 'bcc', 'categories', 'attachments']) without pulling full HTML, or set compact:false for HTML and attachment metadata. 1 Graph request unless offline (plus 1 when mark_read changes the state); compact:false can be large.

Inputs: message_id (required), fields, compact, offline, +1 more.

list_eventsA

List calendar events within a date/time window (defaults to next 7 days). Compact by default (omits body_html and recurrence, listed in omitted.fields). 1 Graph request per 100 events in the window; offline: true reads the cache only.

Inputs: to, end, days, from, +4 more.

list_mail_foldersB

List Outlook mail folders with unread and total item counts. Graph cost: 1 request plus 1 batch per folder nesting level, skipped while the cache is younger than OUTLOOK_CLI_CACHE_SECS (default 0).

Inputs: limit, cursor, offline, refresh.

list_messagesA

List emails in a mail folder (accepts folder ID, display name/prefix, or well-known alias such as 'inbox', 'sent', 'drafts', 'archive', 'trash', 'junk'). Usually 1-2 Graph requests. The first call on a large folder syncs at most 40 pages (sync_complete: false until done); unread/flagged/focused filters scan at most 20 pages. offline: true reads the cache only.

Inputs: limit, cursor, folder, unread, +4 more.

list_tasksB

List tasks in a Microsoft To Do list (accepts list name, 'tasks'/'defaultList', or ID). 1 Graph request per 100 tasks unless offline.

Inputs: list, limit, offline, include_completed.

list_todo_listsA

List Microsoft To Do task lists. Graph cost: 1 request per page of lists, skipped while the cache is younger than OUTLOOK_CLI_CACHE_SECS (default 0).

Inputs: limit, cursor, offline, refresh.

reply_mailC

Reply (or reply all) to an email message using Markdown.

Inputs: body (required), message_id (required), reply_all.

respond_eventC

Respond (accept, tentative, decline) to a calendar event invitation.

Inputs: event_id (required), response (required), comment.

search_contactsB

List or search personal Outlook contacts and Entra organization directory. A query reads personal contacts and the organization directory: 2-3 Graph requests.

Inputs: limit, query, offline.

search_mailA

Search emails in local SQLite FTS5 (offline: true) or remotely via Microsoft Graph KQL $search. Remote search is 1 Graph request per page and is rate-limited by Exchange; prefer offline: true (local FTS, no request) for mail that is already synced.

Inputs: query (required), limit, cursor, folder, +2 more.

send_mailB

Compose and send an email with Markdown body and optional file attachments. Attachments over 3 MiB are uploaded in chunks before sending, which takes several requests.

Inputs: to (required), body (required), subject (required), cc, +4 more.

update_draftB

Edit subject and/or body of an existing Outlook draft. Provide Markdown body or raw body_html for a body replacement.

Inputs: message_id (required), body, subject, body_html.

update_eventC

Edit subject and/or times of an existing calendar event.

Inputs: event_id (required), end, start, subject.

update_messageC

Update an email's read/unread status, flag status, or move it to another folder.

Inputs: message_id (required), compact, flagged, is_read, +3 more.

update_taskC

Edit title and/or due date of an existing Microsoft To Do task.

Inputs: task_id (required), due, list, title.

whoamiA

Display current user identity, token expiry, OAuth scopes, and auth source (outlook-cli vs shared teams-cli).

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 24 tools

    Disambiguation4/5

    Most tools target a clearly distinct resource+action (mail vs. calendar vs. tasks vs. contacts), and the descriptions make the boundaries explicit. Minor overlap exists between update_message (flags/move) and update_draft (subject/body), and complete_task is essentially a specialized update_task, but the descriptions disambiguate these well enough.

    Naming Consistency4/5

    The set follows a consistent snake_case verb_noun convention (list_messages, get_message, create_event, delete_message, update_task, etc.) across all domains. The only real outlier is 'whoami', which breaks the pattern but is a common, self-explanatory convention.

    Tool Count4/5

    At 24 tools the surface is on the heavy side, but it spans four distinct domains (mail, calendar, tasks, contacts) plus auth, averaging ~5-6 tools per domain, which is reasonable. A few tools could potentially be merged (e.g. complete_task into update_task), but nothing feels gratuitous.

    Completeness4/5

    Mail and calendar have near-complete lifecycles (list/get/create/update/delete/reply/forward/search), and tasks cover list/create/complete/update. Notable gaps remain: there is no create_draft (only update_draft), no delete_task, and contacts are read-only (search_contacts) with no create/update, but agents can work around most of these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A modular collection of MCP servers for automating virtual secretary tasks within Microsoft Outlook, including email management, calendar operations, contacts, tasks, and mailbox settings through Microsoft Graph API.
      5
      MIT
    • A
      license
      B
      quality
      A
      maintenance
      MCP server that provides 62 tools to manage Outlook mail, calendar, contacts, and tasks for personal Microsoft accounts via Microsoft Graph API.
      71
      995 PyPI
      45
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for sending and managing Microsoft Outlook email via the Microsoft Graph API, including drafts, replies, contacts, and directory search.
      22
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Turns your running Outlook Desktop into an MCP server, enabling email, calendar, tasks, and attachment management through your existing Outlook session without any cloud APIs.
      AGPL 3.0