Get the FREE Ultimate OpenClaw Setup Guide →

office365

Complete Microsoft Graph API integration for Claude Code CLI with 45 powerful Office 365 tools - Email, Calendar, Files, Contacts, Teams, Tasks

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio eesb99-office365-mcp-server node /absolute/path/to/office365-mcp-server/office365-sdk.js \
  --env AZURE_AUTHORITY="https://login.microsoftonline.com/your-tenant-id-here" \
  --env AZURE_CLIENT_ID="your-client-id-here" \
  --env AZURE_CLIENT_SECRET="your-client-secret-here" \
  --env OFFICE365_USER_EMAIL="your-email@yourdomain.com"

How to use

This MCP server provides a complete integration with Microsoft 365 (Office 365) through Claude Code CLI. It exposes 45 production-ready tools across Email, Calendar, OneDrive, Contacts, Teams, and Tasks, enabling natural language queries to read, search, create, and manage mailbox items, events, files, contacts, channels, and to-dos. Once configured in Claude Code CLI with the Office365 MCP server, you can issue commands like: 'Show me my last 10 emails', 'Create a meeting tomorrow at 2pm', or 'List all my Teams channels'. The server handles authentication with Azure AD using the provided credentials and calls the Microsoft Graph API under the hood, returning structured results suitable for Claude Code CLI prompts and follow-up actions.

How to install

Prerequisites:

  • Node.js 18.x or higher
  • npm (comes with Node.js)
  • Access to an Azure AD tenant and required Graph API permissions

Step 1: Clone the repository

git clone https://github.com/eesb99/office365-mcp-server.git
cd office365-mcp-server

Step 2: Install dependencies

npm install

Step 3: Configure environment variables Copy the example env file and edit with your credentials:

cp .env.example .env

Fill in:

⚠️ Do not commit the .env file to version control.

Step 4: Run the server
```bash
node office365-sdk.js

Step 5: Add the MCP server to Claude Code CLI configuration as shown in the README (settings.json path ~/.claude.json).

Additional notes

Tips and caveats:

  • Ensure the Azure AD application has the minimum required Graph permissions (User.Read.All, Mail.Read, Calendars.Read, Files.Read.All) and the full set if you intend to access all 45 tools.
  • Use absolute paths in Claude Code CLI configuration to avoid path resolution issues.
  • Protect your Azure credentials; never expose the .env file publicly.
  • If tools fail to appear in Claude Code CLI, verify that the office365-sdk.js path is correct, environment variables are loaded, and Node.js version is 18 or higher.
  • When updating permissions, you may need to grant admin consent for the changes to take effect.

Related MCP Servers

Sponsor this space

Reach thousands of developers