Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
MCP server for Claude and Microsoft 365
This server exposes Microsoft 365 actions to Claude through MCP. It includes tools for Outlook email and calendar, OneDrive files, mail folders and rules, and Power Automate flows. Authentication is handled through OAuth and tokens are stored locally.
Builders who want Claude to read email, manage calendars, and move files in Microsoft 365.
You can ask Claude to work with your Outlook, OneDrive, and Power Automate data instead of switching between apps.
What it does
Outlook email tools
List, search, read, send, and mark emails as read or unread.
Calendar tools
List, create, accept, decline, cancel, and delete calendar events.
Folder and rules tools
List and create mail folders, move emails, and manage inbox rules.
OneDrive tools
List, search, download, upload, share, and organize OneDrive files and folders.
Power Automate tools
List environments and flows, trigger flows, view run history, and toggle flows on or off.
OAuth token handling
Stores and refreshes Microsoft Graph and Flow API tokens through the `auth/` modules.
Test mode
Supports mock data and test scripts so you can try the server without live API calls.
How to get it
- 1Run
npm install
README
M365 Assistant MCP Server
A comprehensive MCP (Model Context Protocol) server that connects Claude with Microsoft 365 services through the Microsoft Graph API and Power Automate API.
Supported Services
- Outlook - Email, calendar, folders, and rules
- OneDrive - Files, folders, search, and sharing
- Power Automate - Flows, environments, and run history
Directory Structure
├── index.js # Main entry point
├── config.js # Configuration settings
├── auth/ # Authentication modules
│ ├── index.js # Authentication exports
│ ├── token-manager.js # Token storage and refresh (Graph + Flow)
│ └── tools.js # Auth-related tools
├── calendar/ # Calendar functionality
│ ├── index.js # Calendar exports
│ ├── list.js # List events
│ ├── create.js # Create event
│ ├── delete.js # Delete event
│ ├── cancel.js # Cancel event
│ ├── accept.js # Accept event
│ └── decline.js # Decline event
├── email/ # Email functionality
│ ├── index.js # Email exports
│ ├── list.js # List emails
│ ├── search.js # Search emails
│ ├── read.js # Read email
│ ├── send.js # Send email
│ └── mark-as-read.js # Mark email read/unread
├── folder/ # Folder functionality
│ ├── index.js # Folder exports
│ ├── list.js # List folders
│ ├── create.js # Create folder
│ └── move.js # Move emails
├── rules/ # Email rules functionality
│ ├── index.js # Rules exports
│ ├── list.js # List rules
│ └── create.js # Create rule
├── onedrive/ # OneDrive functionality
│ ├── index.js # OneDrive exports
│ ├── list.js # List files/folders
│ ├── search.js # Search files
│ ├── download.js # Get download URL
│ ├── upload.js # Simple upload (<4MB)
│ ├── upload-large.js # Chunked upload (>4MB)
│ ├── share.js # Create sharing link
│ └── folder.js # Create/delete folders
├── power-automate/ # Power Automate functionality
│ ├── index.js # Power Automate exports
│ ├── flow-api.js # Flow API client
│ ├── list-environments.js # List environments
│ ├── list-flows.js # List flows
│ ├── run-flow.js # Trigger flow
│ ├── list-runs.js # Run history
│ └── toggle-flow.js # Enable/disable flow
└── 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 (+ Flow API for Power Automate)
- Email Management: List, search, read, send, and organize emails
- Calendar Management: List, create, accept, decline, and delete calendar events
- OneDrive Integration: List, search, upload, download, and share files
- Power Automate: List environments/flows, trigger flows, view run history
- Modular Structure: Clean separation of concerns for maintainability
- Test Mode: Simulated responses for testing without real API calls
Available Tools
Outlook (Email & Calendar)
| Tool | Description |
|---|---|
list-emails | List recent emails from inbox |
search-emails | Search emails with filters |
read-email | Read email content |
send-email | Send a new email |
mark-as-read | Mark email as read/unread |
list-events | List calendar events |
create-event | Create calendar event |
accept-event | Accept event invitation |
decline-event | Decline event invitation |
delete-event | Delete calendar event |
list-folders | List mail folders |
create-folder | Create mail folder |
move-emails | Move emails between folders |
list-rules | List inbox rules |
create-rule | Create inbox rule |
OneDrive
| Tool | Description |
|---|---|
onedrive-list | List files in a path |
onedrive-search | Search files by query |
onedrive-download | Get download URL |
onedrive-upload | Upload small file (<4MB) |
onedrive-upload-large | Chunked upload (>4MB) |
onedrive-share | Create sharing link |
onedrive-create-folder | Create folder |
onedrive-delete | Delete file or folder |
Power Automate
| Tool | Description |
|---|---|
flow-list-environments | List Power Platform environments |
flow-list | List flows in environment |
flow-run | Trigger a manual flow |
flow-list-runs | Get flow run history |
flow-toggle | Enable/disable a flow |
Quick Start
- Install dependencies:
npm install - Azure setup: Register app in Azure Portal (see detailed steps below)
- Configure environment: Copy
.env.exampleto.envand add your Azure credentials - Configure Claude: Update your Claude Desktop config with the server path
- Start auth server:
npm run auth-server - Authenticate: Use the authenticate tool in Claude to get the OAuth URL
- Start using: Access your M365 data through Claude!
Installation
Prerequisites
- Node.js 14.0.0 or higher
- npm or yarn package manager
- Azure account for app registration
Install Dependencies
npm install
Azure App Registration & Configuration
App Registration
- Open Azure Portal
- Search for "App registrations"
- Click "New registration"
- Name: "M365 MCP Server"
- Account type: "Accounts in any organizational directory and personal Microsoft accounts"
- Redirect URI: Web →
http://localhost:3333/auth/callback - Click "Register"
- Copy the "Application (client) ID" for your
.envfile
App Permissions
- Go to "API permissions" under Manage
- Click "Add a permission" → "Microsoft Graph" → "Delegated permissions"
- Add these permissions:
offline_accessUser.ReadMail.Read,Mail.ReadWrite,Mail.SendCalendars.Read,Calendars.ReadWriteFiles.Read,Files.ReadWrite
- Click "Add permissions"
For Power Automate (optional):
- Requires additional Azure AD configuration with Flow API scope
- See Power Automate section below for details
Client Secret
- Go to "Certificates & secrets" → "Client secrets"
- Click "New client secret"
- Add description and select expiration
- Copy the VALUE (not the Secret ID)
Configuration
1. Environment Variables
cp .env.example .env
Edit .env:
# Get these values from Azure Portal > App Registrations > Your App
MS_CLIENT_ID=your-application-client-id-here
MS_CLIENT_SECRET=your-client-secret-VALUE-here
MS_TENANT_ID=your-tenant-id-here
USE_TEST_MODE=false
Important Notes:
- Use
MS_CLIENT_IDandMS_CLIENT_SECRETin the.envfile - Set
MS_TENANT_IDfor single-tenant apps to avoid/commonendpoint errors - For Claude Desktop config, you'll use
OUTLOOK_CLIENT_IDandOUTLOOK_CLIENT_SECRET - Always use the client secret VALUE, never the Secret ID
2. Claude Desktop Configuration
Add to your Claude Desktop config:
{
"mcpServers": {
"m365-assistant": {
"command": "node",
"args": ["/path/to/outlook-mcp/index.js"],
"env": {
"USE_TEST_MODE": "false",
"OUTLOOK_CLIENT_ID": "your-client-id",
"OUTLOOK_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Authentication
Graph API (Outlook + OneDrive)
- Start auth server:
npm run auth-server - Use the
authenticatetool in Claude - Visit the provided URL and sign in
- Tokens saved to
~/.outlook-mcp-tokens.json
Power Automate (Optional)
Power Automate requires a separate token with the Flow API scope. Configure additional Azure AD permissions for https://service.flow.microsoft.com//.default scope.
Limitations:
- Only solution-aware flows are accessible
- Only manual trigger flows can be run via API
- Requires environment ID for most operations
Troubleshooting
Common Issues
"Cannot find module"
npm install
"Port 3333 in use"
npx kill-port 3333
npm run auth-server
"Invalid client secret" (AADSTS7000215)
- Use the secret VALUE, not the Secret ID
"Authentication required"
- Delete
~/.outlook-mcp-tokens.jsonand re-authenticate
Testing
# Run with MCP Inspector
npm run inspect
# Run in test mode (mock data)
npm run test-mode
# Run Jest tests
npm test
Extending the Server
- Create new module directory
- Implement tool handlers in separate files
- Export tool definitions from module index
- Import and add to
TOOLSarray inindex.js
Files in the repo
- .github
- auth
- calendar
- email
- folder
- onedrive
- power-automate
- rules
- test
- utils
- .env.example
- .gitignore
- backup-logs.sh
- claude-config-sample.json
- CLAUDE.md
- config.js
- create-notifications-rule.js
- debug-env.js
- find-folder-ids.js
- index.js
- move-github-emails.js
- outlook-auth-server.js
- package-lock.json
- package.json
- README.md
- test-config.js
- test-direct.sh
- test-modular-server.sh
- test-pagination.js
- yarn.lock
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More connectors

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
BankMCP™: your AI can now read your bank. Self-hosted, read-only MCP server for your own bank accounts via open banking (Enable Banking). Standard MCP; tested with Claude and Ollama.
Open-source auth gateway connecting 1400+ SaaS providers to AI agents through SDK, CLI, MCP, HTTP, and OpenAPI.
