Minerva MCP — Microsoft 365 & Azure

io.github.HoussemMakPublished by GitHub account HoussemMakv0.4.2Updated Oct 24, 2026

Microsoft 365 & Azure admin: Graph, ARM, and the PowerShell cmdlets Graph does not expose.

The publisher's own server: Microsoft Learn MCP

Overview

AI-generated overview

An MCP server that lets an AI assistant query and administer a Microsoft 365 tenant and Azure subscriptions through Graph, ARM and PowerShell cmdlets.

What you can do
Call Microsoft Graph and Azure Resource Manager endpoints and run unified Microsoft Search queries, including a generic call tool for any v1.0 or beta Graph path and any ARM path. Read tenant context such as organisation details, licences and Secure Score, and generate a tenant security posture report. Run Exchange Online cmdlets for mailbox permissions, transport rules, message trace and retention policies that have no Graph equivalent. Run SharePoint/PnP, Teams Admin and Purview compliance cmdlets. Classify each action by risk and pause writes for human confirmation before they execute.
When to use it
Use it when an assistant needs to inspect or administer Microsoft 365 and Azure, especially for tasks that have no Graph API and live only in PowerShell, such as mailbox permissions, message trace, sensitivity labels, Teams calling policies or SharePoint term stores. It is not needed if Graph alone covers your use case.
Requirements
Node.js 20+. For the PowerShell tools, PowerShell 7+ and the relevant modules (ExchangeOnlineManagement, PnP.PowerShell, MicrosoftTeams). Sign-in is interactive by default via a device code on stderr; unattended app-only sign-in needs AZURE_CLIENT_ID, AZURE_CLIENT_SECRET and AZURE_TENANT_ID. The SharePoint/PnP tool run locally needs MINERVA_SHAREPOINT_URL. Network access to Microsoft endpoints.
Before you install
The tools can change and delete tenant data such as mailboxes; writes are gated by a confirmation step, but clients that do not support elicitation get an error rather than silent execution. AZURE_CLIENT_SECRET is a credential for app-only access and should be scoped narrowly. Local PowerShell mode runs cmdlets with the current user's rights and isolates nothing, so do not expose it to untrusted callers. The server forwards a Microsoft token and grants nothing itself; a restricted token gives a,

Installation

In SourceWeft

  1. Open Minerva MCP — Microsoft 365 & Azure in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Minerva MCP

Microsoft 365 and Azure administration for AI assistants — including the parts Microsoft Graph cannot reach.

[CI] [License: MIT] [MCP 2026-07-28]

An MCP server that lets Claude, Copilot, VS Code or any MCP client query and administer a Microsoft 365 tenant in plain language.


Why another Microsoft 365 MCP server?

There are already good ones, and this is not trying to replace them.

Lokkams-365-mcp-serverMinerva MCP
Microsoft Graph✅✅ 300+ tools✅ generic call
Azure Resource Manager✅—✅
Exchange Online cmdlets——✅
SharePoint / PnP cmdlets——✅
Teams Admin cmdlets——✅
Purview / compliance cmdlets——✅
Risk classification per action——✅
Human approval before writes—read-only switch✅ native to the protocol
MCP 2026-07-28 (stateless)——✅

If you only need Graph, use Lokka or ms-365-mcp-server. They are excellent, more mature, and more widely used. Lokka in particular is written by a Microsoft Entra product manager.

Reach for this one when you hit the wall everyone hits eventually: a large part of Microsoft 365 administration has no Graph API. Mailbox permissions, transport rules, message trace, retention policies, sensitivity labels, Teams calling policies, SharePoint term stores, tenant-wide Exchange settings — those live in PowerShell and nowhere else. This server exposes them, with a risk classification and a confirmation step in front of anything that writes.


How it fits together

mermaid
flowchart LR    A["AI client<br/>Claude · VS Code · Copilot Studio"]    B["minerva-mcp"]    C{"Risk<br/>classifier"}    D["Human<br/>confirmation"]    G["Microsoft Graph<br/>Azure ARM · Search"]    P["PowerShell 7<br/>Exchange · PnP · Teams · Purview"]    M["Microsoft<br/>authorizes the token"]
    A -->|"stdio or HTTP"| B    B --> C    C -->|"read"| G    C -->|"write"| D    D -->|"signed mandate"| G    D -->|"signed mandate"| P    C -->|"read"| P    G --> M    P --> M

Reads go straight through. Writes stop at a classifier, come back to you as an input_required describing the action and its consequences, and only run once you confirm. Microsoft still has the final word: the server forwards a token, it never grants access.

Install

Nothing to clone. Add it to your client and sign in on first use.

Claude Desktop

claude_desktop_config.json:

json
{  "mcpServers": {    "minerva": {      "command": "npx",      "args": ["-y", "minerva-mcp", "--stdio"]    }  }}

VS Code

.vscode/mcp.json:

json
{  "servers": {    "minerva": {      "type": "stdio",      "command": "npx",      "args": ["-y", "minerva-mcp", "--stdio"]    }  }}

More, including read-only and app-only setups, in examples/.

On the first tool call the server prints a device-code prompt on stderr: open the link, enter the code, done. No app registration needed to try it — it uses the public Microsoft Graph PowerShell client by default.

Requirements: Node.js 20+. For the PowerShell tools, PowerShell 7+ and the modules you intend to use (ExchangeOnlineManagement, PnP.PowerShell, MicrosoftTeams).


What you can ask

"Which mailboxes have full access delegated to someone outside their department?" → execute_exchange_online with Get-MailboxPermission, no Graph equivalent exists.

"Show me every conditional access policy that does not require MFA, and our Secure Score." → generate_security_report + microsoft_graph_call.

"Create a shared mailbox for invoicing and give the finance team access." → classified as a write: the server describes the action and its consequences, and waits for your confirmation before doing anything.


Tools

ToolWhat it doesGraph equivalent?
microsoft_graph_callAny Microsoft Graph call (v1.0 or beta)—
azure_arm_callAny Azure Resource Manager call—
microsoft_searchUnified Microsoft Search—
get_tenant_contextOrganisation, licences, Secure Score—
generate_security_reportTenant security posture—
execute_exchange_onlineExchange Online cmdlets❌ none
execute_pnp_sharepointPnP PowerShell (SharePoint) cmdlets❌ none
execute_teams_adminTeams Admin cmdlets❌ none
execute_purview_compliancePurview / compliance cmdlets❌ none

Restrict the surface with --tools=microsoft_graph_call,get_tenant_context, or forbid every write with --read-only.


Approval, and why it is not optional

A model reads untrusted content — an email subject, a site name, a document — and decides which tool to call. Prompt injection is not hypothetical, and the tools here can delete mailboxes.

So writes do not simply execute. Every action is classified auto, confirmed or critical from the HTTP verb and path (or the PowerShell verb). Anything above auto makes the server answer input_required under MCP's Multi Round-Trip Requests: your client shows what is about to happen and its consequences, you confirm, and only then does it run.

The confirmation is a signed mandate (HMAC) bound to the caller, the method, and a digest of the arguments, valid five minutes. A mandate obtained to delete /users/1 cannot be replayed on /users/999, and cannot be presented by anyone else.

If your client does not support elicitation, nothing is silently executed: the server returns an error saying the action needs confirmation.


Options

Every flag has an environment variable equivalent.

Transport

FlagEnvDefault
--stdioMINERVA_TRANSPORT=stdioHTTPJSON-RPC over stdin/stdout
--port=<n>MCP_SERVER_PORT3001HTTP listen port

In stdio mode all logs go to stderr — stdout belongs to the protocol.

Authentication

FlagEnv
--auth=<mode>MINERVA_AUTH_MODEbearer, device-code, client-secret
--tenant=<id>MINERVA_TENANT_ID, AZURE_TENANT_IDEntra tenant
--client-id=<id>MINERVA_CLIENT_ID, AZURE_CLIENT_IDApplication
--client-secret=<s>AZURE_CLIENT_SECRETApp-only secret

Defaults: bearer over HTTP (the caller supplies the token), device-code over stdio, client-secret as soon as a secret is present. Each resource gets its own token: Graph, ARM, Exchange, Purview, SharePoint and Teams do not share an audience.

Scope

FlagEnv
--read-onlyMINERVA_READ_ONLYRefuse every write
--tools=<a,b,c>MINERVA_TOOLSRegister only these tools
--ps=<mode>MINERVA_PS_EXECUTORauto, redis, local, none
--sharepoint-url=<url>MINERVA_SHAREPOINT_URLRequired by the PnP tool locally
--allowed-origins=<a,b>MINERVA_ALLOWED_ORIGINSBrowser origins allowed on /mcp
--redis-url=<url>REDIS_URLQueue for an external PowerShell runner
—MINERVA_MRTR_SECRETSigning key for approval mandates
—MINERVA_PWSH_PATHPath to pwsh
—MINERVA_REQUIRE_VERIFIED_TOKENSRefuse tokens whose signature cannot be verified

--read-only reuses the same risk classifier as the approval gate, so it covers PowerShell cmdlets too, not just HTTP verbs.


Protocol support

Speaks MCP 2026-07-28, and still serves handshake-era clients until 2027-07-28.

Stateless core (per-request _meta, no initialize, no Mcp-Session-Id)✅
server/discover✅
Multi Round-Trip Requests (input_required)✅ — this is the approval mechanism
MCP-Protocol-Version / Mcp-Method / Mcp-Name headers, base64 sentinel✅ validated against the body
ttlMs / cacheScope on lists✅ always private
Version negotiation (-32022 listing supported versions)✅
Origin validation (anti DNS-rebinding)✅
GET/DELETE on the MCP endpoint✅ 405, removed by this revision
Handshake era (initialize)✅ until 2027-07-28

One endpoint serves both generations; the request body decides which. Both read the same tool registry, and a test compares them against a frozen contract so they cannot drift.


Security

Read SECURITY.md before deploying. The three things that matter:

  1. This server grants nothing. It forwards a Microsoft token; Microsoft authorizes. A restricted token gives a restricted server.
  2. Graph tokens cannot be verified by a third party — they carry a nonce header that only Graph can check. Their tid/oid claims are therefore self-reported. The server validates them structurally, flags them verified: false, and binds approval mandates to a fingerprint of the token itself rather than to the claims alone. A token that should have verified and did not is rejected.
  3. Local PowerShell mode isolates nothing. Cmdlets run with the current user's rights. Do not expose it to a caller you do not trust.

Cmdlet names and parameters never reach the script as code: they travel through environment variables, the name is validated against a strict Verb-Noun pattern, and the call goes through Get-Command plus the call operator.

Report a vulnerability privately — see SECURITY.md.


What this does not do

  • No process isolation in local mode.
  • No multi-tenant brokering — one server, one identity.
  • No signed audit ledger. Audit events are JSON on stderr, not a signed, offline-verifiable record.

Those three belong to Minerva-IA, the commercial platform this server was extracted from. Everything in this repository works without it.


Development

bash
npm installnpm run dev:stdio     # stdio, hot reloadnpm run verify        # typecheck + tests + secret scannpm run build && node scripts/smoke-stdio.mjs

Tests need no credentials and touch no network.

Pull requests are closed until 2027-07-31 — see CONTRIBUTING.md for why, and for what is welcome in the meantime (bug reports very much are).

Licence

MIT — see LICENSE.

Source: README.md at commit d4b4096

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.4.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Microsoft integrations