使用说明
Claude Outlook MCP工具
这是一个模型上下文协议(MCP)工具,允许Claude与macOS版Microsoft Outlook进行交互。
特性
- 邮件:
- 阅读未读和常规电子邮件
- 按关键字搜索电子邮件
- 向、抄送和密件抄送收件人发送电子邮件
- 发送HTML格式的电子邮件
- 将文件附加到电子邮件
- 列出邮件文件夹
- 日历:
- 查看今天的活动
- 查看即将举行的活动
- 搜索活动
- 创建新的日历事件
- 联络:
- 列出联系人
- 按姓名搜索联系人
先决条件
- 配备苹果硅(M1/M2/M3)或英特尔芯片的macOS
- 微软Mac版Outlook 已安装并配置
- 包子 安装
- Claude桌面应用程序 安装
安装
- 克隆此存储库:
git clone https://github.com/syedazharmbnr1/claude-outlook-mcp.git
cd claude-outlook-mcp
- 安装依赖项:
bun install
- 确保脚本可执行:
chmod +x index.ts
- 更新您的Claude Desktop配置:
编辑您的 claude_desktop_config.json 文件(位于 ~/Library/Application Support/Claude/claude_desktop_config.json)要包含此工具:
{
"mcpServers": {
"outlook-mcp": {
"command": "/Users/YOURUSERNAME/.bun/bin/bun",
"args": ["run", "/path/to/claude-outlook-mcp/index.ts"]
}
}
}
确保更换 YOURUSERNAME 使用您的实际macOS用户名,并调整克隆此存储库的路径。
-
重新启动Claude Desktop应用程序
-
授予权限:
- 前往系统偏好设置>隐私与安全>隐私
- 允许终端(或您首选的终端应用程序)访问辅助功能
- 首次使用该工具时,您可能会看到权限提示
用法
安装后,您可以通过以下问题直接从Claude使用Outlook工具:
- “你能在Outlook中查看我的未读电子邮件吗?”
- “在我的Outlook电子邮件中搜索季度报告”
- “发送电子邮件至john@example.com主题为“明天见面”
- “今天我的日历上有什么?”
- “为明天下午2点创建一个会议”
- “查找Jane Smith的联系信息”
例子
电子邮件操作
Check my unread emails in Outlook
Send an email to alex@example.com with subject "Project Update" and the following body: Here's the latest update on our project. We've completed phase 1 and are moving on to phase 2.
Send an HTML email to team@example.com with subject "Weekly Report" and attach the quarterly_results.pdf file
Search my emails for "budget meeting"
日历操作
What events do I have today?
Create a calendar event for a team meeting tomorrow from 2pm to 3pm
Show me my upcoming events for the next 2 weeks
联系运营
List all my Outlook contacts
Search for contact information for Jane Smith
高级功能
HTML电子邮件支持
您可以通过设置发送富HTML格式的电子邮件 isHtml 参数变为true:
Send an HTML email to john@example.com with the subject "Project Update" and body "<h1>Project Update</h1><p>We've made <b>significant progress</b> on the project.</p>"
文件附件
您可以通过在中提供文件路径将文件附加到电子邮件中 attachments 参数:
Send an email to jane@example.com with subject "Monthly Report" and attach the reports/march_2025.pdf file
为了获得附件的最佳效果:
- 尽可能使用绝对文件路径
- 确保运行MCP工具的进程可以访问这些文件
- 附件将通过强大的错误检测自动处理
故障排除
如果您遇到附件问题:
- 检查文件是否存在并且可读
- 使用绝对文件路径而不是相对路径
- 确保运行该进程的用户具有读取文件的权限
如果您遇到错误 Cannot find module '@modelcontextprotocol/sdk/server/index.js':
- 确保你已经跑过了
bun install安装所有依赖项 - 尝试显式安装MCP SDK:
bun add @modelcontextprotocol/sdk@^1.5.0 - 检查node_modules目录中是否存在该模块:
ls -la node_modules/@modelcontextprotocol/sdk/server/
如果错误仍然存在,请尝试使用Bun创建新项目:
mkdir -p ~/yourpath/claude-outlook-mcp
cd ~/yourpath/claude-outlook-mcp
bun init -y
然后将package.json和index.ts文件复制到新目录并运行:
bun install
bun run index.ts
更新claude_desktop_config.json以指向新位置。
许可证
麻省理工学院