An MCP server for Microsoft 365 administration using Microsoft Graph API application permissions (client credentials). It exposes admin-focused tools for security, audit, identity, Intune, governance, compliance, incident response, and related Microsoft 365 services, with read-only behavior by default.
From the registry: Microsoft 365 administration via Graph API application permissions (read-only by default).
$ npm install -g @okapi-ca/ms-365-admin-mcp-serverPlease install the `ms-365-admin` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install Node.js 18 or later** — Node.js version 18 or newer is required to run the MCP server.
- **Create an Azure AD app registration with application permissions** — Set up a Microsoft Entra ID / Azure AD app registration using application permissions (client credentials), not delegated permissions. (docs/APP_REGISTRATION.md)
- **Use a specific tenant ID** — You must have a specific Azure AD tenant ID; the server does not support using the "common" tenant.
- **Install the MCP server package** — Install the recommended npm package globally so the server command is available on your system. Run: `npm install -g @okapi-ca/ms-365-admin-mcp-server`
Canonical MCP server config (stdio transport):
- command: `ms-365-admin-mcp-server`
- args: []
- required environment variables:
- `MS365_ADMIN_MCP_CLIENT_ID`: App registration client ID. (example: `<your-client-id>`)
- `MS365_ADMIN_MCP_CLIENT_SECRET`: App registration client secret. (example: `<your-client-secret>`)
- `MS365_ADMIN_MCP_TENANT_ID`: Azure AD tenant ID; must be a specific tenant, not "common". (example: `<your-tenant-id>`)
- optional environment variables:
- `MS365_ADMIN_MCP_CLOUD_TYPE`: Microsoft cloud environment: global (default) or china. (example: `<global-or-china>`)
- `MS365_ADMIN_MCP_KEYVAULT_URL`: Azure Key Vault URL for secrets management; when set, it overrides env var secrets. (example: `<your-key-vault-url>`)
- `MS365_ADMIN_MCP_MAX_TOP`: Cap the $top query parameter to limit result size. (example: `<max-top-value>`)
- `READ_ONLY`: Set to true or 1 to force read-only mode. Read-only is the default behavior. (example: `<true-or-1>`)
- `ENABLED_TOOLS`: Regular expression used to filter the available tools. (example: `<tool-regex>`)
Note: The README documents both stdio and HTTP transports, but stdio is the default and simplest portable MCP client configuration. Optional CLI flags include --allow-writes, --preset <names>, --enabled-tools <regex>, and --cloud <type>. For HTTP transport, the server supports --transport http along with --host, --port, and --allowed-clients, but no canonical MCP client HTTP config URL is provided in the main README excerpt.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.MS365_ADMIN_MCP_CLIENT_IDrequiredApp registration client IDMS365_ADMIN_MCP_CLIENT_SECRETrequiredApp registration client secretMS365_ADMIN_MCP_TENANT_IDrequiredAzure AD tenant ID (must be specific)Meta Ads MCP (Facebook + Instagram) - analyze performance, manage budgets, pause campaigns.