M365 MCP

M365 MCP

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.

Category
Visit Server

README

M365 MCP

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.

Installation

Claude Code

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

Claude Desktop

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"
      }
    }
  }
}

First Run

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.

Environment Variables

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)

Azure AD Setup

Register an application in Azure AD with these settings:

  1. App registration > New registration
  2. Redirect URI: http://localhost (Web platform) — or set a fixed URI via MS365_MCP_REDIRECT_URL
  3. Certificates & secrets > New client secret
  4. API permissions > Add the following delegated permissions:
    • User.Read
    • Calendars.Read
    • Mail.Read
    • Chat.Read
    • Files.Read
    • OnlineMeetingTranscript.Read.All
    • Sites.Read.All

Tools

ms_auth_status

Check connection status. If not connected, opens browser to sign in.

ms_profile

Fetch your Microsoft 365 profile — display name, email, job title, office location.

ms_calendar

Fetch 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_mail

Read recent emails with optional keyword search.

Parameter Description
search Keyword to filter emails
count Number of emails (1-25, default 10)

ms_chat

Read 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_files

Browse or search OneDrive files.

Parameter Description
path Folder path (e.g., /Documents)
search Search across OneDrive
count Max items (1-50, default 20)

ms_transcripts

Fetch 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

Development

git clone https://github.com/StuMason/m365-mcp.git
cd m365-mcp
npm install
npm run build
npm test

Contributing

See CONTRIBUTING.md for details.

License

MIT - Stu Mason

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured