MS 365-21V MCP Server
An MCP gateway with OAuth, Entra roles and send confirmation for 21Vianet Microsoft 365: mail, calendar, files, Teams
- 90 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- Reads the user's mail, calendar, files and Teams messages and can send mail on their behalf
- Tokens and data pass through a server deployed by the administrator, with Entra scopes and confirm mode limiting rights
Install
- Works in
Manual install
{"mcpServers":{"ms365-21v":{"type":"http","url":"https://your-mcp-host.example.cn/mcp"}}}Replace the address with the one the administrator gives you, then `/mcp` and sign in through OAuth.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Reads the user's mail, calendar, files and Teams messages and can send mail on their behalf
- Tokens and data pass through a server deployed by the administrator, with Entra scopes and confirm mode limiting rights
This is third-party code. Review the repository files before installing.
What it does
The server lets MCP clients work as the user with Microsoft 365 operated by 21Vianet in China: mail reading and search, a calendar with conflict checks, OneDrive and SharePoint search, Teams, contacts, organization users and Microsoft Search. It is built around the Entra 21V and Microsoft Graph China endpoints and does not just swap domains of the global version. A client connects through one Streamable HTTP address with an OAuth bridge, and the server uses the user's delegated permissions (OBO). Tools are filtered by module and scope, roles come from Entra App Roles, mail writing runs in confirm mode with `MCP_SEND_MODE=confirm` and the audit redacts sensitive data. The first run exposes only a profile query. An administrator deploys the service (Node.js 22 and Entra) and users add the issued address to Claude Code through `.mcp.json` or to Claude Desktop as a custom connector.
Who it is for. Enterprise users and administrators of Microsoft 365 tenants operated by 21Vianet in China who need agent access to mail, calendar and files with permission control.
Good fit when
- The agent must show the five latest emails with subject and sender from your 21V mailbox
- You need to check whether tomorrow's meetings conflict in time
- A project plan file must be found in OneDrive and SharePoint
- The agent drafts a reply and sending requires your confirmation
Not a fit when
- You have global Microsoft 365 or a personal Outlook: the server does not fit them
- There is no administrator to deploy the service and grant permissions
- You want a ready cloud service with no self-hosting
Example request
Show the five latest emails from my mailbox with just subject and sender, and prepare a reply to the latest one and send it after my confirmationMCP
- Transport
- http
- Authentication
- OAuth
Environment variables
MCP_SEND_MODE- Mail send mode, the confirm value requires confirmation before sending
Limitations
- A Microsoft 365 tenant operated by 21Vianet is required, and an administrator creates the Entra app, consents to permissions and assigns roles. The server is not meant for the global version.
- A tool implemented in code does not mean your tenant allowed it: only modules and scopes granted by the administrator are available.
- The server deploys on Node.js 22 or newer, and its address must be reachable by the client; Claude Desktop and cloud connectors need a public address and not `localhost`.
- The project is unofficial and not affiliated with Microsoft or 21Vianet.
How to disable. Remove the `ms365-21v` entry from `.mcp.json` or disable the connector in Claude Desktop. An administrator revokes the Entra app access in their tenant.
FAQ
How do I connect the server to Claude Code?
The administrator gives an HTTPS address. Add an `ms365-21v` entry to `.mcp.json` with type `http` and that address, start Claude Code and run `/mcp` to sign in through OAuth.
Do I need to create the Entra app myself?
No, the administrator creates the app during deployment. The client does not need a client id and secret entered by hand.
What data does the server expose?
Only what the user already has permissions for: the server acts as the user with delegated permissions. Connecting MCP grants no new rights.
How is sending email protected?
`MCP_SEND_MODE=confirm` requires confirmation before sending, and the audit log redacts sensitive data.
Does it work with global Microsoft 365?
No. The server is built for 21Vianet tenants and the Entra 21V and Microsoft Graph China endpoints. The global cloud needs a different server.
Discussion
No questions or reviews yet.
Related
MCP serversAn MCP server that gives the agent access to mail, calendar, OneDrive files and Power Automate flows through Microsoft Graph
Microsoft 365 MCP Server
ms-365-mcp-server
An unofficial MCP server for Microsoft 365 and Office through the Graph API: mail, files, calendar, sign-in with a Microsoft account and an organization mode
An MCP server that turns a plain request into CLI for Microsoft 365 command chains: SharePoint, Teams, Planner, Power Platform.
An MCP server giving agents a mailbox: send mail, read recent messages, auto setup for QQ, 163, Outlook and enterprise mail.
MCP email server over IMAP and SMTP: an agent searches, reads, sorts and sends mail across several mailboxes
Email MCP: Yandex, Mail.ru and other providers
Email MCP Server
An HTTP/SSE wrapper around an IMAP MCP server for remote mailbox access from Claude Web: read, search, send, across 15 providers
README in short
The README explains that the server connects MCP clients to Microsoft 365 operated by 21Vianet while keeping permissions and confirmations. It gives a quick start for Claude Code and Claude Desktop, a scenario table with enabling conditions, reasons for a separate 21V version and paths for the administrator. An English version exists.