CIPP MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CIPP MCP Serverlist all tenants and their default domains"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CIPP MCP Server
An MCP server for the CIPP API (CyberDrain Improved Partner Portal), the console MSPs use to manage many Microsoft 365 tenants through GDAP. It lets an AI agent read tenants, users, groups, mailboxes, conditional access, standards, licences and GDAP data from a CIPP instance and, on explicit request, make changes such as creating or editing users, resetting passwords, offboarding leavers, setting auto-replies or forwarding, and running standards.
Transport: MCP Streamable HTTP at
POST /mcp, health probe atGET /healthStateless and multi-tenant: credentials arrive on every request as HTTP headers and are never stored; OAuth tokens live only for the duration of one request
Python 3.12, uv, FastMCP, httpx
License: Apache-2.0, Copyright 2026 MSPbots.ai
Authentication headers
X-Base-Url is always required. Then send either X-Api-Key or the three OAuth
headers X-Tenant-Id + X-Client-Id + X-Client-Secret.
Header | Required | Type | Default | Allowed values | Description | Example |
| Yes | string | none | https URL | URL of the CIPP API backend (Azure Function App) |
|
| One of | string | none | - | A pre-issued bearer token for the CIPP API |
|
| One of | string | none | - | Partner (MSP) Entra tenant id that hosts the CIPP API client |
|
| One of | string | none | - | Application (client) id of the CIPP API client |
|
| One of | string | none | - | Client secret of the CIPP API client |
|
| No | string |
| - | Override the OAuth scope (disables the fallback) |
|
| No | string |
| https URL | Override the token endpoint | - |
| No | string | on |
| Retry once with scope |
|
Where to get them:
In CIPP open Settings -> Integrations -> CIPP-API (API client management) and create a new API client. CIPP shows the application (client) id and secret once; copy them together with your partner tenant id. Assign the client a role that covers the tools you want (read-only roles are enough for the list tools).
The base URL must be the CIPP API backend (the Azure Function App URL), not the address of the CIPP web front end.
CIPP checks each API client against its allowed IP range; allow the public egress IP of the environment that runs this server.
How credentials are sent to CIPP: every call is Authorization: Bearer <token> to
{X-Base-Url}/api/{Function}. With the OAuth headers the server runs the client-credentials
flow against Entra ID first; values that look like unresolved templates (${...}) are treated
as missing.
A request to /mcp without the required headers gets HTTP 401 listing them; a non-https URL
gets HTTP 400.
Related MCP server: mcp-m365-mgmt
Tools
All tools return a JSON string. tenantFilter is a tenant's default domain (for example
example.onmicrosoft.com) or tenant id from cipp_list_tenants; tools that say so accept
AllTenants. userId accepts an object id or a UPN.
Tool | Purpose | Parameters (required in bold) |
| Check the CIPP instance is reachable (no auth check; use cipp_get_version for that) | - |
| Get the CIPP frontend/API versions and whether an update is available (also validates credentials) | - |
| List CIPP's own activity log (actions run, standards applied, errors) for one day | dateFilter |
| List the customer tenants managed through CIPP: name, default domain and tenant id | allTenants |
| Get a tenant's organisation details: verified domains, address, technical contacts, sync settings | tenantFilter |
| List users of a tenant, optionally searched by display name (prefix), UPN or mail (exact) | tenantFilter, searchField ( |
| Create a Microsoft 365 user in a tenant (write) | tenantFilter, displayName, userPrincipalName, password, givenName, surname, jobTitle, department, country |
| Edit a user's name, job, department, usage location or licences (write) | tenantFilter, userId, displayName, jobTitle, department, usageLocation, licenses, removeLicenses |
| Block sign-in for a user (write) | tenantFilter, userId |
| Reset a user's password; CIPP generates the new one and returns it (write) | tenantFilter, userId, newPassword |
| Remove a user's registered MFA methods so they must register again (write) | tenantFilter, userId |
| Sign a user out everywhere by revoking all refresh tokens (write) | tenantFilter, userId |
| Queue an offboarding job for a leaver with the chosen steps (disable, licences, mailbox, ...) (write) | tenantFilter, userId, DisableSignIn, RevokeSessions, ResetPass, RemoveLicenses, RemoveGroups, RemoveMFADevices, RemoveMobile, RemoveRules, RemoveTeamsPhoneDID, removeCalendarInvites, removePermissions, removeCalendarPermissions, ConvertToShared, HideFromGAL, disableForwarding, DisableOneDriveSharing, ClearImmutableId, DeleteUser, forward, KeepCopy, OOO, AccessAutomap, AccessNoAutomap, OnedriveAccess |
| Run a business-email-compromise check for a user (rules, sign-ins, MFA changes, ...) | tenantFilter, userId, guid |
| List users with their MFA registration and enforcement state (per-user MFA, CA, defaults) | tenantFilter |
| List the devices registered to or owned by a user | tenantFilter, userId |
| List the groups a user belongs to | tenantFilter, userId |
| Get a user's recent interactive sign-ins: time, app, IP, location, result, MFA and CA outcome | tenantFilter, userId, top |
| List groups of a tenant: name, type (security, M365, distribution), mail, membership rule | tenantFilter, search |
| Create a group in a tenant (write) | tenantFilter, displayName, description, securityEnabled, mailEnabled, mailNickname |
| List Exchange mailboxes of a tenant: UPN, display name, type, aliases | tenantFilter, type ( |
| List who has full access, send-as or send-on-behalf permission on a mailbox | tenantFilter, upn |
| List a mailbox's personal trusted (safe) and blocked senders and domains. Empty means none set | tenantFilter, upn |
| Rank mailboxes by size, archive size or quota use, with tenant totals, from CIPP's daily cache | tenantFilter, sortBy ( |
| Get one mailbox's live size, item count, quota use and archive status | tenantFilter, upn |
| Turn a mailbox's automatic replies on, off or on a schedule (write) | tenantFilter, upn, state ( |
| Set or remove mailbox forwarding (internal or external address) (write) | tenantFilter, upn, forwardTo, keepCopy |
| List a tenant's conditional access policies with state, conditions and grant controls | tenantFilter |
| List conditional access named locations (trusted IP ranges and countries) | tenantFilter |
| List enterprise applications (service principals) consented in a tenant: name, publisher, created | tenantFilter, includeBuiltIn |
| Check SPF, DMARC and DKIM records for each custom domain of a tenant | tenantFilter |
| List audit-log alert entries CIPP collected for a tenant (sign-in, mailbox rule, admin changes) | tenantFilter, days, type |
| List the alert rules and scheduled alert jobs configured in CIPP | - |
| List the standards applied to a tenant and their settings | tenantFilter |
| Run the standards assigned to a tenant now; remediating standards change the tenant (write) | tenantFilter |
| List the standards templates (id, name, assigned tenants, standards) | - |
| Show where tenants have drifted from their drift-standard templates (accepted / denied deviations) | tenantFilter |
| Show how well tenants align with their standards templates (percentage compliant per template) | tenantFilter |
| Create a standards template; standards apply to its tenants on the next run (write) | template |
| Delete a standards template (write) | templateId |
| Get the Best Practice Analyser report for a tenant (older CIPP versions only) | tenantFilter |
| List a tenant's licence SKUs with purchased, assigned and available counts | tenantFilter |
| List CSP licence subscriptions bought through the CSP integration for tenants | tenantFilter |
| List the GDAP role mappings (Entra roles to partner security groups) set up in CIPP | - |
| List GDAP relationship invites created in CIPP and their status | - |
| List tasks in CIPP's scheduler: name, command, tenant, next run, state and results | - |
| Schedule a CIPP command to run once or on a recurrence (write) | taskName, command, scheduledTime, recurrence, tenantFilter, parameters |
Errors come back as a JSON envelope instead of an exception:
{"error": {"code": "unauthorized", "message": "CIPP returned HTTP 401 for ListTenants", "retryable": false}}code is one of not_configured, unauthorized, not_found, invalid_argument,
rate_limited, upstream_error. Reads are retried with backoff on 429, 5xx and network
errors; writes are retried only on 429, so a write never runs twice.
Run locally
uv sync
uv run python -m cipp_mcp # listens on 0.0.0.0:8080or with Docker:
docker build --platform linux/amd64 -t cipp-mcp:dev .
docker run --rm -p 8080:8080 cipp-mcp:devConfiguration (environment variables, all optional): MCP_HTTP_HOST (default 0.0.0.0),
MCP_HTTP_PORT (default 8080), LOG_LEVEL (default INFO). Credentials are never read
from the environment.
Testing example
# list tools
curl -s http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Base-Url: https://cipp.example.com" \
-H "X-Tenant-Id: your-partner-tenant-id" \
-H "X-Client-Id: your-client-id" \
-H "X-Client-Secret: your-client-secret" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
# managed tenants
curl -s http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Base-Url: https://cipp.example.com" \
-H "X-Api-Key: your-cipp-token" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"cipp_list_tenants","arguments":{}}}'Unit tests (no network access needed):
uv run pytestDelivery notes
Tool count (47). Kept as is because the tool names are an existing contract.
Write tools. The 14 tools marked write change live Microsoft 365 tenants; their descriptions tell the agent to use them only on explicit request.
cipp_disable_user,cipp_reset_password,cipp_reset_mfa,cipp_revoke_sessions,cipp_offboard_userandcipp_delete_standard_templateare annotated destructive.Queued jobs.
cipp_offboard_userandcipp_add_scheduled_itemreport whether CIPP accepted the job, not whether it finished; CIPP failures returned with HTTP 200 are detected and reported asfailed.Passwords.
cipp_reset_passwordlets CIPP generate the new password; a caller-chosennewPasswordis rejected rather than silently ignored.Cached vs live sizes.
cipp_list_mailbox_usagereads CIPP's daily report cache (fast, whole tenant, up to 24 h old);cipp_get_mailbox_usagereads one mailbox live.Version differences.
cipp_list_bpaexists only on older CIPP versions and returns a clearnot_foundpointing tocipp_get_tenant_alignmentotherwise.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Let AI agents query data and act across all your business apps via MCP.
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
- ZapierOAuthcom.zapier.mcp
Zapier MCP connects AI tools like Claude, ChatGPT, and Cursor to over 8,000 apps and 30,000+ actions, enabling AI to perform real-world tasks such as sending messages, searching data, scheduling events, and updating records. It acts as a translator between AI tools and apps, handling authentication, rate limits, and retries automatically, transforming AI from a conversational tool into a functional extension of your business stack.
Build and manage Chipp AI apps: prompts, knowledge, custom actions, and chat with your apps.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI agents to manage SharePoint Online resources including lists, libraries, columns, views, and files through the SharePoint REST API. It supports comprehensive data operations, schema management, and file transfers using secure MSAL authentication.21-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants and automation tools to manage Microsoft 365, Entra ID, and Intune resources through 32 tools for user/device/file management and infrastructure monitoring.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to manage Microsoft Entra users and groups via the SCIM 2.0 Provisioning API, including provisioning, deprovisioning, group membership, custom security attributes, and lifecycle operations.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to manage MSP-multi-tenant email security: organizations, domains, users, licensing, features, subscription packages, and email flow reporting.Apache 2.0