MCP Outlook Server MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/FRESHSK/mcp_outlook_01.git
cd mcp_outlook_01
npm install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "MICROSOFT_CLIENT_ID=${MICROSOFT_CLIENT_ID}" -e "MICROSOFT_TENANT_ID=${MICROSOFT_TENANT_ID}" mcp-outlook -- node "<FULL_PATH_TO_MCP_OUTLOOK_CALENDAR>/dist/index.js"

Replace <FULL_PATH_TO_MCP_OUTLOOK_CALENDAR>/dist/index.js with the actual folder you prepared in step 1.

Required:MICROSOFT_CLIENT_IDMICROSOFT_TENANT_ID
README.md

Interact with Microsoft Outlook via the Microsoft Graph API

MCP Outlook Server

Un serveur Model Context Protocol (MCP) pour Microsoft Outlook, permettant à des agents IA comme Claude Desktop d'interagir avec ta boîte mail et ton calendrier via l'API Microsoft Graph.


✨ Fonctionnalités

  • 📧 Mail : Lire, consulter et envoyer des emails
  • 📅 Calendrier : Lister et créer des événements avec lien Teams automatique
  • 🔐 Authentification : Azure AD Device Code Flow avec cache de token persistant
  • 🔄 Auto-refresh : Le token se renouvelle automatiquement

🛠️ Outils disponibles

Outil Description Paramètres
list_messages Liste les 10 derniers emails de la boîte de réception
get_message Lit le contenu complet d'un email message_id
send_message Envoie un email subject, toRecipients, content, contentType
list_events Liste les événements des 7 prochains jours
create_event Crée un événement (avec lien Teams automatique) subject, startDateTime, endDateTime, location, content, attendees

🧰 Prérequis

  • Node.js 18+
  • Un compte Microsoft (personnel ou professionnel)

🚀 Installation étape par étape

Étape 1 — Cloner le projet

git clone https://github.com/FRESHSK/mcp_outlook_01.git
cd mcp_outlook_01
npm install

Étape 2 — Créer une App Azure AD (une seule fois)

  1. Aller sur Azure Portal - App Registrations
  2. Cliquer "New registration"
  3. Remplir le formulaire :
    • Name : MCP Outlook
    • Supported account types : choisir la 3ème option (Multitenant + personal Microsoft accounts)
    • Redirect URI : Public client/nativehttp://localhost
    • Cliquer Register
  4. Activer les flux publics :
    • Menu gauche → Authentication
    • Scroll bas → Advanced settings
    • Allow public client flowsYes
    • Cliquer Save
  5. Copier l'Application (client) ID depuis Overview

Étape 3 — Ajouter les permissions Microsoft Graph API

  1. Dans le Azure Portal, aller sur ton App Registration
  2. Menu gauche → API permissions
  3. Cliquer "Add a permission"
  4. Choisir Microsoft Graph
  5. Choisir Delegated permissions
  6. Rechercher et cocher les permissions suivantes :
Permission Type Description
User.Read Delegated Lire le profil de l'utilisateur connecté
Mail.Read Delegated Lire les emails
Mail.Read.Shared Delegated Lire les emails partagés
Mail.ReadBasic Delegated Lire les infos de base des emails
Mail.ReadWrite Delegated Lire et modifier les emails
Mail.ReadWrite.Shared Delegated Lire et modifier les emails partagés
Mail.Send Delegated Envoyer des emails
Mail.Send.Shared Delegated Envoyer des emails au nom d'autres
Calendars.Read Delegated Lire les calendriers
Calendars.Read.Shared Delegated Lire les calendriers partagés
Calendars.ReadBasic Delegated Lire les infos de base des calendriers
Calendars.ReadWrite Delegated Lire et modifier les calendriers
Calendars.ReadWrite.Shared Delegated Lire et modifier les calendriers partagés
  1. Cliquer "Add permissions"
  2. Cliquer "Grant admin consent for ..." puis confirmer

Résultat attendu dans Azure Portal :

✅ User.Read                    (Delegated) - Granted
✅ Mail.Read                    (Delegated) - Granted
✅ Mail.Read.Shared             (Delegated) - Granted
✅ Mail.ReadBasic               (Delegated) - Granted
✅ Mail.ReadWrite               (Delegated) - Granted
✅ Mail.ReadWrite.Shared        (Delegated) - Granted
✅ Mail.Send                    (Delegated) - Granted
✅ Mail.Send.Shared             (Delegated) - Granted
✅ Calendars.Read               (Delegated) - Granted
✅ Calendars.Read.Shared        (Delegated) - Granted
✅ Calendars.ReadBasic          (Delegated) - Granted
✅ Calendars.ReadWrite          (Delegated) - Granted
✅ Calendars.ReadWrite.Shared   (Delegated) - Granted

Étape 4 — Configurer les variables d'environnement

cp .env.example .env

Éditer .env :

MICROSOFT_CLIENT_ID=ton-client-id-azure
MICROSOFT_TENANT_ID=common

⚠️ Ne jamais committer le fichier .env — il est dans .gitignore

ℹ️ Utilise common pour un compte personnel, ou ton Tenant ID pour un compte organisation.


Étape 5 — Première authentification Microsoft

node server.js

Tu verras dans le terminal :

To sign in, use a web browser to open the page
https://microsoft.com/devicelogin and enter the code XXXXXXXX
  1. Ouvrir https://microsoft.com/devicelogin
  2. Entrer le code affiché dans le terminal
  3. Se connecter avec ton compte Microsoft
  4. Un fichier `token

Tools (5)

list_messagesLists the 10 most recent emails from the inbox.
get_messageReads the full content of an email.
send_messageSends an email.
list_eventsLists events for the next 7 days.
create_eventCreates an event with an automatic Teams link.

Environment Variables

MICROSOFT_CLIENT_IDrequiredThe Application (client) ID from Azure App Registration
MICROSOFT_TENANT_IDrequiredThe Tenant ID (use 'common' for personal accounts)

Configuration

claude_desktop_config.json
{ "mcpServers": { "outlook": { "command": "node", "args": ["/path/to/mcp_outlook_01/server.js"], "env": { "MICROSOFT_CLIENT_ID": "your-client-id", "MICROSOFT_TENANT_ID": "common" } } } }

Try it

List my 10 most recent emails and summarize the urgent ones.
Read the content of the latest email from my manager.
Send an email to john@example.com with the subject 'Meeting Follow-up' and content 'Thanks for the call today.'
What does my calendar look like for the next 7 days?
Create a meeting for tomorrow at 2 PM with Sarah regarding the project launch and include a Teams link.

Frequently Asked Questions

What are the key features of MCP Outlook Server?

Read, browse, and send emails directly through AI. List and create calendar events with automatic Microsoft Teams links. Secure Azure AD Device Code Flow authentication. Persistent token caching with automatic refresh.

What can I use MCP Outlook Server for?

Automating email triage and drafting responses based on context. Quickly scheduling meetings with colleagues without leaving the chat interface. Summarizing upcoming calendar commitments for the week. Managing shared mailboxes and calendars for team coordination.

How do I install MCP Outlook Server?

Install MCP Outlook Server by running: git clone https://github.com/FRESHSK/mcp_outlook_01.git && cd mcp_outlook_01 && npm install

What MCP clients work with MCP Outlook Server?

MCP Outlook Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Outlook Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare