Maester MCP Server
Run Maester security tests targeting GitHub repositories, settings, and actions.
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., "@Maester MCP Server Run all Maester tests and report critical failures."
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.
Maester MCP Server
An MCP (Model Context Protocol) server that exposes Maester 2.2 — the Microsoft 365 / Entra / Defender / Active Directory / GitHub security test framework — as tools for AI agents.
Connect Claude, GitHub Copilot, or any MCP-compatible agent to your tenant's security posture and ask, for example:
"Run Maester, summarise the critical failures, and audit our Copilot Studio agents and MCP servers while you're at it."
Version note: aligned to Maester 2.2.0 (July 2026). Maester's test count has grown past 600 across Entra, Exchange, Teams, SharePoint, Purview, Defender, Intune, Global Secure Access, Active Directory, GitHub, and Azure DevOps. This server tracks the 2.2 cmdlet surface (
Get-MtTestInventory,Merge-MtMaesterResult,Get-MtHtmlReport,-OutputMarkdownFile,-DriftRoot, the-Serviceconnection model, and theAIAgenttag).
Where this fits alongside Maester Cloud
Maester now has a companion commercial product, Maester Cloud (private preview Aug 2026, GA targeted Sep 2026): a portal that keeps 5+ years of tenant history, highlights drift between runs, and alerts on change. It is the durable evidence layer.
This MCP server is a different, complementary layer:
Layer | What it is | Strength |
Maester (open core) | The test framework | Runs the checks |
Maester Cloud | Hosted/self-hosted portal | History, drift, alerting, evidence retention |
This MCP server | Conversational/agentic interface | Real-time triage, reasoning over failures, reflexive AI-surface auditing, remediation guidance |
Use them together: Maester Cloud remembers and alerts; the MCP server lets an agent investigate, explain, and act on any given run in natural language. They are not substitutes.
Related MCP server: PyRIT MCP Server
Prerequisites
Requirement | Notes |
Node.js 18+ | For the MCP server |
PowerShell 7+ ( | |
Maester 2.2+ |
|
Maester tests |
|
Entra ID app |
|
ADOPS module | Only for Azure DevOps tests: |
PnP.PowerShell | Only for SharePoint tests |
Auth setup
Fastest path — let Maester create the app
Connect-Maester -Service Azure
New-MtMaesterApp -GitHubActions -SetGitHubSecrets # zero-config for GitHub ActionsManual app registration — Graph permissions (application, admin-consented)
Permission | Used for |
| Conditional access, auth methods |
| Entra ID config |
| Risk-based CA tests |
| PIM / privileged role tests |
| Sign-in and audit log checks |
| Defender / ORCA checks |
| New in 2.2 — Global Secure Access checks |
Copilot Studio (audit_ai_agents) additionally needs the Dataverse service connection and access to the environment named in maester-config.json.
Managed Identity (Azure-hosted, no secrets)
Set AZURE_USE_MANAGED_IDENTITY=true. Grant the managed identity the same Graph permissions.
Installation
git clone https://github.com/iffystrayer/maester-mcp-server
cd maester-mcp-server
npm installConfiguration
Variable | Required | Description |
| Yes* | Entra tenant ID |
| Yes* | App registration client ID |
| Yes* | App registration client secret |
| No |
|
| No | Tests folder (default |
| No | Where result JSON/MD/HTML files are written |
| No | Baseline folder for |
| No | PowerShell executable (default |
* Not required when AZURE_USE_MANAGED_IDENTITY=true.
Claude Desktop config
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"maester": {
"command": "node",
"args": ["/absolute/path/to/maester-mcp-server/index.js"],
"env": {
"AZURE_TENANT_ID": "your-tenant-id",
"AZURE_CLIENT_ID": "your-client-id",
"AZURE_CLIENT_SECRET": "your-client-secret",
"MAESTER_TESTS_PATH": "/Users/you/maester-tests",
"MAESTER_DRIFT_ROOT": "/Users/you/maester-baseline"
}
}
}
}Restart Claude Desktop after saving.
Ready-to-use prompts
Copy-paste prompts for common scenarios — posture check, drift detection, AI agent audit, CA simulation — each mapped to the tools it fires. See prompts.md.
Available tools
Tool | What it does |
| Run tests (by tag/service), with optional markdown output and drift comparison. Returns summary + file paths. |
| New. Run the |
| Overall pass rate, per-category breakdown, critical/high failures first. |
| All failures from a results file, filterable by category. |
| Full description, remediation, help URL, severity for one test. |
| Simulate a sign-in against Conditional Access policies. |
| New. Merge many tenant result files into one multi-tenant HTML report (MSP use). |
| Enumerate all tags via |
| Update module + tests, report the new version. |
The reflexive angle: agents auditing agents
The most valuable new capability in 2.2 for an agentic system is that Maester now audits AI agents and MCP servers as an attack surface. That means the very agent you connect this server to can police the rest of your org's agent sprawl:
You: We've had teams spinning up Copilot Studio agents and MCP servers all
quarter. Which ones are risky?
Agent: [calls audit_ai_agents]
→ "8 agents checked. 3 findings: 'Sales Helper' is shared with the
whole org and has no user authentication (MT.1113/MT.1114);
'Invoice Bot' can send email with AI-controlled inputs — an
exfiltration path (MT.1116); one connected MCP server exposes
tools flagged for review (MT.1120). Want the remediation steps?"This closes a real governance gap that most orgs don't have tooling for yet.
Operational runbook
1. Establish a baseline (once). Run a full pass and snapshot the JSON as your drift baseline:
run_maester_tests(services: ["Graph","Exchange","Teams"]) → save resultsFile into MAESTER_DRIFT_ROOT2. Daily scheduled run (CI/CD). Keep this in GitHub Actions / Azure DevOps, not the MCP server — the MCP server is for interactive investigation. Use New-MtMaesterApp -GitHubActions -SetGitHubSecrets for a secretless OIDC setup. Emit markdown for the PR/summary and JSON for retention.
3. Interactive triage (MCP server). When the scheduled run flags something, or ad hoc, have the agent call run_maester_tests with useDrift: true, then get_security_posture_summary, then drill in with get_test_detail.
4. AI-surface review (monthly). audit_ai_agents on a schedule as Copilot Studio and MCP adoption grows.
5. Evidence retention. For history/drift/alerting across runs, feed results into Maester Cloud rather than reinventing storage here.
Security notes
Read-only by default. Maester tests only read Graph/Azure/AD data.
Least privilege. Grant only the scopes listed; don't run as Global Admin.
Secrets in env or a vault, never in code. Prefer Managed Identity where possible.
Result files can contain tenant configuration detail — store and retain them securely.
The
run_ca_whatifand remediation-adjacent flows are advisory; keep a human in the loop before any tenant write.
Extending
Add an entry to TOOLS and a matching case in the request handler. Custom Maester tests in tests/Custom/ are picked up automatically by run_maester_tests — no server change needed.
Roadmap ideas
HTTP+SSE / Streamable HTTP transport for remote deployment
Streaming progress during long runs
Optional Graph write tools for one-click remediation (behind an explicit approval gate)
Auto-ticketing (Jira / Azure DevOps Boards / ServiceNow) on new failures
Native Maester Cloud push once its ingest cmdlet ships
Available Tools
9 toolsaudit_ai_agentsA
Audit the organisation's AI attack surface using Maester's AIAgent checks (MT.1113–MT.1122): risky Copilot Studio agent sharing, missing agent authentication, risky HTTP config, AI-driven email exfiltration, MCP server tools that need review, hard-coded credentials in topics, dormant/orphaned agents, plus high agent-risk sign-ins. Requires the Dataverse service. Use this to let an AI agent police the org's other agents and MCP servers.
Inputs: services.
get_failed_testsA
List all failed tests from a results file with descriptions and remediation, optionally filtered by category tag.
Inputs: resultsFile (required), category.
get_security_posture_summaryA
Parse a results file into a structured summary: overall pass rate, per-category breakdown, critical/high failures sorted first, and top failures. Good first call after run_maester_tests.
Inputs: resultsFile (required).
get_test_detailA
Get full details — description, result, remediation, help URL, severity — for one test by ID.
Inputs: testId (required), resultsFile (required).
list_available_tagsA
List every test tag available in the installed test suite via Get-MtTestInventory. Use these to scope run_maester_tests.
Inputs: no named parameters.
merge_tenant_resultsA
Merge multiple per-tenant Maester result files into a single multi-tenant HTML report (for MSPs / multi-tenant orgs). Wraps Merge-MtMaesterResult + Get-MtHtmlReport.
Inputs: resultsFolder (required), outputHtml.
run_ca_whatifA
Simulate a user sign-in against all Conditional Access policies via the Graph evaluate API. Returns which policies apply, block, or grant.
Inputs: userId (required), appId, ipAddress, devicePlatform, +1 more.
run_maester_testsA
Run Maester 2.2 security tests against your Microsoft 365 / Entra tenant. Returns a pass/fail summary and results file paths. Scope with tags and services. Takes 2–10 min depending on breadth.
Inputs: tags, services, useDrift, excludeTags, +3 more.
update_maester_testsA
Update the Maester module and test files to the latest versions, and report the resulting module version.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool serves a distinct purpose: running tests, auditing AI agents, analyzing results at different granularities, simulating CA, merging results, listing tags, and updating the module. Even overlapping functions like run_maester_tests and audit_ai_agents are clearly differentiated by scope and description.
All tool names follow a consistent verb_noun pattern: run_, audit_, get_, list_, merge_, update_. No mixed conventions or vague verbs.
9 tools is well-scoped for a security testing and results analysis server. Each tool covers a necessary step in the workflow without redundancy, and the count is within the ideal 3–15 range.
The tool set covers the full lifecycle: installing/updating tests, listing available tags, running tests (including a specialized AI audit), simulating CA policies, parsing results, fetching failures and details, and merging multi-tenant outputs. No obvious gaps for the stated domain.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
12 read-only MCP tools for AI communication rules, instruction linting & 25-model benchmarks.
The main MCP server has 10 tools, including six public, read-only CVE tools, site search and page reading. CVE results include source software/version evidence and available CISA KEV and dated FIRST EPSS data. The separate request_security_test action requires an agent key, consent and authorization. A no-account, read-only CVE-only endpoint is https://excessionlabs.ai/mcp/cve. Docs: https://excessionlabs.ai/cve-intelligence/.
Related MCP Servers
- AlicenseAqualityCmaintenanceExposes Microsoft 365 privacy/compliance audit checks as MCP tools, enabling natural language queries about tenant configuration, orphaned documents, Conditional Access policies, DLP policies, and Copilot usage.5MIT
- AlicenseAqualityDmaintenanceExposes Microsoft's PyRIT AI red-teaming framework as structured tools for MCP-compatible agents, enabling authorized AI security assessments through engagements, targets, attacks, scoring, and reporting.22MIT
- FlicenseNot gradedqualityDmaintenanceExposes all PHANTOM security testing capabilities as MCP tools, enabling reconnaissance, vulnerability scanning, red teaming, and report generation through natural language interactions.2-
- AlicenseBqualityCmaintenanceExposes the five Enternovate security tools as 23 Model Context Protocol tools, enabling agents to scan attack surfaces, query knowledge graphs, audit websites, check email security, and run POPIA compliance assessments via a single MCP connection.37MIT