io.github.sapientsai/microsoft365-mcp-server
Microsoft 365 via Graph — mail, calendar, contacts, files, Teams, Planner, OneNote, To Do.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
microsoft365-mcp-serverclaude mcp add microsoft365-mcp-server -e 'MS365_CLIENT_ID=<MS365_CLIENT_ID>' -e 'MS365_TENANT_ID=<MS365_TENANT_ID>' -e 'MS365_CLIENT_SECRET=<your ms365_client_secret>' -e 'MS365_CERT_PATH=<MS365_CERT_PATH>' -e 'MS365_CERT_PASSWORD=<your ms365_cert_password>' -e 'MS365_ACCESS_TOKEN=<your ms365_access_token>' -e 'MS365_AUTH_MODE=<MS365_AUTH_MODE>' -e 'MS365_OAUTH_BASE_URL=<MS365_OAUTH_BASE_URL>' -e 'MS365_READ_ONLY=<MS365_READ_ONLY>' -e 'MS365_ENABLED_TOOLS=<MS365_ENABLED_TOOLS>' -e 'MS365_PRESETS=<MS365_PRESETS>' -e 'MS365_ORG_MODE=<MS365_ORG_MODE>' -e 'TRANSPORT_TYPE=<TRANSPORT_TYPE>' -- npx -y microsoft365-mcp-server@1.2.20
{
"mcpServers": {
"microsoft365-mcp-server": {
"command": "npx",
"args": [
"-y",
"microsoft365-mcp-server@1.2.20"
],
"env": {
"MS365_CLIENT_ID": "<MS365_CLIENT_ID>",
"MS365_TENANT_ID": "<MS365_TENANT_ID>",
"MS365_CLIENT_SECRET": "<your ms365_client_secret>",
"MS365_CERT_PATH": "<MS365_CERT_PATH>",
"MS365_CERT_PASSWORD": "<your ms365_cert_password>",
"MS365_ACCESS_TOKEN": "<your ms365_access_token>",
"MS365_AUTH_MODE": "<MS365_AUTH_MODE>",
"MS365_OAUTH_BASE_URL": "<MS365_OAUTH_BASE_URL>",
"MS365_READ_ONLY": "<MS365_READ_ONLY>",
"MS365_ENABLED_TOOLS": "<MS365_ENABLED_TOOLS>",
"MS365_PRESETS": "<MS365_PRESETS>",
"MS365_ORG_MODE": "<MS365_ORG_MODE>",
"TRANSPORT_TYPE": "<TRANSPORT_TYPE>"
}
}
}
}
Variables d'environnement
MS365_CLIENT_IDobligatoire Azure AD application (client) ID. Every mode except client-token needs it.MS365_TENANT_IDAzure AD tenant ID, or 'common'/'organizations'/'consumers'. Read by certificate, client-secret and oauth-proxy modes.MS365_CLIENT_SECRETsecret Azure AD client secret (client-secret mode).MS365_CERT_PATHPath to the certificate used by certificate mode.MS365_CERT_PASSWORDsecret Password for the certificate at MS365_CERT_PATH, if it has one.MS365_ACCESS_TOKENsecret A Graph access token supplied directly (client-token mode).MS365_AUTH_MODEAuth mode: interactive (default), certificate, client-secret, client-token or oauth-proxy.MS365_OAUTH_BASE_URLBase URL of the OAuth proxy (oauth-proxy mode).MS365_READ_ONLYSet to 'true' to expose read-only tools and refuse every write.MS365_ENABLED_TOOLSCase-insensitive regular expression matched against tool names; only matching tools are registered. Not a comma-separated list.MS365_PRESETSComma-separated tool presets to enable instead of naming tools individually.MS365_ORG_MODESet to 'true' for organisation-wide (application-permission) behaviour.TRANSPORT_TYPETransport: 'stdio' (the default, and what this npm package is listed as) or 'httpStream' for remote/Docker deployments.
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
microsoft365-mcp monorepo
pnpm workspace for the Microsoft Graph MCP servers. Descends from the archived
sapientsai/microsoft-mcp-server — split into
two focused servers over a shared core. The app-only server keeps the original
microsoft-mcp-server name; the delegated server is microsoft365-mcp-server.
Packages
packages/microsoft365—microsoft365-mcp-server, the delegated (OAuth-proxy) MS365 gateway: 40+ tools across mail, calendar, contacts, files, Teams, Planner, OneNote, To Do, and more via Microsoft Graph. Published to npm. See its README and the monorepo DEPLOYMENT.md.packages/graph—microsoft-mcp-server(the original name), a lean app-only (client_credentials) server purpose-built for headless document-RAG:microsoft_graphpassthrough +microsoft_graph_batch+read_document+sharepoint_search+ optionalazure_ai_search+ a/uploadrelay. Ships as a Docker image atghcr.io/sapientsai/microsoft-mcp-server. See its README.packages/core—@sapientsai/ms-graph-core, the shared plumbing (upload helpers, ticket tokens, OData/pagination, error and auth-strategy types) used by both servers. Internal workspace package, not published.
Pick by auth model: use packages/microsoft365 when a user is present to consent (interactive
OAuth); use packages/graph for tenant-wide, headless, app-only deployments.
Development
pnpm install
pnpm validate # format + lint + test + build across all packages
pnpm build # build all packages
pnpm test # test all packages
Per-package commands run inside the package dir, e.g.:
pnpm --filter microsoft365-mcp-server build
pnpm --filter microsoft-mcp-server dev
History
Design context for the split lives in
SAI_PLAN_ms-graph-monorepo_2026-06-20.md.
Questions fréquentes
Qu'est-ce que io.github.sapientsai/microsoft365-mcp-server ?
Microsoft 365 via Graph — mail, calendar, contacts, files, Teams, Planner, OneNote, To Do.
Comment installer io.github.sapientsai/microsoft365-mcp-server ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add microsoft365-mcp-server -e 'MS365_CLIENT_ID=<MS365_CLIENT_ID>' -e 'MS365_TENANT_ID=<MS365_TENANT_ID>' -e 'MS365_CLIENT_SECRET=<your ms365_client_secret>' -e 'MS365_CERT_PATH=<MS365_CERT_PATH>' -e 'MS365_CERT_PASSWORD=<your ms365_cert_password>' -e 'MS365_ACCESS_TOKEN=<your ms365_access_token>' -e 'MS365_AUTH_MODE=<MS365_AUTH_MODE>' -e 'MS365_OAUTH_BASE_URL=<MS365_OAUTH_BASE_URL>' -e 'MS365_READ_ONLY=<MS365_READ_ONLY>' -e 'MS365_ENABLED_TOOLS=<MS365_ENABLED_TOOLS>' -e 'MS365_PRESETS=<MS365_PRESETS>' -e 'MS365_ORG_MODE=<MS365_ORG_MODE>' -e 'TRANSPORT_TYPE=<TRANSPORT_TYPE>' -- npx -y microsoft365-mcp-server@1.2.20. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour io.github.sapientsai/microsoft365-mcp-server ?
Oui. Il attend MS365_CLIENT_ID, MS365_CLIENT_SECRET, MS365_CERT_PASSWORD, MS365_ACCESS_TOKEN, à renseigner dans sa configuration.
io.github.sapientsai/microsoft365-mcp-server est-il open source ?
Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.
Qui maintient io.github.sapientsai/microsoft365-mcp-server ?
Il est publié par sapientsai. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.