MS 365-21V MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MS_CLIENT_ID | No | The Application (client) ID of the MCP API app registration. | |
| MS_TENANT_ID | No | The tenant ID of the Microsoft 365 operated by 21Vianet tenant. | |
| MCP_HTTP_HOST | No | The host to bind the HTTP server to. Default is 0.0.0.0. | 0.0.0.0 |
| MCP_HTTP_PATH | No | The path for the Streamable HTTP endpoint. Default is /mcp. | /mcp |
| MCP_HTTP_PORT | No | The port for the HTTP server. Default is 3000. | 3000 |
| MCP_SEND_MODE | No | Send mode for mail/Teams: confirm or automatic. Default is confirm. | confirm |
| MCP_ADMIN_TOKEN | No | A long random value for admin endpoints. | |
| MS_CLIENT_SECRET | No | The client secret for the MCP API app, used for OBO. | |
| MS_AUTHORITY_HOST | No | The Entra authority host for 21V. Use https://login.partner.microsoftonline.cn or https://login.chinacloudapi.cn depending on tenant. | |
| MS_GRAPH_BASE_URL | No | The Microsoft Graph base URL for China, e.g. https://microsoftgraph.chinacloudapi.cn/v1.0 | |
| MCP_TOKEN_AUDIENCE | No | The expected audience of the access token, e.g. api://<API_CLIENT_ID> | |
| MS_OAUTH_CLIENT_ID | No | The Application (client) ID of the Web login app. Leave empty for single-app mode. | |
| MCP_PUBLIC_BASE_URL | No | The public base URL of the MCP service, without /mcp. e.g. https://mcp.example.cn | |
| MCP_AUDIT_LOG_ENABLED | No | Enable audit logging. Default is true. | true |
| MCP_CONFIRM_OPERATIONS | No | Comma-separated operations that require confirmation, e.g. delete, create-calendar, etc. | |
| MCP_TOOL_EXPOSURE_MODE | No | Tool exposure mode: direct, discovery, or hybrid. Default is hybrid. | hybrid |
| MS_OAUTH_CLIENT_SECRET | No | The client secret for the Web login app. Leave empty for single-app mode. | |
| MCP_AUTHORIZATION_SCOPES | No | The scope(s) required for MCP API access, e.g. api://<API_CLIENT_ID>/access_as_user | |
| MCP_OAUTH_BRIDGE_ENABLED | No | Whether the OAuth bridge is enabled. Default is true. | true |
| MCP_ROLE_BASED_FILTERING | No | Enable App Role based tool filtering. Default is false. | false |
| MCP_DISABLED_GRAPH_SCOPES | No | Comma-separated list of Graph scopes to disable for tools. | |
| MCP_REQUIRED_TOKEN_SCOPES | No | The required token scopes, e.g. access_as_user | |
| MCP_OAUTH_BRIDGE_MICROSOFT_CLIENT_TYPE | No | The type of the Microsoft OAuth client. Default is confidential_web. | confidential_web |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| auth_start_device_loginA | Development only. Start a 21V Entra device-code login and cache the result locally. Chinese intents / 中文意图: 本地登录, 设备代码登录, 开发调试登录. |
| auth_complete_device_loginA | Development only. Poll the token endpoint after the user enters the device code, then cache the token locally. Token values are not returned. Chinese intents / 中文意图: 完成本地登录, 完成设备码登录, 保存本地令牌. |
| auth_statusA | Inspect MCP auth state, local token state, remote OAuth/OBO configuration, and current request user details. Token values are never returned. Chinese intents / 中文意图: 查看认证状态, 检查登录状态, 诊断授权问题. |
| auth_clear_local_cacheA | Development only. Delete locally cached tokens and pending device-code login state. Chinese intents / 中文意图: 清除本地登录, 退出本地登录, 删除缓存令牌. |
| confirm_executeA | Continue a pending sensitive operation after the same signed-in user approved its web preview. This tool never grants approval itself. Call it only after the user says the confirmation page was approved; the token is user-bound, one-time, and short-lived. Chinese intents / 中文意图: 继续执行我刚刚在网页确认的操作, 执行已批准的敏感操作. |
| mail_list_messagesA | List mail newest first with sender, recipients, preview, read and flag state. Filter by folder (inbox by default, or all), time window, unread, flagged, importance or sender address. Use mail_search_messages for keywords. Requires delegated Mail.Read. Chinese intents / 中文意图: 查看我的邮件, 看最近邮件, 查看未读邮件, 查看标旗邮件, 某段时间的邮件, 列出收件箱邮件. |
| mail_search_messagesA | Search mail by keywords with KQL, for example "budget", "from:Zhang Wei", "subject:review", "hasAttachments:true". Searches all folders unless folder is set. Requires delegated Mail.Read. Chinese intents / 中文意图: 搜索邮件, 按关键词查邮件, 查找某人发的邮件, 查找某封邮件. |
| mail_get_messageA | Read one message as plain text with recipients and attachment list. onlyNewContent drops quoted earlier mails; long bodies continue with offset. Requires delegated Mail.Read. Chinese intents / 中文意图: 查看邮件详情, 读取邮件正文, 查看邮件内容, 查看邮件附件列表. |
| calendar_list_viewA | List meetings and events, including recurring instances, in a date-time range: subject, time, location, organizer, my response, attendees and cancellation state. Requires delegated Calendars.Read. Chinese intents / 中文意图: 查看今天的会议, 按时间范围查看日历, 查看明天日程, 查看本周会议, 展开重复日程. |
| files_searchA | Find documents across OneDrive and SharePoint sites the signed-in user can open, by keywords in name or content. Filter by site, file type and modification date. Returns location, last editor, webUrl, driveId and itemId for files_get_download_url. SharePoint results also require the mcp.sharepoint App Role. Chinese intents / 中文意图: 搜索文档, 查找SharePoint文件, 查找OneDrive文件, 找某个项目的Word或PDF, 搜索网盘文件. |
| files_get_download_urlA | Resolve a OneDrive or SharePoint file from a link pasted in chat or mail, or from driveId and itemId, and return a short-lived pre-authenticated download URL for the client to fetch and parse. format pdf converts Office files to PDF first. Small plain-text files also return their text inline. SharePoint files also require the mcp.sharepoint App Role. Chinese intents / 中文意图: 打开SharePoint链接, 读取文档内容, 下载文件, 获取文件下载地址, 把Word转成PDF. |
| teams_list_chatsA | List one-on-one, group and meeting Teams chats, most recently active first, with member names and the last message. Use since to keep only chats with new messages, and query to find a chat by person or topic. Requires delegated Chat.Read. Chinese intents / 中文意图: 查看Teams聊天, 找和某人的聊天, 最近有新消息的聊天, 查看群聊和私聊, 列出Teams会话. |
| teams_list_chat_messagesA | Read messages in a Teams chat as plain text, oldest first within a page, with sender, @mentions and shared files. Supports a since/until window and nextCursor for older messages. Requires delegated Chat.Read. Chinese intents / 中文意图: 查看Teams聊天消息, 读取聊天记录, 查看群聊消息, 看某段时间的聊天. |
| gateway_search_toolsA | Search the signed-in user's authorized Microsoft 365 tools by English or Chinese intent, for anything the directly exposed tools do not cover (sending, scheduling, OneDrive and SharePoint management, contacts, users...). Top results include their input schema. Chinese intents / 中文意图: 搜索可用工具, 查找能完成任务的工具, 发现更多Microsoft 365能力. |
| gateway_get_tool_schemaA | Get the exact input schema and authorization metadata for a tool returned by gateway_search_tools. Chinese intents / 中文意图: 查看工具参数, 获取工具Schema, 确认工具需要哪些参数. |
| gateway_execute_toolA | Execute a tool returned by gateway_search_tools with parameters matching its inputSchema. The target tool is rechecked for App Roles, confirmation policy, audit, and Graph scope controls. Invalid parameters return the expected schema. Chinese intents / 中文意图: 执行搜索到的工具, 调用长尾工具, 执行Microsoft 365操作. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 16 tools
Most tools target distinct resources and actions (mail_list/search/get, teams_list_chats vs teams_list_chat_messages, auth_* lifecycle). The only mild overlap is gateway_search_tools already returning schemas while gateway_get_tool_schema exists for explicit schema retrieval, and gateway_execute_tool vs confirm_execute for executing operations, but descriptions clarify the boundaries.
Names follow a predictable domain_verb_noun snake_case pattern (mail_list_messages, calendar_list_view, files_get_download_url, gateway_search_tools). Minor deviations like auth_status (noun-only) and confirm_execute (no domain prefix) are readable and don't break the overall convention.
16 tools is slightly above the ideal 3-15 range but well justified by the breadth of Microsoft 365 domains covered (auth, mail, calendar, files, teams, gateway). The gateway pattern lets a small curated set extend to a long tail without bloating the direct surface.
Core read workflows are fully covered per domain (mail list/search/get, calendar list view, files search/download, teams chats/messages) plus a complete auth lifecycle. Write operations (send mail, create calendar events, upload files) are not directly exposed but are discoverable and executable through gateway_search_tools/gateway_execute_tool, so only minor gaps remain.