- Home
- MCP servers
- M365 Copilot
M365 Copilot
- typescript
1
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can connect your Microsoft 365 data to AI assistants like GitHub Copilot and Claude Desktop by running the MCP server. It lets you query SharePoint, OneDrive, email, calendar, and Teams meetings with full permission enforcement, so your AI answers stay in sync with what you’re allowed to access.
How to use
Start the MCP server and connect it with your MCP clients. You will authenticate once to grant delegated access to your own Microsoft 365 data. Then you can use tools to retrieve documents, summarize meetings, search files, and chat about your data. Common usage patterns include: quick Q&A about your calendar or contacts, deep retrieval for policy or contract documents, meeting-follow-up actions, and semantic file discovery.
How to install
Prerequisites: Python 3.11 or newer and an Azure AD app registration with delegated permissions.
- Clone the project and enter the directory.
# Clone the repo
git clone https://github.com/renepajta/m365-copilot-mcp.git
cd m365-copilot-mcp
# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install the package in editable mode with development dependencies
pip install -e ".[dev]"
Configure and authenticate
Create a local environment file with your Azure AD app credentials. You will authenticate interactively to grant access to your own data.
AZURE_CLIENT_ID=your-app-client-id
AZURE_TENANT_ID=your-tenant-id
# Optional: specify the account if multiple are cached
# AZURE_USERNAME=user@contoso.com
Run the server (local development)
Authenticate once to cache credentials, then start the HTTP server for local testing.
m365-copilot --auth
# Run in HTTP mode for debugging on port 8000
m365-copilot --http --port 8000
# Check health
curl http://localhost:8000/health
Client setup notes
To use the MCP server in your editors or copilots, you configure an MCP client to connect to the local HTTP endpoint or to launch the local stdio interface. The server supports both a local HTTP endpoint and a built-in stdio launcher for convenient terminal-based workflows.
Available tools
m365_retrieve
Retrieval API that returns text chunks for your AI to reason over, useful for custom retrieval and deep analysis.
m365_chat
Chat API where M365 Copilot synthesizes an answer, ideal for quick Q&A and calendar/people insights.
m365_meetings
Meeting Insights API that provides AI-generated summaries and action items from meetings.
m365_search
Search API for semantic document discovery across your Microsoft 365 data.
m365_chat_with_files
Chat with Files API to ask questions about specific documents and summarize known files.