Microsoft MCP Server for Enterprise

io.github.microsoft由 GitHub 账号 microsoft 发布v1.0.0更新于 Nov 2, 2026

Official Microsoft MCP Server to query Microsoft Entra data using natural language

发布方自己的服务:Microsoft Learn MCP

已验证Streamable HTTP可网页运行数据库云端与基础设施安全与监控

概览

AI 生成的概览

微软官方远程 MCP 服务器,可将自然语言转为只读的 Microsoft Graph 调用,让助手查询 Microsoft Entra 身份与目录数据。

可以做什么
  • 根据用户意图推荐相关的 Microsoft Graph API 调用
  • 执行只读的 Microsoft Graph 查询,受登录用户角色与客户端已授予范围限制
  • 查询特定 Graph 实体的属性,帮助模型构造查询
  • 覆盖 Entra 场景:安全态势、特权角色与 PIM、应用与服务主体风险、访问治理、设备合规、登录与审计遥测、许可证使用情况
适用场景
适合 IT 管理员和开发者希望在 AI 客户端中直接询问租户的 Entra 身份数据,例如审计特权角色、检查应用所有者与权限、查看设备合规状态,而无需手写 Graph 查询。
运行要求
使用位于 mcp.svc.cloud.microsoft/enterprise 的远程端点并通过 OAuth 登录,无需本地安装包。需在租户中一次性预配 MCP 服务器服务主体,并注册 MCP 客户端应用,配置所需的 MCP.* 范围与匹配的重定向 URI;不支持 DCR,第三方客户端需自备客户端 ID。设置需要 Entra 管理员角色和 PowerShell 模块;访问的数据需相应 Entra 许可证。
安装前请注意
设置过程需要 Application.ReadWrite.All、DelegatedPermissionGrant.ReadWrite.All 等较宽的管理员权限;应只授予所需的 MCP.* 范围,并在预配后撤销仅用于设置的授权。访问为委派权限,结果取决于登录用户的角色。查询内容与返回的租户数据会发送给 AI 客户端,需审阅其数据保留策略。每用户每分钟限 100 次请求。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Microsoft MCP Server for Enterprise,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.microsoft%2FEnterpriseMCP/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "microsoft-for-enterprise": {
      "type": "http",
      "url": "https://mcp.svc.cloud.microsoft/enterprise"
    }
  }
}

README

[Microsoft MCP Server for Enterprise Logo] Microsoft MCP Server for Enterprise

Overview

Built on the open Model Context Protocol, the public preview of Microsoft MCP Server for Enterprise lets AI agents access Microsoft Entra data by converting natural language queries into Microsoft Graph API calls. Developers and IT administrators use it to query Microsoft Entra data from their AI-powered workflows.

Full Documentation: Overview of Microsoft MCP Server for Enterprise

MCP Server Provisioning (execute once per tenant)

To set up the MCP Server for your tenant:

  1. Provision the MCP Server. In Graph Explorer, send:
    POST https://graph.microsoft.com/v1.0/servicePrincipals
    Body: { "appId": "e8c77dc2-69b3-43f4-bc51-3213c9d915b4" }

  2. Register a new app, representing the MCP Client.
    Set the appropriate Redirect URI (also called Reply URL) depending on the client (see table below).

    Redirect URI type matters in Microsoft Entra. If you add the URI under Web, Entra treats the app as a confidential client. Use that for apps that run on a server and can protect credentials (like Copilot Studio). At sign-in, Entra expects that app to authenticate with a client_secret or a certificate-based client_assertion.
    If you add the URI under Mobile and desktop applications or another public-client platform, Entra treats the app as a public client. Use that for desktop, CLI, or device apps that cannot keep a secret (like ChatGPT or Claude). These apps usually use the authorization code flow with PKCE instead of a client secret.

  3. Associate the MCP permissions (MCP.<Microsoft_Graph_Scope>) between the MCP Server and the MCP Client
    [Associate MCP Client Permissions]

Create a custom VS Code or GitHub Copilot CLI client with PowerShell

After provisioning the MCP Server in step 1, use Microsoft.Entra.Beta 1.3.0 or later and an appropriate administrator role to create a public client and grant the scopes you need. This example grants user read access. Set $redirectUri to http://localhost for VS Code or http://127.0.0.1:51001 for GitHub Copilot CLI:

powershell
Connect-Entra -Scopes 'Application.ReadWrite.All', 'DelegatedPermissionGrant.ReadWrite.All' -ErrorAction Stop$redirectUri = 'http://localhost'$app = New-EntraBetaApplication -DisplayName 'Enterprise MCP Client' `    -SignInAudience 'AzureADMyOrg' `    -PublicClient @{ RedirectUris = @($redirectUri) } -ErrorAction Stop$app.AppIdGrant-EntraBetaMCPServerPermission -ApplicationId $app.AppId -Scopes 'MCP.User.Read.All' -ErrorAction Stop

Use the returned app ID in the VS Code or GitHub Copilot CLI custom client configuration. The grant cmdlet provisions the client service principal if needed.

The PowerShell setup uses Application.ReadWrite.All, DelegatedPermissionGrant.ReadWrite.All, and an appropriate Entra administrator role. The MCP Client doesn't need these setup permissions at runtime: you can revoke setup-only grants and release setup-only roles after provisioning. Managing consent later requires administrator authorization again.

Info Table

PropertyValueNotes
MCP Endpointhttps://mcp.svc.cloud.microsoft/enterpriseConfigure in your agent or mcp.json
MCP Server App Ide8c77dc2-69b3-43f4-bc51-3213c9d915b4Used for provisioning and telemetry
MCP Client App Id<The one you registered in your tenant>Required to configure your agent
App Redirect URI (Reply URL)VS Code (custom client): http://localhost
GitHub Copilot CLI (custom client): http://127.0.0.1:51001
Claude Desktop: https://claude.ai/api/mcp/auth_callback
ChatGPT: https://chatgpt.com/connector/oauth/<random_chars>
Refer to ChatGPT config for the random chars
Microsoft Foundry: https://<random_chars>.<region>.azurecontainerapps.io/rest/oauth2-credential/callback
Refer to Foundry config for random chars
Required on your app registration
Token URLhttps://login.microsoftonline.com/organizations/oauth2/v2.0/tokenRequired in some agents config
Token endpoint auth methodclient_secret_postRequired in some agents config
Auth URLhttps://login.microsoftonline.com/organizations/oauth2/v2.0/authorizeRequired in some agents config
Refresh URLhttps://login.microsoftonline.com/organizations/oauth2/v2.0/tokenRequired in some agents config
Scopesapi://e8c77dc2-69b3-43f4-bc51-3213c9d915b4/.defaultRequired in some agents config

VS Code's default client uses a pre-registered application with its own redirect URIs. To add an HTTP 127.0.0.1 URI to a custom app through the portal, use the application manifest.

Tools

This MCP Server uses Retrieval-Augmented Generation (RAG) and few-shot prompting to generate complete Microsoft Graph queries rather than exposing a separate tool per Graph operation.
It exposes three tools:

  1. microsoft_graph_suggest_queries: Finds relevant Microsoft Graph API calls based on user intent.
  2. microsoft_graph_get: Executes read-only Microsoft Graph API calls, respecting User roles and MCP Client scopes.
  3. microsoft_graph_list_properties: Retrieves properties of specific Microsoft Graph entities to help the AI model

Current scope and capabilities

For Public Preview, we support read-only enterprise IT scenarios in Microsoft Entra identity and directory operations (user, group, application, device management, and administrative actions).

The MCP Server handles queries such as:

  1. Security posture: authentication methods/strengths, Conditional Access, Security Defaults.
  2. Privileged access: Who has which directory roles, how assigned (direct vs group), and PIM status.
  3. Application risk: Which Apps / Service Principals exist, who owns them, what permissions/SSO they use, and which are ownerless or external.
  4. Access governance: Who has access to what (users, groups, packages); review decisions, automate joiner/mover/leaver.
  5. Device readiness: Managed/compliant status, join state, OS/version distribution, and stale or inactive devices.
  6. Provenance and investigation: End‑to‑end telemetry (sign‑in, audit, provisioning, network), health alerts, and SLA/availability.
  7. Optimize spending & hygiene: License counts/usage, unused or stale apps/groups, domain configuration and contacts.

Supported Clients and Configurations

The Microsoft MCP Server for Enterprise works with any MCP-compatible client that supports the latest standard.

⚠️ Notes:

  • Dynamic Client Registration (DCR) is not supported, but we are working to support OAuth Client ID Metadata Documents (CIMD) in a future release.
  • ChatGPT, Claude, and other 3P Agents require a custom client Id: register your own MCP Client application in your tenant, assign the required MCP.* scopes, and configure the redirect URIs accordingly.

Microsoft Agent Platforms

Third Party MCP clients

These clients require a custom MCP Client application registered in your tenant. See Authorization and permissions to grant the required MCP.* scopes to your app.

ChatGPT

Go to Settings, Apps, Create App, and fill the dialog:

[ChatGPT Configuration]

Put the App ID of the Registered app in the red box.

Claude

Go to Customize, Connectors, click "+", Add Custom Connector, and fill the dialog:

[Claude Configuration]

Put the App ID of the Registered app in the red box.

Visual Studio Code and GitHub Copilot CLI

By default, Visual Studio Code and GitHub Copilot CLI use the same Visual Studio Code MCP Client app Id. Both can also use a custom client Id.

Prerequisites

These steps provision the Visual Studio Code MCP Client application in your tenant and grant it the MCP permissions.
They're required when either client uses the default application Id. Skip them when using a custom client app instead.

  1. Install Microsoft.Entra.Beta PowerShell module (version 1.0.13 or later, requires PowerShell 7):

    powershell
    Install-Module Microsoft.Entra.Beta -Force -AllowClobber
  2. Connect Microsoft Entra ID to your tenant:

    powershell
    Connect-Entra -Scopes 'Application.ReadWrite.All', 'DelegatedPermissionGrant.ReadWrite.All'
  3. Grant only the MCP scopes your scenarios require to the Visual Studio Code MCP Client app (also used by GitHub Copilot CLI with the default application Id). This example grants user read access:

    powershell
    Grant-EntraBetaMCPServerPermission -ApplicationName VisualStudioCode -Scopes 'MCP.User.Read.All'

Without -Scopes, the cmdlet grants all published scopes. Specifying -Scopes adds to existing grants; revoke unwanted scopes if you previously granted broader access.

Learn more about Grant-EntraBetaMCPServerPermission. For detailed installation help, see the installation instructions.

Microsoft.Entra.Beta is a setup dependency, not a runtime dependency. For a custom client, you can provision the server through Graph Explorer above and manage consent in the Entra admin center.

To avoid module conflicts without changing your installed modules, open a new PowerShell 7 session and save the module and its dependencies to a temporary directory:

powershell
$modulePath = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName())New-Item -ItemType Directory -Path $modulePath | Out-Null$modulePath$env:PSModulePath = $modulePath + [System.IO.Path]::PathSeparator + (Join-Path $PSHOME 'Modules')Save-Module -Name Microsoft.Entra.Beta -Path $modulePathImport-Module Microsoft.Entra.Beta

Run the connection and grant commands above in that session. Close the session when finished and delete the temporary directory shown by $modulePath.

If the Microsoft Graph PowerShell SDK modules conflict with Microsoft.Entra.Beta, run the following and retry from step 1:

powershell
Install-Module Uninstall-GraphUninstall-Graph -All
Visual Studio Code

Option 1. Default (uses the Visual Studio Code app Id)

  1. Complete the Prerequisites above.
  2. Click Install Microsoft MCP Server for Enterprise to launch the MCP install page.
  3. Click the Install button in VS Code and sign in with your account from the tenant above.
  4. If Visual Studio Code displays the error Error getting token from server metadata: Error: Cannot force new registration for a non-dynamic authentication provider., change "microsoft-authentication.implementation" from "msal" to "msal-no-broker" in your Settings: [alt text]

Option 2. Custom MCP Client app Id

  1. Register a custom MCP Client app and grant the required MCP.* scopes. Set http://localhost as the redirect URI under Mobile and desktop applications. VS Code can use a dynamic port, which Entra ignores when matching localhost redirect URIs.

  2. Add the server to your VS Code mcp.json, replacing the client ID:

    json
    {  "servers": {    "mcp-enterprise": {      "type": "http",      "url": "https://mcp.svc.cloud.microsoft/enterprise",      "oauth": {        "clientId": "<REGISTERED_APP_CLIENT_ID>"      }    }  }}
  3. Start the server and sign in with an account from the provisioned tenant.

GitHub Copilot CLI

GitHub Copilot CLI can connect using either the default Visual Studio Code MCP Client app Id or a custom MCP Client app Id you register in your tenant.

Option 1. Default (uses the Visual Studio Code app Id)

  1. Complete the Prerequisites above.

  2. Add the MCP server to Copilot CLI. You can do this interactively with /mcp add:

    bash
    /mcp add

    [GitHub Copilot CLI Configuration]

Option 2. Custom MCP Client app Id

  1. Register your own MCP Client application in your tenant and grant it the required MCP.* scopes (see Authorization and permissions).

  2. Set http://127.0.0.1:51001 as Redirect URI for "Mobile and desktop applications".

  3. Specify your app Id via oauthClientId and oauthPublicClient to true in ~/.copilot/mcp-config.json:

    json
    "mcp-enterprise": {      "type": "http",      "url": "https://mcp.svc.cloud.microsoft/enterprise",      "headers": {},      "tools": [ "*" ],      "oauthClientId": "<REGISTERED_APP_CLIENT_ID>",      "oauthPublicClient": true    }

In either case, sign in with your account from the provisioned tenant when prompted.

For more information, see the GitHub Copilot CLI documentation.

Authorization and permissions

The MCP Server for Enterprise supports delegated permissions only. Access requires both the MCP Client's granted scopes and the signed-in user's permissions and roles. MCP consent doesn't grant access beyond that user's authorization.

Grant only the MCP.* scopes your use cases need. You can use a read-only configuration without granting write scopes. Add scopes as your needs change; consult the Microsoft Graph permissions reference for the corresponding Graph permissions.

Administrators can use per-user consent grants to limit access to selected users.

Use the following cmdlet to list the permissions provided by the MCP Server for Enterprise:

powershell
(Get-EntraBetaServicePrincipal -Property "PublishedPermissionScopes" -Filter "AppId eq 'e8c77dc2-69b3-43f4-bc51-3213c9d915b4'").PublishedPermissionScopes | Where-Object { $_.IsEnabled -eq $true -and $_.AdditionalProperties["isPrivate"] -ne $true } | Select-Object Value, AdminConsentDisplayName | Sort-Object

You can use your own app registration as the MCP Client. Use these cmdlets to manage its granted scopes:

powershell
Grant-EntraBetaMCPServerPermission -ApplicationId "<MCP_Client_Application_Id>" -Scopes "<Scope1>", "<Scope2>", "<...>"Revoke-EntraBetaMCPServerPermission -ApplicationId "<MCP_Client_Application_Id>" -Scopes "<Scope1>", "<Scope2>", "<...>"

Learn more: Manage MCP Server for Enterprise permissions

Advantages

  1. Remote MCP Server: easy to configure and standards-compliant, deployed in the same regions as Microsoft Graph.
  2. IT Admins in control: MCP clients need specific MCP.* scopes (mirroring Microsoft Graph scopes) to access your tenant data.
  3. Simplified architecture: 3 tools cover the workflow instead of one tool per API operation.
  4. High-quality query generation: generates accurate queries from over 500 real-world examples via RAG (Retrieval-Augmented Generation).
  5. Full auditability: all MCP operations run under the same App ID with a specific user agent.
  6. No extra license required: your existing Microsoft Entra and Microsoft Graph API licenses apply.

Availability, Roadmap and feedback

The Microsoft MCP Server for Enterprise is available only in the public cloud (global service), with support for sovereign clouds planned for a future release.
We will continue expanding beyond the current Microsoft Entra scenarios, but M365 APIs will be covered by Agent 365.
Support for write operations is planned for a future release.
Please share suggestions or issues through our feedback form: Submit feedback.

Licensing and usage

  • The MCP Server for Enterprise doesn't require extra cost or separate license.
  • You need the right licenses for the data you access (for example, Microsoft Entra ID Governance or Microsoft Entra ID P2 license for Privileged Identity Management (PIM) data).
  • Any request to this MCP server is limited to 100 requests per minute per user. Requests to microsoft_graph_get are also subject to Microsoft Graph Throttling limits.

Logs

To monitor usage, enable Microsoft Graph activity logs in your tenant to record the Graph API calls made through the MCP server.

Filter for MCP Server usage:

Use the Application (Client ID) of the Microsoft MCP Server for Enterprise: e8c77dc2-69b3-43f4-bc51-3213c9d915b4.

The following Kusto query retrieves these logs:

kusto
MicrosoftGraphActivityLogs| where TimeGenerated >= ago(30d)| where AppId == "e8c77dc2-69b3-43f4-bc51-3213c9d915b4"| project RequestId, ClientRequestId, TimeGenerated, UserId, RequestMethod, RequestUri, Scopes, ResponseStatusCode

Use Graph's RequestId and ClientRequestId with the timestamp, user, and request URI to trace API calls. Scopes lists permissions in the Graph access token, not the specific permission used to authorize each operation.

Support and reference

For documentation, troubleshooting, and feedback, refer to the official Microsoft Learn documentation and support channels.

Security and compliance

All operations respect Microsoft Graph permissions and security policies. The MCP server uses standard Microsoft Graph telemetry and doesn't log request payloads. Review your AI client's data-handling and retention policies for prompts and returned data. Ensure compliance with your organizational, regulatory, and contractual requirements when integrating the MCP Server.

No warranty/limitation of liability

This software is provided "as is" without warranties or conditions of any kind, either express or implied. Microsoft isn't liable for any damages that result from use, misuse, or misconfiguration of this software.

来源:README.md,提交 0f4cb1d

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Microsoft 集成