jibberish69/enhanced-outlook-mcp
If you are the rightful owner of enhanced-outlook-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Enhanced Outlook MCP Server connects Claude with Microsoft Outlook via Microsoft Graph API, offering tools for email, calendar, folder management, and rule creation.
Enhanced Outlook MCP Server
This is an enhanced, modular implementation of the Outlook MCP (Model Context Protocol) server that connects Claude with Microsoft Outlook through the Microsoft Graph API. This server provides a robust set of tools for email, calendar, folder management, and rule creation.
Features
- Complete Authentication System: OAuth 2.0 authentication with Microsoft Graph API with token refresh and multiple user support
- Email Management: List, search, read, send, and organize emails with attachment support
- Calendar Integration: Create, modify, and manage calendar events with attendee tracking
- Folder Organization: Create, manage, and navigate email folders
- Rules Engine: Create and manage complex mail processing rules
- Modular Architecture: Clean separation of concerns for better maintainability and extensibility
- Enhanced Error Handling: Detailed error messages and logging
- Test Mode: Simulated responses for testing without real API calls
- Rate Limiting: Prevent API throttling with built-in rate limiting
- Multi-environment Configuration: Support for development, testing, and production environments
Directory Structure
/enhanced-outlook-mcp/
โโโ index.js # Main entry point
โโโ config.js # Configuration settings
โโโ .env.example # Example environment variables
โโโ auth/ # Authentication modules
โ โโโ index.js # Authentication exports
โ โโโ token-manager.js # Token storage and refresh
โ โโโ multi-user-support.js # Multiple user support
โ โโโ 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
โ โโโ attachments.js # Handle email attachments
โโโ calendar/ # Calendar functionality
โ โโโ index.js # Calendar exports
โ โโโ create-event.js # Create calendar events
โ โโโ list-events.js # List calendar events
โ โโโ update-event.js # Update calendar events
โ โโโ delete-event.js # Delete calendar events
โโโ folder/ # Folder management
โ โโโ index.js # Folder exports
โ โโโ list.js # List folders
โ โโโ create.js # Create folders
โ โโโ move.js # Move items between folders
โโโ rules/ # Mail rules functionality
โ โโโ index.js # Rules exports
โ โโโ create.js # Create mail rules
โ โโโ list.js # List mail rules
โ โโโ delete.js # Delete mail rules
โโโ utils/ # Utility functions
โโโ graph-api.js # Microsoft Graph API helper
โโโ odata-helpers.js # OData query building
โโโ logger.js # Logging utility
โโโ rate-limiter.js # API rate limiting
โโโ mock-data/ # Test mode mock data
โโโ emails.js # Mock email data
โโโ folders.js # Mock folder data
โโโ calendar.js # Mock calendar data
โโโ rules.js # Mock rules data
Installation
-
Clone the repository:
git clone https://github.com/your-username/enhanced-outlook-mcp.git cd enhanced-outlook-mcp -
Install dependencies:
npm install -
Create a
.envfile based on.env.examplewith your Microsoft App Registration details:MS_CLIENT_ID=your_client_id MS_CLIENT_SECRET=your_client_secret # Additional configuration options
Usage with Claude
-
Configure Claude to use the MCP server by adding the following to your Claude configuration:
{ "tools": [ { "name": "enhanced-outlook-mcp", "url": "http://localhost:3000", "auth": { "type": "none" } } ] } -
Start the MCP server:
npm start -
In a separate terminal, start the authentication server:
npm run auth-server -
Use the authenticate tool in Claude to initiate the authentication flow.
Authentication Flow
- Start the authentication server on the configured port (default: 3333)
- Use the
authenticatetool to get an authentication URL - Complete the authentication in your browser
- Tokens are securely stored in the configured location
Development
To run the server in development mode with auto-reload:
npm run dev
To run tests:
npm test
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.