*Updated June 17th 2025** Manage your Microsoft 365 services effortlessly. Create and manage distr…
New Identity & Security Tools:
backup_policies - Export Microsoft 365 policies to JSON for backup, disaster recovery, and migration
manage_named_locations - Manage Conditional Access named locations
manage_authentication_strengths - View authentication strength policies
manage_cross_tenant_access - Manage B2B collaboration settings
manage_identity_protection - Monitor identity risks
MCP SDK & Smithery Best Practices Update:
Authentication Improvements:
src/auth/ module with OAuth provider and middleware/oauth/authorize, /oauth/callback, /oauth/token)Build & Deployment Fixes:
csv-writer, xlsx, handlebars modules@types/express to v5.0.0 for Express v5 compatibilityConfiguration Updates:
smithery.config.js for esbuild configurationsmithery.yaml with OAuth config sectionmodule field to package.json for Smithery compatibility@smithery/sdk@^3.0.1, @smithery/cli@^1.6.7Comprehensive Microsoft 365 Policy Management Expansion:
New Policy Management Tools:
manage_retention_policies - Data retention across SharePoint, Exchange, Teams, OneDrivemanage_sensitivity_labels - Information protection with encryption and content markingmanage_information_protection_policies - Label policies and organization-wide settingsmanage_conditional_access_policies - Identity and access security with MFA, device compliancemanage_defender_policies - Advanced threat protection (Safe Attachments, Safe Links, Anti-Phishing)manage_teams_policies - Teams governance (messaging, meetings, calling, apps)manage_exchange_policies - Email security (OWA, ActiveSync, address book policies)manage_sharepoint_governance_policies - Content and sharing governancemanage_security_alert_policies - Security event monitoring and automated responsesPolicy Types Covered:
Key Features:
For complete documentation, examples, and best practices, see:
Universal Microsoft Graph API Framework - Complete Transformation:
New Advanced Graph API Tools:
execute_graph_batch - Execute up to 20 Graph requests in a single high-performance batch operationexecute_delta_query - Efficiently track changes to any Graph resource using delta queriesmanage_graph_subscriptions - Create, update, delete, and list webhook subscriptions for real-time notificationsexecute_graph_search - Advanced search across Microsoft 365 content with aggregations and filteringDynamic Category Tools (Generated at Runtime):
manage_teams_resources - Complete Microsoft Teams management (teams, channels, messages, meetings, chat)manage_productivity_resources - OneNote notebooks/pages, Planner plans/tasks, To Do lists, Bookings appointmentsmanage_security_resources - Security incidents, threat intelligence, advanced alerts, Defender integrationmanage_analytics_resources - Usage reports, activity insights, trending documents, user analyticsEnhanced Windows Device Management:
manage_intune_windows_devices - Complete Windows device lifecycle management in Intunemanage_intune_windows_policies - Windows configuration and compliance policy managementmanage_intune_windows_apps - Windows application deployment and managementmanage_intune_windows_compliance - Windows device compliance assessment and reportingTechnical Architecture Improvements:
Scope Coverage Expansion:
This transformation makes the M365 MCP server the definitive solution for Microsoft 365 automation, providing unprecedented access to the entire Microsoft Graph API ecosystem with advanced features and optimal performance.
Previous HTTP Transport Migration (September 25, 2025):
/mcp endpointExtended Resources and Prompts (40 Resources + 5 Comprehensive Prompts):
For detailed information about all new resources and prompts, see EXTENDED_FEATURES.md.
TypeScript Error Resolution & Compliance Module Enhancements:
src/server.ts and src/handlers/compliance-handler.ts related to incorrect tool registration syntax and type mismatches.ComplianceFrameworkArgs to recognize 'cis' as a valid framework.Conditional Access Policy Review & Reporting:
MCP and HTTP Streaming Updates:
Added several new tools to expand Microsoft Entra ID management and Security & Compliance capabilities:
Entra ID Management:
manage_azuread_roles: Manage Entra ID directory roles and assignments.manage_azuread_apps: Manage Entra ID application registrations (list, view, owners).manage_azuread_devices: Manage Entra ID device objects (list, view, enable/disable/delete).manage_service_principals: Manage Entra ID Service Principals (list, view, owners).Generic API Access:
dynamicendpoints m365 assistant: Call arbitrary Microsoft Graph (including Entra APIs) or Azure Resource Management API endpoints.Security & Compliance:
search_audit_log: Search the Entra ID Unified Audit Log.manage_alerts: List and view security alerts from Microsoft security products.Note: Ensure the associated Entra ID App Registration has the necessary Graph API permissions and Azure RBAC roles for these tools to function correctly.
An MCP server that provides tools for managing Microsoft 365 core services including:
To install Microsoft 365 Core Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @DynamicEndpoints/m365-core-mcp --client claudeClone the repository
Install dependencies:
npm installCreate a .env file based on .env.example:
MS_TENANT_ID=your-tenant-id
MS_CLIENT_ID=your-client-id
MS_CLIENT_SECRET=your-client-secret
# Optional Configuration
# LOG_LEVEL=info # debug, info, warn, error
# PORT=3000 # Port for HTTP server if needed
# USE_HTTP=true # Set to 'true' to use HTTP transport instead of stdio
# STATELESS=false # Set to 'true' to use stateless HTTP mode (no session management)Register an application in Azure AD:
Required Microsoft Graph permissions:
Required Azure RBAC roles (for Azure Resource Management):
Build the server:
npm run buildStart the server:
npm startThe server supports multiple transport options for MCP communication:
By default, the server uses stdio transport, which is ideal for:
The server also supports HTTP transport with two modes:
This is the default HTTP mode when USE_HTTP=true and STATELESS=false:
Enable this mode by setting USE_HTTP=true and STATELESS=true:
To configure the transport options, set the appropriate environment variables in your .env file:
USE_HTTP=true # Use HTTP transport instead of stdio
STATELESS=false # Use stateful mode with session management (default)
PORT=3000 # Port for the HTTP serverThe server provides MCP tools and resources that can be used to manage various aspects of Microsoft 365. Each tool accepts specific parameters and returns structured responses.
The server provides 29 comprehensive tools for Microsoft 365 management:
manage_distribution_lists - Create, delete, and manage distribution lists and membershipmanage_security_groups - Create, delete, and manage security groups and membershipmanage_m365_groups - Create, delete, and manage Microsoft 365 groups and membershipmanage_exchange_settings - Configure mailbox, transport, organization, and retention settingsmanage_user_settings - Get and update user settings and configurationsmanage_offboarding - Automated user offboarding processes with configurable optionsmanage_sharepoint_sites - Create, update, delete SharePoint sites and manage usersmanage_sharepoint_lists - Create, update, delete SharePoint lists and manage itemsmanage_azuread_roles - Manage Azure AD directory roles and role assignmentsmanage_azuread_apps - Manage Azure AD application registrations and ownersmanage_azuread_devices - Manage Azure AD device objects (enable, disable, delete)manage_service_principals - Manage Azure AD Service Principals and ownershipsearch_audit_log - Search the Microsoft 365 Unified Audit Logmanage_alerts - List and view security alerts from Microsoft security productsmanage_dlp_policies - Manage Data Loss Prevention policies and configurationsmanage_dlp_incidents - Handle DLP policy violations and incident managementmanage_sensitivity_labels - Manage Microsoft Purview sensitivity labelsmanage_intune_macos_devices - Manage Intune macOS devices and enrollmentmanage_intune_macos_policies - Configure and deploy macOS device policiesmanage_intune_macos_apps - Deploy and manage macOS applications via Intunemanage_intune_macos_compliance - Monitor and enforce macOS device compliancemanage_compliance_frameworks - Configure compliance frameworks (HITRUST, ISO27001, SOC2)manage_compliance_assessments - Run and manage compliance assessmentsmanage_compliance_monitoring - Monitor compliance status and configure alertsmanage_evidence_collection - Collect and manage compliance evidencemanage_gap_analysis - Perform compliance gap analysis and remediation planningmanage_cis_compliance - Manage CIS Controls compliance and benchmarksgenerate_audit_reports - Generate comprehensive audit reports for various frameworksdynamicendpoints m365 assistant - Call arbitrary Microsoft Graph or Azure Resource Management API endpointsThe server provides 44 comprehensive resources covering security, compliance, device management, and collaboration:
sharepoint_sites - SharePoint site information and configurationsharepoint_lists - SharePoint list structures and metadatasharepoint_list_items - Items within SharePoint listssecurity_incidents - Microsoft security incidents and detailsAll resources support URI templates for specific object access:
m365://security/alerts/{alertId} - Specific security alert detailsm365://devices/{deviceId} - Individual device informationm365://users/{userId}/compliance - User-specific compliance statusm365://teams/{teamId}/governance - Team governance and policiesThe server provides 5 comprehensive prompts for automated analysis and recommendations:
Each prompt provides contextual analysis, actionable insights, and integration with the corresponding management tools for immediate remediation.
// Managing a distribution list
await callTool('manage_distribution_lists', {
action: 'create',
displayName: 'Marketing Team',
emailAddress: 'marketing@company.com',
members: ['user1@company.com', 'user2@company.com']
});
// Managing security groups
await callTool('manage_security_groups', {
action: 'create',
displayName: 'IT Admins',
description: 'IT Administration Team',
members: ['admin1@company.com']
});
// Managing Azure AD roles (note: using correct tool name)
await callTool('manage_azuread_roles', {
action: 'assign_role',
roleId: 'role-id-here',
principalId: 'user-id-here'
});
// Managing DLP policies
await callTool('manage_dlp_policies', {
action: 'create',
policyName: 'Financial Data Protection',
rules: [{
name: 'Block Credit Cards',
conditions: { contentContainsSensitiveInfo: ['CreditCardNumber'] },
actions: { blockAccess: true }
}]
});
// Managing Intune macOS devices
await callTool('manage_intune_macos_devices', {
action: 'list',
filters: { complianceState: 'compliant' }
});
// Running compliance assessments
await callTool('manage_compliance_assessments', {
action: 'run_assessment',
framework: 'iso27001',
scope: ['access_control', 'data_protection'],
settings: {
automated: true,
generateRemediation: true
}
});
// Generating audit reports
await callTool('generate_audit_reports', {
framework: 'soc2',
reportType: 'comprehensive',
dateRange: { start: '2025-01-01', end: '2025-06-16' },
format: 'pdf',
includeEvidence: true
});
// Managing Exchange settings
await callTool('manage_exchange_settings', {
action: 'update',
settingType: 'mailbox',
target: 'user@company.com',
settings: {
automateProcessing: {
autoReplyEnabled: true
}
}
});
// Managing SharePoint sites
await callTool('manage_sharepoint_sites', {
action: 'create',
title: 'Marketing Site',
description: 'Site for marketing team',
template: 'STS#0',
url: 'https://contoso.sharepoint.com/sites/marketing',
owners: ['user1@company.com'],
members: ['user2@company.com', 'user3@company.com']
});
// Managing SharePoint lists
await callTool('manage_sharepoint_lists', {
action: 'create',
siteId: 'contoso.sharepoint.com,5a14e1cf-e284-4722-8f50-a5e1b2b0a8d6,9528e4bb-7660-4b11-a758-9d8fb3ca295f',
title: 'Project Tasks',
description: 'List of project tasks',
columns: [
{ name: 'Title', type: 'text', required: true },
{ name: 'DueDate', type: 'dateTime' },
{ name: 'Status', type: 'choice', choices: ['Not Started', 'In Progress', 'Completed'] }
]
});
// Dynamic API calls for custom scenarios
await callTool('dynamicendpoints m365 assistant', {
apiType: 'graph',
path: '/me/messages',
method: 'get',
queryParams: { '$top': '10', '$filter': 'isRead eq false' }
});The server uses Zod for schema validation, providing:
The server implements comprehensive error handling:
MIT