m365-organizer
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@m365-organizercreate a Jobs folder and move all @linkedin.com emails into it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Built to turn an inbox of 52,000 unread notifications into fourteen folders in one afternoon, and to give Claude Code (or any MCP client) the organising tools that mail-reading MCP servers leave out.
🟧 What it adds
Tool | What it does |
| Every folder with path, total and unread counts |
| Create nested paths like |
| Top senders and domains in a folder, the input for a plan |
| Bulk-move existing mail from addresses or |
| Server-side inbox rules so future mail files itself |
| OneDrive listing, nested folders, moves |
Teams is not covered. Graph refuses Teams endpoints for personal accounts ("requires a valid license").
Related MCP server: Microsoft 365 MCP Server
🟧 Setup
1 · Entra app registration (free, three minutes)
In the Azure portal create an app with Supported account types = Personal Microsoft accounts only, no redirect URI, and under Authentication → Advanced settings set Allow public client flows = Yes.
Delegated Graph permissions are requested at runtime: Mail.ReadWrite MailboxSettings.ReadWrite Files.ReadWrite.All User.Read.
2 · Install
pip install git+https://github.com/Denovarix/denovarix-m365-organizerOn Windows, enable long paths first if pip fails on deep package paths (admin PowerShell):
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled 13 · Configure ~/.m365-organizer/config.json (see examples/config.example.json)
{ "client_id": "YOUR-ENTRA-APP-CLIENT-ID", "tenant_id": "consumers" }4 · Sign in once with the device-code flow. Tokens are cached in ~/.m365-organizer/token_cache.bin.
m365-organizer auth5 · Add to Claude Code
claude mcp add --scope user m365-organizer -- m365-organizer serve🟧 Organise a mailbox from the command line
python examples/apply_plan.py examples/plan.example.json # folders + rules + move backlog
python examples/apply_plan.py examples/plan.example.json --no-move # folders + rules onlyA plan is a JSON map of folder path to senders. Domains start with @, addresses do not:
{
"Jobs & Freelance/LinkedIn": ["@linkedin.com"],
"Finance/Banking": ["@axisbank.com", "@icicibank.com"],
"Personal": ["someone@example.com"]
}The script is idempotent: existing folders and rules are reused, and moves only touch what is still in the Inbox.
🟧 Layout
m365_organizer/graph.py MSAL device-code auth, retry/backoff, paging, $batch
m365_organizer/mail.py folders, sender stats, bulk move, inbox rules
m365_organizer/drive.py OneDrive list / mkdir -p / move
m365_organizer/server.py MCP server + `auth` / `serve` CLI
examples/ config and plan examples, apply_plan.py
assets/ brand assets (banner, social preview, icons)This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Your Gmail, Calendar, Drive, GitHub, Oura, wallet and confirmed profile facts in any MCP client.
Related MCP Servers
- AlicenseAqualityCmaintenance22 consolidated MCP tools for email, calendar, contacts, folders, rules, categories, and settings with safety controls (dry-run preview, rate limiting, recipient allowlists) and MCP annotations on every tool. Works with personal Outlook.com and work/school Microsoft 365 accounts.22504 npm39MIT
- AlicenseCqualityNot gradedmaintenanceAn MCP server that enables interaction with Microsoft 365 services like Outlook, OneDrive, Teams, and SharePoint via the Microsoft Graph API. It supports comprehensive operations including email management, file access, and organizational collaboration for personal and work accounts.78-
- AlicenseNot gradedqualityDmaintenanceMCP server providing full control over Outlook.com, Hotmail, Live, or Microsoft 365 email via Microsoft Graph API, enabling reading, searching, sending, and managing messages and folders securely.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables personal Outlook/Hotmail/Live account email management through Microsoft Graph, letting users list, search, read, and delete emails (with confirmation) via MCP.ISC