outlook-mcp
MCP server for sending and managing Microsoft Outlook email via the Microsoft Graph API, including drafts, replies, contacts, and directory search.
README
outlook-mcp
A Model Context Protocol (MCP) server for sending and managing Microsoft Outlook email via the Microsoft Graph API.
Features
- Send email — To, CC, BCC, plain text or HTML body, file attachments (max 3 MB each)
- Save draft — Save a message to Drafts without sending
- Update draft — Partially edit a saved Draft (only supplied fields change)
- Send draft — Transmit a saved Draft to its recipients
- List mail folders — Discover all folders including custom ones
- List messages — Browse any folder with full-text search or OData filter
- Get message — Read full message body (plain text or HTML) + attachment metadata
- Reply / Forward — Reply to or forward an existing message
- Mark message — Mark as read or unread
- Delete message — Move to Deleted Items (recoverable)
- List contact folders — Browse personal contact lists (folders) and their contacts
- List contacts — Search personal Outlook address book
- List M365 Group members — Find everyone in a Microsoft 365 Group
- List distribution groups — Find mail-enabled distribution lists in the organisation
- List users — Search or browse Azure AD users across the organisation
Authentication
Uses OAuth 2.0 Device Code Flow — no browser redirect required. Tokens are stored locally at .access-token.txt and refreshed automatically.
auth_start → visit the URL, enter the code → auth_poll
Note:
auth_startshould only be called when another tool returns an authentication error. Do not call it proactively — all tools load the stored token automatically.
Setup
1. Install dependencies and build
npm install
npm run build
2. Register in Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"outlook": {
"type": "stdio",
"command": "node",
"args": ["C:\\Users\\staff\\Documents\\mcp\\outlook-mcp\\build\\index.js"]
}
}
}
3. Authenticate
Call auth_start once, follow the instructions, then call auth_poll to complete login.
Tools
Authentication
| Tool | Description |
|---|---|
auth_start |
Start the Microsoft authentication flow |
auth_poll |
Complete authentication after signing in |
Sending & Drafts
| Tool | Description |
|---|---|
send_email |
Send an email immediately |
save_draft |
Save an email as a draft |
update_draft |
Partially edit a saved draft (only supplied fields change) |
send_draft |
Send a previously saved draft by its ID |
Reading Mail
| Tool | Description |
|---|---|
list_mail_folders |
List all mail folders including custom ones |
list_messages |
List messages from any folder; supports search and filter |
get_message |
Read full message content (body + attachment metadata) |
Mail Actions
| Tool | Description |
|---|---|
reply_message |
Reply to a message (thread history preserved) |
forward_message |
Forward a message to new recipients |
mark_message |
Mark a message as read or unread |
delete_message |
Move a message to Deleted Items |
Address Book & Directory
| Tool | Description |
|---|---|
list_contact_folders |
List personal contact folders; pass folderId to list contacts inside |
list_contacts |
List personal Outlook contacts (supports search) |
list_group_members |
List members of a Microsoft 365 Group |
list_distribution_groups |
List mail-enabled distribution groups in the org |
list_users |
Search or list Azure AD users in the organisation |
send_email / save_draft Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
string[] |
✅ | Recipient email addresses |
subject |
string |
✅ | Email subject |
body |
string |
✅ | Email body content |
cc |
string[] |
— | CC recipients |
bcc |
string[] |
— | BCC recipients |
contentType |
"text" | "html" |
— | Body format (default: "text") |
attachments |
string[] |
— | Local file paths to attach (max 3 MB each) |
Scopes
This MCP requests the following Microsoft Graph permissions:
Mail.Send— Send emailMail.ReadWrite— Save draftsGroup.Read.All— List group members and distribution groupsGroupMember.Read.All— Read group membershipDirectory.Read.All— Browse the directoryContacts.Read— Read personal contactsUser.Read.All— Search/list organisation usersoffline_access— Keep the session alive with a refresh token
Token Storage
Tokens are stored at outlook-mcp/.access-token.txt (excluded from git via .gitignore).
Attachment Limits
Attachments are encoded inline (base64). Files larger than 3 MB are rejected with a clear error before any API call is made. For larger files, share a link instead.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。