Cover image
Try Now
2025-03-14

Claude的MCP服务器通过Microsoft Graph API访问Outlook数据

3 years

Works with Finder

1

Github Watches

9

Github Forks

20

Github Stars

Modular Outlook MCP Server

This is a modular implementation of the Outlook MCP (Model Context Protocol) server that connects Claude with Microsoft Outlook through the Microsoft Graph API.

Directory Structure

/modular/
├── index.js                 # Main entry point
├── config.js                # Configuration settings
├── auth/                    # Authentication modules
│   ├── index.js             # Authentication exports
│   ├── token-manager.js     # Token storage and refresh
│   └── tools.js             # Auth-related tools
├── email/                   # Email functionality
│   ├── index.js             # Email exports
│   ├── list.js              # List emails
│   ├── search.js            # Search emails
│   ├── read.js              # Read email
│   └── send.js              # Send email
└── utils/                   # Utility functions
    ├── graph-api.js         # Microsoft Graph API helper
    ├── odata-helpers.js     # OData query building
    └── mock-data.js         # Test mode data

Features

  • Authentication: OAuth 2.0 authentication with Microsoft Graph API
  • Email Management: List, search, read, and send emails
  • Modular Structure: Clean separation of concerns for better maintainability
  • OData Filter Handling: Proper escaping and formatting of OData queries
  • Test Mode: Simulated responses for testing without real API calls

Configuration

To configure the server, edit the config.js file to change:

  • Server name and version
  • Test mode settings
  • Authentication parameters
  • Email field selections
  • API endpoints

Usage with Claude Desktop

  1. Copy the sample configuration from claude-config-sample.json to your Claude Desktop configuration
  2. Restart Claude Desktop
  3. Authenticate with Microsoft using the authenticate tool
  4. Use the email tools to manage your Outlook account

Running Standalone

You can test the server using:

./test-modular-server.sh

This will use the MCP Inspector to directly connect to the server and let you test the available tools.

Authentication Flow

  1. Start a local authentication server on port 3333 (using outlook-auth-server.js)
  2. Use the authenticate tool to get an authentication URL
  3. Complete the authentication in your browser
  4. Tokens are stored in ~/.outlook-mcp-tokens.json

Troubleshooting

  • Authentication Issues: Check the token file and authentication server logs
  • OData Filter Errors: Look for escape sequences in the server logs
  • API Call Failures: Check for detailed error messages in the response

Extending the Server

To add more functionality:

  1. Create new module directories (e.g., calendar/)
  2. Implement tool handlers in separate files
  3. Export tool definitions from module index files
  4. Import and add tools to TOOLS array in index.js

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

    Reviews

    5 (1)
    Avatar
    user_6By5t2zT
    2025-04-17

    Outlook-MCP by ryaker is an excellent tool for managing Outlook tasks efficiently. The seamless integration and user-friendly interface make it a must-have for productivity enthusiasts. The comprehensive documentation available on the GitHub page (https://github.com/ryaker/outlook-mcp) ensures a smooth setup process. Highly recommended for those looking to streamline their workflow.