Purpose: mcp-outlook is a member of the dockndevai MCP server suite, providing AI agents with the ability to operate a Microsoft Outlook mailbox, based on Microsoft Graph. By default it starts in read-only mode; higher-privilege tools are only registered after the mode is elevated.
Main capabilities: For email, it can list folders and messages, perform full-text search, read message bodies and attachment metadata, and list contacts; in higher modes it can create drafts, send/reply/forward, mark as read, move messages, and delete. It can also manage OneDrive files (browse, search, download, upload, create folders, move/rename, delete) and calendars (list calendars and events, check free/busy, and controlled creation, updating, responding to, canceling, and deleting events).
Usage: On first run it opens a browser and redirects to the Microsoft sign-in page, then caches the token and refreshes it silently; the server never touches passwords. An Entra (Azure AD) app registration is required: default browser sign-in requires registering a public client and adding a redirect URI http://localhost,将 Set the Application (client) ID as OUTLOOK_CLIENT_ID, grant delegated Mail.Read (add Mail.Send / Mail.ReadWrite if sending or organizing is needed); interactive use requires no client secret. Automation scenarios can use app-only authentication: set OUTLOOK_CLIENT_SECRET, OUTLOOK_TENANT_ID, OUTLOOK_USER. The authentication mode is selected automatically and can be overridden with OUTLOOK_AUTH: interactive (default, only CLIENT_ID set), client-credentials (CLIENT_SECRET present), token (OUTLOOK_TOKEN set). The token is cached at ~/.mcp-outlook/token.json (0600).
Security and limitations: Access is ultimately controlled by the scopes granted by the Microsoft account; calendar tools require the Calendars.ReadWrite delegated scope, and Graph returns 403 if not consented; OUTLOOK_SCOPES can be used to reduce privileges. The security model is enforced by src/security.ts: OUTLOOK_MODE is divided into read-only (default, 7 read tools), read-write, and admin; sending requires OUTLOOK_ALLOW_SEND in addition to read-write; deletion requires OUTLOOK_ALLOW_DELETE in addition to admin; OUTLOOK_FOLDER_ALLOWLIST / OUTLOOK_PROTECTED_FOLDERS restrict writable folders; clients that support MCP elicitation pause before sending and deleting to request human confirmation; OUTLOOK_DRY_RUN can validate and log writes only; OUTLOOK_AUDIT_LOG is enabled by default and outputs JSON audit lines to stderr; attachment bytes are never returned, and list_attachments returns only metadata.