useful-outlook-mcp
useful-outlook-mcp
一个面向 Microsoft Outlook 的远程 MCP 服务器,具备规范的 OAuth2 实现和为智能体优化的工具。
功能特性
符合规范:RFC 9728/8414 OAuth 元数据、RFC 7591 动态客户端注册
无状态 OAuth:令牌由客户端管理,而非服务器——这正是 OAuth 的本意
为智能体优化的工具:在工具描述中进行了大量提示工程
动态作用域:OAuth 作用域会根据启用的工具自动调整
生产就绪:Docker、速率限制、只读模式、工具过滤
Related MCP server: M365 MCP Server
快速开始
npm install
npm run build
npm start # Server at http://localhost:3000所需环境:
MS365_MCP_CLIENT_ID=your-azure-ad-client-id
MS365_MCP_CLIENT_SECRET=your-azure-ad-client-secret
MS365_MCP_TENANT_ID=your-tenant-id # or 'common'Azure AD 设置
Azure Portal → Microsoft Entra ID → 应用注册 → 新建
添加委托权限:
User.Read、Mail.Read、Mail.ReadWrite、Mail.Send、Calendars.Read、Calendars.ReadWrite、Calendars.Read.Shared、Place.Read.All、People.Read、offline_access添加重定向 URI:
http://localhost:6274/oauth/callback(用于 MCP Inspector)证书和机密 → 新建客户端机密 → 复制该值
将客户端 ID、客户端机密和租户 ID 复制到你的
.env中
工具
邮件
list-mail-folders · list-mail-messages · search-mail · get-mail-message · send-mail · create-draft-mail · reply-mail · reply-all-mail · create-reply-draft · create-reply-all-draft · delete-mail-message · move-mail-message
日历
list-calendars · list-calendar-events · search-calendar-events · find-meeting-times · get-calendar-event · get-calendar-view · create-calendar-event · update-calendar-event · delete-calendar-event
联系人
lookup-contact-email
会议室搜索
对于线下会议,find-meeting-times 会自动:
获取你组织中所有可用的会议室
将它们与与会者一起纳入可用性检查
按位置(城市/大楼)对空闲会议室分组
仅返回带有邮箱地址的可预订空闲会议室
设置 isOnlineMeeting: false 即可启用会议室搜索。对于在线会议(默认值:true),会自动生成 Teams 会议链接。
所需作用域:Place.Read.All(添加到 Azure AD 应用权限中)
配置
变量 | 默认值 | 说明 |
| 必填 | Azure AD 客户端 ID |
| - | 客户端机密(可选) |
|
| 租户 ID |
|
| 服务器端口 |
|
| 禁用写入操作 |
| 全部 | 以逗号分隔的工具白名单 |
|
| CORS 来源 |
|
| 每个窗口的请求数 |
|
| 窗口大小(毫秒) |
| - | 仅限特定租户 |
Docker
从 GitHub Container Registry 拉取:
docker run -p 3000:3000 \
-e MS365_MCP_CLIENT_ID=xxx \
-e MS365_MCP_CLIENT_SECRET=xxx \
-e MS365_MCP_TENANT_ID=xxx \
ghcr.io/Leonine-Studios/useful-outlook-mcp:latest或在本地构建:
docker build -t useful-outlook-mcp .
docker run -p 3000:3000 \
-e MS365_MCP_CLIENT_ID=xxx \
-e MS365_MCP_CLIENT_SECRET=xxx \
-e MS365_MCP_TENANT_ID=xxx \
useful-outlook-mcp端点
端点 | 说明 |
| MCP 协议 |
| 健康检查 |
| RFC 9728 |
| RFC 8414 |
| OAuth(代理到 Microsoft) |
| 令牌交换(代理到 Microsoft) |
| 动态客户端注册 |
测试
npm run dev
npx @modelcontextprotocol/inspector # Connect to http://localhost:3000/mcp设计说明
现有服务器的问题
遗留架构:以 stdio 构建,HTTP 是后来硬接上去的。本服务器是 HTTP 原生实现。
OAuth 实现有误:大多数服务器将令牌存储在服务端。本服务器是无状态的——令牌通过 Authorization 头随每个请求传递,从不存储。
工具未经思考:典型服务器只是将 API 端点 1:1 映射,没有任何指引。智能体在实际使用中会失败,因为它们不了解 API 的特殊行为和多步工作流。
不同之处
每个工具都包含:
何时使用它,而非替代方案
已知的 Graph API 特殊行为(有很多)
多步任务的工作流指引
会导致失败的参数组合
例如:find-meeting-times 会说明邮箱地址是必需的(仅用姓名无效)、如何使用 search-mail 根据姓名查找邮箱、OrganizerUnavailable 的含义,以及 isOrganizerOptional=true 需要用户确认。
已知的 Graph API 特殊行为
邮件发件人筛选:对
from/emailAddress/address使用eq不可靠——应使用startswith()邮件收件人筛选:无法用
$filter按收件人/抄送/密送筛选——必须使用$search日历组织者筛选:对组织者邮箱使用
$filter会返回 500——已在客户端过滤并发:并行调用可能返回
MailboxConcurrency错误搜索 + 排序:
$search不能与$orderby结合使用
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server that provides 62 tools to manage Outlook mail, calendar, contacts, and tasks for personal Microsoft accounts via Microsoft Graph API.6222MIT
- AlicenseNot gradedqualityCmaintenanceA secure remote MCP server that integrates Microsoft 365 services with AI assistants, enabling email, calendar, Teams, and contact operations via the Microsoft Graph API.2MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for sending and managing Microsoft Outlook email via the Microsoft Graph API, including drafts, replies, contacts, and directory search.114MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that uses Microsoft Entra OAuth 2.0 On-Behalf-Of flow to access Microsoft Graph for Outlook data, enabling email, calendar, and contacts interactions via MCP tools.
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Andersia7/MCP-outlook'
If you have feedback or need assistance with the MCP directory API, please join our Discord server