# MS 365-21V MCP Server

Connects AI tools to the 21Vianet China Microsoft 365 cloud. It exposes Outlook mail, calendar events, and OneDrive files using delegated permissions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 89
- Author: mdwsk88
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mdwsk88/ms-365-21v-mcp-server
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/mcp/ms-365-21v-mcp-server

## What it does

This server bridges AI tools to China-specific Entra ID and Microsoft Graph endpoints managed by 21Vianet. It uses delegated user permissions to inspect Outlook mailboxes and query OneDrive storage. The integration respects existing tenant access limits. Standard global Microsoft 365 tenants cannot use this server.

The service uses a Streamable HTTP interface with an OAuth bridge. It supports scope filtering alongside an explicit write-confirmation mode. Deployment runs on Node.js 22+ or via the container image `ghcr.io/mdwsk88/ms-365-21v-mcp-server:v0.2.0`. The `npm run doctor` command performs offline sanity checks on environment parameters before startup.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add ms-365-21v-mcp-server -- docker run -i --rm ghcr.io/mdwsk88/ms-365-21v-mcp-server:v0.2.0
```

### Codex

**Platform CLI**
```bash
codex mcp add ms-365-21v-mcp-server -- docker run -i --rm ghcr.io/mdwsk88/ms-365-21v-mcp-server:v0.2.0
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ms-365-21v-mcp-server": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/mdwsk88/ms-365-21v-mcp-server:v0.2.0"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ms-365-21v-mcp-server": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/mdwsk88/ms-365-21v-mcp-server:v0.2.0"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add ms-365-21v-mcp-server docker run -i --rm ghcr.io/mdwsk88/ms-365-21v-mcp-server:v0.2.0
```

## When to use it
- fetch unread messages from 21Vianet mailboxes
- detect scheduling conflicts across calendar entries
- locate documents stored inside corporate OneDrive folders
- compose email replies with human approval prior to delivery

## Example prompts
- Retrieve my profile and verify the authenticated account.
- List the latest 5 emails showing only subject and sender.
- Check tomorrow's calendar for overlapping meetings.

## Similar
- [Microsoft 365 SharePoint](https://affpapa.org/en/nevibecode/mcp/microsoft-365-sharepoint.md) — MCP server · ★ 13
- [msgraph-sdk](https://affpapa.org/en/nevibecode/skills/msgraph-sdk.md) — skill · 57 installs
- [msgraph](https://affpapa.org/en/nevibecode/skills/msgraph.md) — skill · 1400 installs
- [Microsoft 365 Calendar](https://affpapa.org/en/nevibecode/mcp/microsoft-365-calendar.md) — MCP server · ★ 13
- [Microsoft 365 MCP Server](https://affpapa.org/en/nevibecode/mcp/microsoft-365-mcp-server.md) — MCP server · ★ 1085
- [entra-agent-id](https://affpapa.org/en/nevibecode/skills/entra-agent-id.md) — skill · 69 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
