Skip to main content
Glama
mcp-outlook-lite

mcp-outlook-lite

by w21180239

mcp-outlook-lite

The lightest way to connect AI agents to Microsoft Outlook. No client secret. No complex OAuth. Just a Client ID and you're done.

License: MIT Tests Coverage TypeScript Node

Tired of getting stuck on Outlook MCP auth? Most Outlook MCP servers require client secrets, complex permission grants, and multi-step OAuth configurations that break silently. This one uses PKCE — the browser handles login, no secrets stored anywhere. If you can create an Azure app registration, you can use this.


Why this one?

mcp-outlook-lite

Other Outlook MCPs

Auth setup

Client ID only, zero secrets

Client ID + Client Secret + certificates

Auth flow

PKCE (browser popup) + device code (headless)

Complex OAuth requiring manual token management

First-time experience

Register app > paste ID > done

Register app > create secret > configure redirect > manage tokens > debug errors

Token management

Auto-refresh, encrypted at rest, zero maintenance

Often manual refresh or re-auth required

Token efficiency

Focused tool schemas, minimal response payloads

Verbose responses eating your context window

Headless support

Auto-detects SSH/containers, prints device code

Browser-only or manual token injection

The auth problem is real. If you've tried other Outlook MCPs and got stuck after creating the Azure app — authorization failures, redirect URI mismatches, token exchange errors — that's because they use flows designed for server apps. PKCE is designed for exactly this use case: local tools that can't store secrets.


Related MCP server: m365-mcp-server

3-step setup

Step 1: Register an Azure app (5 min, one-time)

  1. Azure Portal > App registrations > New registration

  2. Name: anything (e.g. Outlook MCP). Account type:

    • Work/school: "Accounts in this organizational directory only"

    • Personal: "Accounts in any org directory and personal Microsoft accounts"

  3. Redirect URI: Web > http://localhost/callback

  4. Authentication > enable Allow public client flows > Save

  5. API permissions > Add Microsoft Graph delegated permissions:

    Mail.Read  Mail.ReadWrite  Mail.Send  Calendars.Read  Calendars.ReadWrite
    User.Read  MailboxSettings.Read  Files.Read.All  Sites.Read.All  offline_access
  6. Copy Application (client) ID from the Overview page

  7. Determine your Tenant ID:

    • Personal account (outlook.com / hotmail.com / live.com): use consumers

    • Work/school account: use the Directory (tenant) ID from the Overview page

    • Both: use common

That's it. No client secret. No certificates. No admin consent (for personal accounts).

⚠️ Personal account users: You must set AZURE_TENANT_ID=consumers. Using the Directory (tenant) ID from Azure Portal will authenticate successfully but Graph API calls will return 401 because your mailbox lives in the consumer identity system, not in that Azure AD tenant.

Step 2: Install

npx mcp-outlook-lite

Or add to your MCP client config:

# Personal account (outlook.com / hotmail.com / live.com)
claude mcp add outlook \
  -e AZURE_CLIENT_ID=your-client-id \
  -e AZURE_TENANT_ID=consumers \
  -- npx mcp-outlook-lite

# Work/school account
claude mcp add outlook \
  -e AZURE_CLIENT_ID=your-client-id \
  -e AZURE_TENANT_ID=your-directory-tenant-id \
  -- npx mcp-outlook-lite
{
  "mcpServers": {
    "outlook": {
      "command": "npx",
      "args": ["mcp-outlook-lite"],
      "env": {
        "AZURE_CLIENT_ID": "your-client-id",
        "AZURE_TENANT_ID": "consumers"
      }
    }
  }
}

Replace consumers with your Directory (tenant) ID for work/school accounts.

{
  "mcpServers": {
    "outlook": {
      "command": "npx",
      "args": ["mcp-outlook-lite"],
      "env": {
        "AZURE_CLIENT_ID": "your-client-id",
        "AZURE_TENANT_ID": "consumers"
      }
    }
  }
}

Replace consumers with your Directory (tenant) ID for work/school accounts.

Step 3: Use it

The first tool call triggers auth automatically:

  • Desktop: browser opens for Microsoft login

  • SSH / container: device code printed to stderr — follow the link

After that, tokens refresh silently. No re-login between sessions.


46 tools, 6 categories

Category

Count

Highlights

Email

15

List, search, send, reply, forward, draft, move, flag, categorize, batch

Calendar

17

Events, recurring meetings, availability, online meetings, timezone handling

Attachments

4

List, download with auto-parsing (PDF/Word/Excel/PPT), upload, scan

Folders

4

List, create, rename, stats

SharePoint

3

Access files via sharing links or direct IDs

Rules

3

List, create, delete server-side inbox rules

Example prompts

"Show me unread emails from this week"
"Find all emails from Alice about the budget"
"Reply to that email thanking her for the update"
"What meetings do I have tomorrow?"
"Schedule a 30-min call with Bob next Tuesday at 2pm"
"Download and summarize the PDF from the latest Finance email"

How PKCE auth works

Agent calls a tool
       |
       v
  Token cached?  ---yes--->  Use it
       | no
  Refresh works? ---yes--->  Silent refresh (no browser)
       | no
  PKCE flow:
    1. Generate code_verifier + code_challenge
    2. Browser opens -> Microsoft login
    3. Redirect to localhost with auth code
    4. Exchange code + verifier for tokens
    5. Encrypt and store tokens locally

No client secret anywhere in this flow. The PKCE challenge/verifier pair cryptographically proves the caller's identity. Tokens are encrypted at rest using the OS keychain or AES-256 with a random key.


Configuration

Variable

Required

Description

AZURE_CLIENT_ID

Yes

Application (client) ID from Azure

AZURE_TENANT_ID

Yes

consumers for personal accounts, Directory (tenant) ID for work/school, or common for both

MCP_OUTLOOK_DEVICE_CODE

No

Set to 1 to force device code flow

MCP_OUTLOOK_WORK_DIR

No

Directory for large file downloads

DEBUG

No

Enable debug logging on stderr


Development

TypeScript with noImplicitAny. 769 tests, 81% coverage.

npm test              # Run tests
npm run typecheck     # Type check
npm run build         # Compile to dist/
npm run dev           # Dev mode with tsx
server/
  index.ts              # MCP server entry
  types.ts              # Shared interfaces
  auth/                 # PKCE + device code auth
  graph/                # Microsoft Graph client with rate limiting
  tools/                # 46 tool handlers
  schemas/              # MCP tool schemas
  utils/                # Validation, caching, error handling
  tests/                # 769 tests

Security

  • Tokens encrypted at rest (OS keychain or AES-256)

  • All Graph API calls scoped to /me/ (your mailbox only)

  • No sensitive data in tool responses

  • Recipient validation before sending emails

Report vulnerabilities via GitHub private reporting. See SECURITY.md.


See Also

outlook-cli-skill — Lightweight alternative by the same author. No MCP server needed — a thin CLI handles OAuth, and AI agents call Microsoft Graph API directly via skill files. Works with any AI agent (Claude Code, Cursor, Codex, Gemini), not just MCP clients.

mcp-outlook-lite

outlook-cli-skill

Approach

MCP server (46 tools)

CLI + skill files (26 ops)

Scope

Full Outlook (email, calendar, SharePoint, attachments)

Email-focused

Best for

MCP clients needing calendar + document parsing

Any AI agent, minimal overhead

Runtime

Long-running server process

No server, on-demand CLI calls

Attachment parsing

Auto-parse PDF/Word/Excel/PPT

Raw download


License

MIT

Available Tools

46 tools
outlook_add_attachmentB

Add an attachment to an email draft

Inputs: name (required), messageId (required), contentType (required), contentBytes (required).

outlook_archive_emailA

Archive an email (move to Archive folder)

Inputs: messageId (required).

outlook_batch_process_emailsC

Perform bulk operations on multiple emails

Inputs: operation (required), messageIds (required), operationData.

outlook_build_recurrence_patternC

Build a recurrence pattern object

Inputs: rangeType (required), patternType (required), index, interval, +6 more.

outlook_categorize_emailC

Apply categories to an email

Inputs: messageId (required), categories.

outlook_check_availabilityC

Check availability for users

Inputs: endTime (required), schedules (required), startTime (required), availabilityViewInterval.

outlook_check_calendar_permissionsB

Check permissions for a calendar

Inputs: calendarId.

outlook_create_draftA

Create an email draft without sending. When replyToMessageId is provided, creates a reply draft that preserves the thread/conversation context (to and subject are auto-populated from the original email). Use outlook_add_attachment afterward to attach files to the draft.

Inputs: cc, to, bcc, body, +5 more.

outlook_create_eventC

Create a new calendar event in Outlook with optional Teams meeting integration

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

outlook_create_folderC

Create a new email folder

Inputs: displayName (required), parentFolderId.

outlook_create_recurrence_helperC

Helper to create a recurring event with simplified inputs

Inputs: eventTitle (required), endDateTime (required), startDateTime (required), recurrenceType (required), +3 more.

outlook_create_recurring_eventC

Create a recurring calendar event

Inputs: end (required), start (required), subject (required), recurrencePattern (required), +4 more.

outlook_create_ruleC

Create an inbox message rule to automatically move emails matching sender criteria to a specified folder

Inputs: displayName (required), moveToFolder (required), senderContains (required), sequence, +1 more.

outlook_delete_emailA

Delete an email (move to Deleted Items or permanently delete)

Inputs: messageId (required), permanentDelete.

outlook_delete_eventB

Delete a calendar event

Inputs: eventId (required).

outlook_delete_ruleB

Delete an inbox message rule by ID

Inputs: ruleId (required).

outlook_download_attachmentC

Download a specific email attachment

Inputs: messageId (required), attachmentId (required), decodeContent, includeContent.

outlook_find_meeting_timesC

Find optimal meeting times for attendees

Inputs: attendees (required), maxCandidates, timeConstraint, meetingDuration.

outlook_flag_emailA

Flag or unflag an email for follow-up

Inputs: messageId (required), flagStatus.

outlook_forward_emailB

Forward an existing email to new recipients

Inputs: to (required), messageId (required), body, comment, +1 more.

outlook_get_busy_timesC

Get busy times for users

Inputs: endTime (required), schedules (required), startTime (required), availabilityViewInterval.

outlook_get_calendar_viewC

Get a view of a calendar for a specific time range

Inputs: endDateTime (required), startDateTime (required), top, calendarId.

outlook_get_emailC

Get detailed information about a specific email

Inputs: messageId (required), format, truncate, maxLength.

outlook_get_eventC

Get a specific calendar event

Inputs: eventId (required).

outlook_get_folder_statsC

Get statistics for a specific folder

Inputs: folderId (required), includeSubfolders.

outlook_get_sharepoint_fileA

Fetch a SharePoint file using the same authenticated session as Outlook. Handles sharing links from emails. Either sharePointUrl OR fileId must be provided.

Inputs: fileId, driveId, sharePointUrl, downloadContent.

outlook_list_attachmentsC

List all attachments for a specific email

Inputs: messageId (required).

outlook_list_calendarsC

List available calendars

Inputs: top, includeSharedCalendars.

outlook_list_emailsB

List emails from Outlook inbox or specified folder

Inputs: limit, filter, folder.

outlook_list_eventsC

List calendar events from Outlook

Inputs: limit, calendar, endDateTime, startDateTime.

outlook_list_foldersC

List all email folders

Inputs: top, includeHidden, includeChildFolders.

outlook_list_rulesB

List all inbox message rules

Inputs: no named parameters.

outlook_list_sharepoint_filesB

List files in SharePoint sites or OneDrive folders using the same authenticated session

Inputs: limit, siteId, driveId, orderBy, +1 more.

outlook_mark_as_readA

Mark an email as read or unread

Inputs: messageId (required), isRead.

outlook_move_emailB

Move an email to a different folder

Inputs: messageId (required), destinationFolderId (required).

outlook_rename_folderB

Rename an existing email folder

Inputs: folderId (required), newDisplayName (required).

outlook_reply_allB

Reply to all recipients of an existing email

Inputs: messageId (required), body, comment, bodyType.

outlook_reply_to_emailB

Reply to an existing email

Inputs: messageId (required), body, comment, bodyType.

outlook_respond_to_inviteB

Respond to a meeting invitation

Inputs: eventId (required), response (required), comment, sendResponse.

outlook_scan_attachmentsC

Scan emails for large or suspicious attachments

Inputs: limit, folder, daysBack, maxSizeMB, +1 more.

outlook_schedule_online_meetingC

Schedule an online meeting (Teams/Skype)

Inputs: endTime (required), subject (required), startTime (required), attendees, +1 more.

outlook_search_emailsB

Search emails across all folders with advanced filters for analysis

Inputs: from, limit, query, format, +8 more.

outlook_send_emailB

Send an email through Outlook

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

outlook_update_eventB

Update an existing calendar event

Inputs: eventId (required), end, body, start, +3 more.

outlook_validate_event_datetimesC

Validate event start and end times

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 46 tools

    Disambiguation4/5

    Tool purposes are mostly distinct, but several recurring-event and scheduling tools overlap: outlook_create_recurring_event, outlook_create_recurrence_helper, and outlook_build_recurrence_pattern have unclear boundaries about which to use. Similarly outlook_check_availability, outlook_get_busy_times, and outlook_find_meeting_times all address scheduling availability with subtle distinctions.

    Naming Consistency5/5

    All 46 tools follow a consistent outlook_verb_noun snake_case pattern with no deviations. The prefix makes tool origins clear and names are uniformly readable.

    Tool Count2/5

    With 46 tools, this is well beyond the typical 3-15 well-scoped range and suggests feature sprawl. While email plus calendar plus SharePoint integration is broad, several tools appear redundant (three recurrence builders, multiple availability tools), indicating over-proliferation for the stated scope.

    Completeness4/5

    The surface covers email CRUD, folders, rules, attachments, calendar events, scheduling, and SharePoint file access comprehensively with few obvious gaps. Minor omissions like calendar delete/permission-management tools are workable around.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      C
      quality
      D
      maintenance
      A powerful MCP server that enables AI assistants to interact with Microsoft Graph API for managing Outlook emails, Calendar events, OneDrive files, and Contacts through natural language commands.
      35
      56
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      A production-ready MCP server that provides secure, delegated access to Microsoft 365 services including Email, SharePoint, OneDrive, and Calendar. It enables AI models to search messages, browse files, manage calendar events, and parse document contents using OAuth 2.1 authentication.
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      A lightweight MCP server for personal Microsoft Outlook/Hotmail accounts, enabling email search, reading, attachment management, and folder operations via Microsoft Graph API with OAuth device-code flow.
      6
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Python-based MCP server for Microsoft 365 Outlook email operations using OAuth 2.0 Client Credentials Flow, enabling automated email management for autonomous agents.
      MIT