loading…
Search for a command to run...
loading…
MCP server for Microsoft 365 via the Microsoft Graph API, providing read-only access to profile, calendar, email, Teams chats, OneDrive files, and meeting trans
MCP server for Microsoft 365 via the Microsoft Graph API, providing read-only access to profile, calendar, email, Teams chats, OneDrive files, and meeting transcripts from any MCP client.
npm version MIT License Node.js TypeScript CI
MCP server for Microsoft 365 via the Microsoft Graph API. Read-only access to your profile, calendar, email, Teams chats, OneDrive files, and meeting transcripts from any MCP client.
claude mcp add m365-mcp -e MS365_MCP_CLIENT_ID=your-client-id -e MS365_MCP_TENANT_ID=your-tenant-id -- npx -y @masonator/m365-mcp
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"m365-mcp": {
"command": "npx",
"args": ["-y", "@masonator/m365-mcp"],
"env": {
"MS365_MCP_CLIENT_ID": "your-azure-ad-client-id",
"MS365_MCP_TENANT_ID": "your-azure-ad-tenant-id"
}
}
}
}
On first use, the server opens your browser to sign in with Microsoft. After granting consent, tokens are stored locally at ~/.config/m365-mcp/tokens.json (permissions 600) and refreshed automatically.
| Variable | Required | Description |
|---|---|---|
MS365_MCP_CLIENT_ID |
Yes | Azure AD application (client) ID |
MS365_MCP_TENANT_ID |
Yes | Azure AD tenant ID |
MS365_MCP_CLIENT_SECRET |
No | Azure AD client secret (confidential clients only) |
MS365_MCP_TIMEZONE |
No | Timezone for calendar (default: system timezone) |
MS365_MCP_REDIRECT_URL |
No | OAuth redirect URI (default: dynamic port, http://localhost:{port}/callback) |
Register an application in Azure AD with these settings:
http://localhost (Web platform) — or set a fixed URI via MS365_MCP_REDIRECT_URLUser.ReadCalendars.ReadMail.ReadChat.ReadFiles.ReadOnlineMeetingTranscript.Read.AllSites.Read.Allms_auth_statusCheck connection status. If not connected, opens browser to sign in.
ms_profileFetch your Microsoft 365 profile — display name, email, job title, office location.
ms_calendarFetch calendar events. Defaults to today.
| Parameter | Description |
|---|---|
date |
Specific date (YYYY-MM-DD) |
start |
Start of range (ISO 8601) |
end |
End of range (ISO 8601) |
ms_mailRead recent emails with optional keyword search.
| Parameter | Description |
|---|---|
search |
Keyword to filter emails |
count |
Number of emails (1-25, default 10) |
ms_chatRead Teams chats. Without chat_id lists recent chats; with chat_id returns messages from that thread.
| Parameter | Description |
|---|---|
chat_id |
Specific chat thread ID |
count |
Number of items (1-25, default 10) |
ms_filesBrowse or search OneDrive files.
| Parameter | Description |
|---|---|
path |
Folder path (e.g., /Documents) |
search |
Search across OneDrive |
count |
Max items (1-50, default 20) |
ms_transcriptsFetch Teams meeting transcripts. Returns previews (~3000 chars) with a transcript_id for drill-down to the full transcript.
| Parameter | Description |
|---|---|
date |
Date (YYYY-MM-DD) |
start |
Start of range (ISO 8601) |
end |
End of range (ISO 8601) |
transcript_id |
ID from a previous list call for full content |
git clone https://github.com/StuMason/m365-mcp.git
cd m365-mcp
npm install
npm run build
npm test
See CONTRIBUTING.md for details.
MIT - Stu Mason
Выполни в терминале:
claude mcp add m365-mcp -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.