Supports containerized deployment of the MCP server using Docker, with instructions for creating and running a Docker image.
Allows connecting a GitHub repository to Railway for automated deployment of the MCP server.
Can be configured with NGINX as a reverse proxy for the MCP server in manual deployment scenarios.
Runs on Node.js and provides integration for Claude to access Microsoft Outlook functionality through the Microsoft Graph API.
Enables deployment of the MCP server to Railway's platform through GitHub repository connection, with automatic deployment on git push.
Outlook MCP Server
A Model Context Protocol (MCP) server that provides Claude with access to Microsoft Outlook through the Microsoft Graph API. Features multi-account support, remote deployment capabilities, and comprehensive email, calendar, and folder management.
Quick Start
1. Install Dependencies
2. Configure Azure App Registration
- Create an Azure App Registration at Azure Portal
- Set redirect URIs:
http://localhost:3333/auth/callback
- For remote:
https://your-domain.com/auth/callback
- Grant permissions:
Mail.ReadWrite
,Calendars.ReadWrite
,offline_access
3. Environment Setup
Copy .env.example
to .env
and configure:
4. Claude Desktop Configuration
Add to your Claude Desktop config:
Usage Modes
Local Mode (Default)
Runs via stdio for Claude Desktop integration.
Remote Mode
Runs HTTP server on port 3001 with MCP endpoint at /mcp
.
Test Mode
Runs with mock data for development.
Features
Multi-Account Support
- Manage multiple Outlook accounts simultaneously
- Separate authentication and token storage per account
- Account-specific operations and data isolation
Email Management
- List, search, and read emails
- Send emails and create drafts
- Reply to messages
- Manage folders and move emails
- Handle attachments
Calendar Management
- List calendar events
- Create, update, and delete events
- Accept/decline meeting invitations
- Manage calendar permissions
Folder & Rules Management
- Create and manage email folders
- Set up email rules and filters
- Organize mailbox structure
MCP Tools
Authentication
authenticate
- Add new Outlook accountcheck-auth-status
- View account authentication statuslist-accounts
- List all configured accountsremove-account
- Remove an account
Email Tools
list-emails
- List emails with filtering optionsread-email
- Read specific email contentsend-email
- Send new emailcreate-draft
- Create email draftreply-to-email
- Reply to existing emailsearch-emails
- Search emails by criteriamark-as-read
- Mark emails as read/unread
Calendar Tools
list-calendar-events
- List calendar eventscreate-calendar-event
- Create new eventdelete-calendar-event
- Delete eventaccept-calendar-event
- Accept meeting invitationdecline-calendar-event
- Decline meeting invitation
Folder Tools
list-folders
- List email folderscreate-folder
- Create new foldermove-email
- Move email to folder
Deployment
Railway Deployment
- Connect your GitHub repository to Railway
- Set environment variables in Railway dashboard
- Deploy automatically on git push
Environment variables for Railway:
Docker Deployment
Manual Server Setup
- Clone repository
- Install dependencies:
npm ci --production
- Configure environment variables
- Start server:
npm run start-remote
- Configure reverse proxy (nginx/Apache) if needed
Architecture
Security
Best Practices
- Environment variables for all secrets
- Separate token storage per account
- Automatic token refresh
- HTTPS enforcement in production
- CORS configuration for remote access
Token Management
- Tokens stored in
~/.outlook-mcp-accounts/
- Automatic refresh before expiration
- Secure token storage with unique account IDs
- Cleanup on account removal
Troubleshooting
Common Issues
"No accounts configured"
- Solution: Use
authenticate
tool to add an account
"Authentication required for account X"
- Solution: Re-authenticate the specific account
CORS errors in browser
- Solution: Check CORS configuration for your domain
Port already in use
- Solution: Change
MCP_PORT
environment variable
Health Checking
- Local: Use
check-auth-status
tool - Remote: Visit
http://localhost:3001/health
Logs
- Server logs to stderr
- Authentication events logged with account IDs
- Error details for debugging
Development
Prerequisites
- Node.js 14+
- Azure App Registration
- Microsoft Graph API permissions
Scripts
npm start
- Local stdio modenpm run start-remote
- Remote HTTP modenpm run auth-server
- Start OAuth server onlynpm run test-mode
- Run with mock datanpm run inspect
- Run with MCP inspector
Contributing
- Fork the repository
- Create feature branch
- Make changes with tests
- Update documentation
- Submit pull request
License
MIT License - see LICENSE file for details.
Support
- GitHub Issues: Report bugs
- Documentation: This README
- MCP Protocol: modelcontextprotocol.io
- Microsoft Graph: docs.microsoft.com/graph
This server cannot be installed
Provides Claude with access to Microsoft Outlook through the Microsoft Graph API, enabling management of emails, calendar events, and folders across multiple accounts.
Related MCP Servers
- AsecurityAlicenseAqualityThe Outlook Calendar MCP enables Claude to directly manage Microsoft Outlook calendars on Windows systems, offering a privacy-focused solution that keeps all data local. Users can view events, create meetings, find free time slots, and manage multiple calendars without their data leaving their machiLast updated -730025MIT License
- AsecurityFlicenseAqualityA Model Context Protocol tool that enables Claude to interact with Microsoft Outlook for macOS, allowing users to read/send emails, manage calendar events, and access contacts through natural language commands.Last updated -315TypeScript
- -securityAlicense-qualityEnables management of Azure Cloud PCs using the Microsoft Graph API, allowing users to list available Cloud PCs in their tenant through Claude Desktop.Last updated -PythonMIT License
- -securityFlicense-qualityConnects Claude with Microsoft Outlook through the Graph API, providing comprehensive email, calendar, folder management, and rules creation capabilities.Last updated -10JavaScript