MCP OneNote Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP OneNote Server show my notebooks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP OneNote Server
Un serveur Model Context Protocol (MCP) pour Microsoft OneNote, permettant à des agents IA comme Claude Desktop de lire, créer et analyser des notebooks, sections et pages OneNote — y compris l'extraction automatique du contenu des images via Claude Vision.
✨ Fonctionnalités
📒 Lister les notebooks, sections et pages
📄 Lire le contenu HTML des pages
🖼️ Extraire le texte des images embarquées via Claude Vision (nouveau !)
✏️ Créer des notebooks, sections et pages
🔐 Authentification via Azure AD Device Code Flow
Related MCP server: onenote-mcp
🧰 Prérequis
Un compte Microsoft (personnel ou professionnel)
Une clé API Anthropic (console.anthropic.com)
🚀 Installation étape par étape
Étape 1 — Cloner le projet
git clone https://github.com/FRESHSK/mcp_onenote.git
cd mcp_onenote_01
npm installÉtape 2 — Créer une App Azure AD (une seule fois)
Cette étape permet d'obtenir un Client ID pour accéder à l'API Microsoft Graph.
Aller sur Azure Portal - App Registrations
Cliquer "New registration"
Remplir le formulaire :
Name :
MCP OneNoteSupported account types : choisir la 3ème option (Multitenant + personal Microsoft accounts)
Redirect URI :
Public client/native→http://localhostCliquer Register
Activer les flux publics :
Menu gauche → Authentication
Scroll bas → Advanced settings
Allow public client flows → Yes
Cliquer Save
Copier l'Application (client) ID depuis Overview
Étape 3 — Ajouter les permissions Microsoft Graph API
Après avoir créé l'app Azure AD, tu dois accorder les permissions nécessaires pour accéder à OneNote.
Dans le Azure Portal, aller sur ton App Registration
Menu gauche → API permissions
Cliquer "Add a permission"
Choisir Microsoft Graph
Choisir Delegated permissions
Rechercher et cocher les permissions suivantes :
Permission | Description |
| Lire le profil de l'utilisateur connecté |
| Lire les notebooks OneNote |
| Créer des notebooks et pages |
| Lire et modifier les notebooks OneNote |
Cliquer "Add permissions"
Cliquer "Grant admin consent for ..." (si tu es admin) puis confirmer
ℹ️ Si tu n'es pas admin, les permissions seront accordées lors de la première connexion via Device Code Flow.
Résultat attendu dans Azure Portal :
✅ User.Read (Delegated) - Granted
✅ Notes.Read (Delegated) - Granted
✅ Notes.Create (Delegated) - Granted
✅ Notes.ReadWrite (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
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxx
TOKEN_CACHE_PATH=./token_cache.json⚠️ Ne jamais committer le fichier
.env— il est dans.gitignore
Étape 5 — Première authentification Microsoft
Le serveur a besoin d'un token Microsoft pour accéder à OneNote. Lance ce script une fois :
node debug_auth.jsTu verras dans le terminal :
To sign in, use a web browser to open the page
https://microsoft.com/devicelogin and enter the code XXXXXXXXEntrer le code affiché dans le terminal
Se connecter avec ton compte Microsoft
Un fichier
token_cache.jsonsera créé automatiquement
✅ Cette étape n'est nécessaire qu'une seule fois. Le token se renouvelle automatiquement.
Étape 6 — Configurer Claude Desktop
Éditer le fichier claude_desktop_config.json de Claude Desktop :
Windows :
C:\Users\<user>\AppData\Roaming\Claude\claude_desktop_config.jsonMac :
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"onenote": {
"command": "node",
"args": [
"C:\\chemin\\absolu\\vers\\mcp_onenote_01\\server.js"
],
"env": {
"TOKEN_CACHE_PATH": "C:\\chemin\\absolu\\vers\\mcp_onenote_01\\token_cache.json"
}
}
}
}⚠️ Le
TOKEN_CACHE_PATHabsolu est important pour que Claude Desktop trouve le bon fichier de token.
Étape 7 — Redémarrer Claude Desktop
Fermer et relancer Claude Desktop. Le MCP OneNote sera disponible.
🛠️ Outils disponibles
Outil | Description | Paramètres |
| Liste tous les notebooks | — |
| Liste les sections d'un notebook |
|
| Liste les pages d'une section |
|
| Lit le contenu d'une page (texte + images) |
|
| Crée un nouveau notebook |
|
| Crée une nouvelle section |
|
| Crée une nouvelle page |
|
🖼️ Extraction d'images (Claude Vision)
Quand extract_images: true (par défaut), le tool read_content :
Parse le HTML de la page
Détecte les balises
<img>pointant vers l'API GraphFetche chaque image avec le token Bearer Microsoft
Envoie l'image à Claude Vision pour extraire le contenu textuel
Retourne le texte + le contenu extrait de chaque image
Pour désactiver cette fonctionnalité :
read_content(pageId: "...", extract_images: false)📁 Structure du projet
mcp_onenote_01/
├── server.js # Serveur MCP principal
├── debug_auth.js # Script d'authentification initiale
├── .env # Variables d'environnement (non commité)
├── .env.example # Template des variables d'environnement
├── .gitignore # Fichiers ignorés par Git
├── claude_desktop_config.json # Exemple de config Claude Desktop
├── token_cache.json # Cache du token MSAL (non commité)
└── package.json # Dépendances Node.js📦 Dépendances principales
Package | Usage |
| Serveur MCP |
| Authentification Microsoft |
| Claude Vision pour les images |
| Requêtes HTTP |
| Variables d'environnement |
🔒 Sécurité
Le fichier
.envcontenant les clés est dans.gitignoreLe
token_cache.jsoncontenant les tokens Microsoft est dans.gitignoreNe jamais committer de clés API ou de tokens dans GitHub
🐛 Dépannage
Le MCP ne répond pas dans Claude Desktop ?
→ Vérifier les logs : AppData\Roaming\Claude\logs\mcp-server-onenote.log
Le token expire et redemande l'authentification ?
→ S'assurer que TOKEN_CACHE_PATH pointe vers le bon chemin absolu dans claude_desktop_config.json
→ Relancer node debug_auth.js pour renouveler le token
Erreur media_type sur les images ?
→ Le code normalise automatiquement vers image/png si le type n'est pas supporté par l'API Anthropic
📝 Licence
MIT
Available Tools
7 toolscreate_notebookB
Create a new OneNote notebook
Inputs: displayName (required).
create_pageA
Create a new page in a section
Inputs: sectionId (required), htmlContent (required).
create_sectionA
Create a new section in a notebook
Inputs: notebookId (required), displayName (required).
list_notebooksA
List all OneNote notebooks
Inputs: no named parameters.
list_pagesA
List pages in a section
Inputs: sectionId (required).
list_sectionsB
List sections in a notebook
Inputs: notebookId (required).
read_contentA
Read the HTML content of a page
Inputs: pageId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct resource and action: notebooks, sections, pages, and page content are clearly separated. The hierarchy is obvious from the names and descriptions, so an agent should rarely confuse one tool with another.
Most tools follow a consistent verb_noun pattern such as list_notebooks and create_page. read_content is a slight departure since it refers to a page action but does not include 'page' in the name, though it remains clear and readable.
Seven tools is well-scoped for a OneNote MCP server focused on navigating and creating notebooks, sections, and pages. Each tool covers a necessary operation without redundancy or bloat.
The create and read/list side of the domain is covered well, but there are no update or delete operations for notebooks, sections, or pages. This creates notable gaps for editing or cleaning up content, though basic browsing and creation workflows are functional.
Maintenance
Related MCP Connectors
Search, read, create and edit your Memol notes from Claude. Team note-taking with AI search.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Notes, tasks, habits, journal and 6 more tools Claude can read and change, with undo. Free.
Related MCP Servers
- AlicenseDqualityCmaintenanceEnables AI assistants to securely interact with Microsoft OneNote data through the Microsoft Graph API. It supports comprehensive management tasks including searching page content, creating and editing notes, and automating productivity workflows like daily note creation.204MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read, write, and manage Microsoft OneNote notebooks, sections, and pages through OAuth-authenticated MCP tools, resources, and prompts.1636 npm5MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to sign in with a Microsoft account and read, write, search, create, move, and organize notebooks, section groups, sections, and pages, including drawing Mermaid or SVG diagrams rendered into notes. It also fetches embedded images and page contents as Markdown so handwritten-note workflows and checkboxes can be managed conversationally.36 npmMIT
- AlicenseAqualityCmaintenanceEnables Claude to browse, search, and read Microsoft OneNote notebooks and pages as clean markdown, including viewing screenshots and images at high resolution or zoomed into regions. It also lets users collect pages into reports and write, append, or edit pages, sections, and notebooks, and export original-resolution images and attachments locally.1436 npm2MIT