Manages Entra ID (Azure AD) users, groups, applications, sign-in logs and MFA status through the Microsoft Graph API.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add entraid --env TENANT_ID='<TENANT_ID>' --env CLIENT_ID='<CLIENT_ID>' --env CLIENT_SECRET='<CLIENT_SECRET>' -- uv run --with azure-core --with azure-identity --with fastmcp --with msgraph-core --with msgraph-sdk fastmcp run /path/to/src/msgraph_mcp_server/server.py~/.codex/config.toml
[mcp_servers.entraid]
command = "uv"
args = ["run", "--with", "azure-core", "--with", "azure-identity", "--with", "fastmcp", "--with", "msgraph-core", "--with", "msgraph-sdk", "fastmcp", "run", "/path/to/src/msgraph_mcp_server/server.py"]
env = { TENANT_ID = "<TENANT_ID>", CLIENT_ID = "<CLIENT_ID>", CLIENT_SECRET = "<CLIENT_SECRET>" }
# codex mcp add entraid --env TENANT_ID='<TENANT_ID>' --env CLIENT_ID='<CLIENT_ID>' --env CLIENT_SECRET='<CLIENT_SECRET>' -- uv run --with azure-core --with azure-identity --with fastmcp --with msgraph-core --with msgraph-sdk fastmcp run /path/to/src/msgraph_mcp_server/server.py~/.cursor/mcp.json
{
"mcpServers": {
"entraid": {
"command": "uv",
"args": [
"run",
"--with",
"azure-core",
"--with",
"azure-identity",
"--with",
"fastmcp",
"--with",
"msgraph-core",
"--with",
"msgraph-sdk",
"fastmcp",
"run",
"/path/to/src/msgraph_mcp_server/server.py"
],
"env": {
"TENANT_ID": "<TENANT_ID>",
"CLIENT_ID": "<CLIENT_ID>",
"CLIENT_SECRET": "<CLIENT_SECRET>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"entraid": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--with",
"azure-core",
"--with",
"azure-identity",
"--with",
"fastmcp",
"--with",
"msgraph-core",
"--with",
"msgraph-sdk",
"fastmcp",
"run",
"/path/to/src/msgraph_mcp_server/server.py"
],
"env": {
"TENANT_ID": "<TENANT_ID>",
"CLIENT_ID": "<CLIENT_ID>",
"CLIENT_SECRET": "<CLIENT_SECRET>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"entraid": {
"command": "uv",
"args": [
"run",
"--with",
"azure-core",
"--with",
"azure-identity",
"--with",
"fastmcp",
"--with",
"msgraph-core",
"--with",
"msgraph-sdk",
"fastmcp",
"run",
"/path/to/src/msgraph_mcp_server/server.py"
],
"env": {
"TENANT_ID": "<TENANT_ID>",
"CLIENT_ID": "<CLIENT_ID>",
"CLIENT_SECRET": "<CLIENT_SECRET>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"entraid": {
"command": "uv",
"args": [
"run",
"--with",
"azure-core",
"--with",
"azure-identity",
"--with",
"fastmcp",
"--with",
"msgraph-core",
"--with",
"msgraph-sdk",
"fastmcp",
"run",
"/path/to/src/msgraph_mcp_server/server.py"
],
"env": {
"TENANT_ID": "<TENANT_ID>",
"CLIENT_ID": "<CLIENT_ID>",
"CLIENT_SECRET": "<CLIENT_SECRET>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"entraid": {
"command": "uv",
"args": [
"run",
"--with",
"azure-core",
"--with",
"azure-identity",
"--with",
"fastmcp",
"--with",
"msgraph-core",
"--with",
"msgraph-sdk",
"fastmcp",
"run",
"/path/to/src/msgraph_mcp_server/server.py"
],
"env": {
"TENANT_ID": "<TENANT_ID>",
"CLIENT_ID": "<CLIENT_ID>",
"CLIENT_SECRET": "<CLIENT_SECRET>"
}
}
}
}需要的环境变量
TENANT_IDCLIENT_IDCLIENT_SECRET
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。