Install guide · Cursor
Install microsoft365-mcp-server for Cursor
Cursor reads ~/.cursor/mcp.json. A project can also commit .cursor/mcp.json.
Add to Cursor: microsoft365-mcp-serverInstall in VS Code: microsoft365-mcp-serverInstall in VS Code Insiders: microsoft365-mcp-server
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
Open ~/.cursor/mcp.json on macOS, %USERPROFILE%\.cursor\mcp.json on Windows, or ~/.cursor/mcp.json on Linux.
Paste the JSON config below.
Replace placeholder secrets, then restart the client if it does not reload on its own.
{ "mcpServers": { "sapientsai-microsoft365-mcp-server": { "command": "npx", "args": [ "-y", "microsoft365-mcp-server@1.3.0" ], "env": { "MS365_CLIENT_ID": "", "MS365_TENANT_ID": "", "MS365_CLIENT_SECRET": "YOUR_MS365_CLIENT_SECRET", "MS365_CERT_PATH": "", "MS365_CERT_PASSWORD": "YOUR_MS365_CERT_PASSWORD", "MS365_ACCESS_TOKEN": "YOUR_MS365_ACCESS_TOKEN", "MS365_AUTH_MODE": "", "MS365_OAUTH_BASE_URL": "", "MS365_READ_ONLY": "", "MS365_ENABLED_TOOLS": "", "MS365_PRESETS": "", "MS365_ORG_MODE": "", "TRANSPORT_TYPE": "" } } }}
Where the config lives
| System | Path |
|---|---|
| macOS | ~/.cursor/mcp.json |
| Windows | %USERPROFILE%\.cursor\mcp.json |
| Linux | ~/.cursor/mcp.json |