Ms 365BLOCK
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Microsoft Office services through the Graph API
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/@softeria/ms-365-mcp-server) [](https://github.com/softeria/ms-365-mcp-server/actions/workflows/build.yml) [](https://github.com/softeria/ms-365-mcp-server/blob/main/LICENSE)
Microsoft 365 MCP Server
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Microsoft Office services through the Graph API.
Supported Clouds
This server supports multiple Microsoft cloud environments:
Prerequisites
- Node.js >= 20 (recommended)
- Node.js 14+ may work with dependency warnings
Features
- Authentication via Microsoft Authentication Library (MSAL)
- Comprehensive Microsoft 365 service integration
- Read-only mode support for safe operations
- Tool filtering for granular access control
- Tool presets and dynamic discovery to shrink the tool surface and token usage
Output Format: JSON vs TOON
The server supports two output formats that can be configured globally:
JSON Format (Default)
Standard JSON output with pretty-printing:
{
"value": [
{
"id": "1",
"displayName": "Alice Johnson",
"mail": "[email protected]",
"jobTitle": "Software Engineer"
}
]
}(experiment
fba8bb4b1c28OBSERVED · 2026-09-26Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add ms-365-mcp-server -- npx -y @softeria/[email protected]
Exposed tools (11)
8 read · 2 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
body | read | New navigation property |
create-folder | write | |
execute-tool | write | |
get-tool-schema | read | Returns the full parameter schema (name, placement, required, JSON Schema) for a tool discovered via search-tools. Call this before execute-tool so you know what parameters to pass and what enum values are valid. |
list-accounts | read | List all Microsoft accounts configured in this server. Use this to discover available account emails before making tool calls. Reflects accounts added mid-session via --login. |
login | read | Authenticate with Microsoft account |
logout | read | Log out from Microsoft account |
remove-account | destructive | Remove a Microsoft account from the cache. Accepts email address (e.g. [email protected]) or account ID. Use list-accounts to discover available accounts. |
search-tools | read | Search through ${totalCount} tools (${toolsRegistry.size} Microsoft Graph API operations + ${utilityTools.length} server utilities like download-bytes). Ranks results by BM25 over tool name, llmTip, description, and path. After picking a tool, call get-tool-schema for parameters, then execute-tool. |
select-account | read | Select a Microsoft account as the default. Accepts email address (e.g. [email protected]) or account ID. Use list-accounts to discover available accounts. |
verify-login | read | Check current Microsoft authentication status |
Trust audit
BLOCKgrade F · trust 59/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (5 observation(s))
- Shell
- declared (4 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (23)
const openApiSpec = yaml.load(fs.readFileSync(openapiFile, 'utf8'));
const openApiSpec = yaml.load(spec);
logger.error(`Error reloading token cache: ${(error as Error).message}`);logger.error(`Error saving token cache: ${(error as Error).message}`);logger.error(`Error loading token cache: ${(error as Error).message}`);logger.warn(`Token endpoint upstream OAuth error: ${result.parsed.error}`, {logger.info(`OAuth token verified for user: ${userData.userPrincipalName}`);const TOKEN = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.super-secret-token-value';
remove-account
.releaserc.json
['traversal', '/me/x/../../../beta/me/messages/$value'],
process.env.MS365_MCP_ATTACHMENT_URL_BASE = `http://127.0.0.1:${attachmentPort}`;`http://127.0.0.1:${attachmentPort}/attachment?t=${encodeURIComponent(ticket)}``http://127.0.0.1:${mcpPort}/attachment?t=${encodeURIComponent(ticket)}``http://127.0.0.1:${attachmentPort}/attachment?t=${encodeURIComponent(ticket)}`const get = await fetch(`http://127.0.0.1:${attachmentPort}/mcp`);writeFileSync(bom, 'secret\n');
).toBe('secret');@azure/msal-node, @modelcontextprotocol/sdk, @toon-format/toon, commander, dotenv, express, express-rate-limit, helmet
- **Managed identity**: use managed identity for Key Vault access (no secrets in environment variables)
- `MS365_MCP_REDACT_PII=false|0`: Disable scrubbing of JWTs, Bearer headers, OAuth token fields, and email addresses from log messages (default: enabled). The server handles live Graph bearer tokens,
- **Structured audit log**: enabled by default. Every tool invocation that reaches Microsoft Graph emits one JSON line on stderr (captured by the container platform's log collector) and to `~/.ms-365-
| `/mcp` | GET/POST | MCP protocol endpoint | Bearer token |
Gates applied: no_behavioural_pass.
fba8bb4b1c28full audit observations/trust-audit/mcp-server/softeria__ms-365.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-26 | fba8bb4b1c28 | BLOCK | F | 59 | first audit |
Questions
What is the Ms 365 MCP server?
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Microsoft Office services through the Graph API
What tools does Ms 365 expose?
11 in total: 8 read-only, 2 that write, and 1 that can delete or overwrite (remove-account). Every one is listed on this page with its risk.
Is Ms 365 safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (59/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Ms 365 need?
It reads MS365_MCP_ALLOW_UNAUTHENTICATED_DISCOVERY, MS365_MCP_ATTACHMENT_URL_KEY, MS365_MCP_ATTACHMENT_URL_KEY_FILE, MS365_MCP_AUTH_CACHE_COMMAND, MS365_MCP_CLIENT_SECRET, MS365_MCP_KEYVAULT_URL, MS365_MCP_OAUTH_TOKEN, MS365_MCP_TOKEN_CACHE_PATH and MS365_MCP_TRUST_PROXY_AUTH from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Ms 365 run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @softeria/ms-365-mcp-server at 0.0.0-development.
How current is this page?
The grade is for one exact copy of the source (fba8bb4b1c28), read on 2026-09-26. The repository is watched and re-audited when it changes.