OneNote MCP
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., "@OneNote MCPadd a mermaid diagram of the auth flow to my Design section"
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.
OneNote connector for Claude
A hosted MCP server that lets Claude read, write, search and organise Microsoft OneNote. Anyone can add it to Claude by pasting one URL and signing in with Microsoft. They don't install anything or register their own Azure app.
Claude ──OAuth (DCR + PKCE)──▶ this server ──OAuth──▶ Microsoft identity
│ │
└──── MCP tool calls ─────────▶ └──── Microsoft Graph /me/onenote ───▶ OneNoteWhat Claude can do
Tool | What it does |
| All notebooks, newest first |
| Full tree of section groups (folders) and sections, with IDs |
| Pages in a section, in OneNote order |
| Title search across everything; optional full-text search within a notebook/section |
| Page as Markdown (to-dos, tables, image references), or as HTML with element IDs |
| Fetch an embedded image so Claude can see it (diagrams, photos of the whiteboard) |
| New page from Markdown. |
| Add to the start or end of a page |
| Rename, or replace/insert specific paragraphs |
| Draw a Mermaid or SVG diagram onto an existing page or a new one |
| Delete a page (flagged destructive so Claude asks first) |
| Build structure |
| Move (or copy) a page to another section |
| Copy a whole section into another notebook or folder, optionally renamed |
| Which Microsoft account is connected |
Diagrams
Claude can draw straight into your notes. Any page content can include:
```mermaid Closed-loop motor control
flowchart LR
Setpoint --> Controller --> Motor --> Encoder --> Controller
```
```svg Free-body diagram
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> ... </svg>
```Mermaid covers flowcharts and sequence, state, class, ER, Gantt and mind-map diagrams.
SVG covers everything else: circuits, free-body diagrams, mechanisms and annotated plots.
Both are rendered to 2× PNGs on the server and uploaded into the page. OneNote stores pages as images and can't hold SVG directly. Any text after the language name becomes the alt text. If a diagram has a syntax error, the error goes back to Claude so it can fix the diagram and try again, and nothing is written to the page.
How rendering works:
SVG uses resvg. It runs no scripts and never fetches external resources.
Mermaid runs in headless Chromium with
securityLevel: "strict". All network requests are blocked, the Mermaid bundle is loaded fromnode_modules, and at most two renders run at once.No Chromium? If the server can't start Chromium, Mermaid rendering returns an error telling Claude to use SVG instead.
What the Microsoft API can't do: rename or delete notebooks and sections, or read handwriting/ink. Claude is told this, so it'll say so instead of failing quietly.
Related MCP server: OneNote MCP Server
Using it (end users)
In Claude, go to Settings → Connectors → Add custom connector.
Paste
https://<your-host>/mcp.Click Connect, review the consent screen, then sign in with Microsoft.
Hosting it
1. Register an app in Microsoft Entra (about 5 minutes)
Go to https://entra.microsoft.com → App registrations → New registration.
Supported account types: Accounts in any organizational directory and personal Microsoft accounts.
Redirect URI: platform Web,
https://<your-host>/oauth/microsoft/callback.In Certificates & secrets, create a client secret and copy the Value.
In API permissions, add Microsoft Graph → Delegated:
Notes.ReadWrite,User.Read,offline_access.Copy the Application (client) ID from Overview.
School and work accounts: most organisations only let users consent to multi-tenant apps from a verified publisher. Personal Microsoft accounts work right away. For students, either complete publisher verification (needs a Microsoft AI Cloud Partner Program ID) or ask the university's IT to approve the app for their tenant.
2. Configure and run
cp .env.example .env # fill it in
openssl rand -hex 32 # → TOKEN_ENCRYPTION_KEY
npm ci && npm run build && npm startor with Docker:
docker build -t onenote-mcp .
docker run -p 3000:3000 --env-file .env onenote-mcpThe Docker image includes Chromium and DejaVu fonts. When running outside Docker, set CHROMIUM_PATH to a Chromium or Chrome binary for Mermaid support.
Set DATABASE_URL to a Postgres database for production. The server creates its one table (kv) on boot. Without a database it falls back to memory, and everyone has to reconnect after a restart.
The server is stateless, so you can run as many replicas as you like behind a load balancer. All state lives in Postgres.
Security
Consent screen and CSRF: every new client must be approved by the user before the server forwards them to Microsoft. This addresses the MCP spec's confused-deputy issue for proxy servers. The approval is bound to a
SameSite=Strictcookie, so another site can't auto-submit it, and the page can't be framed.Redirect URIs must match the ones the client registered. PKCE (S256) is required.
Microsoft tokens never leave the server. They're encrypted at rest with AES-256-GCM. Claude only gets opaque tokens issued by this server, stored as SHA-256 hashes, with refresh tokens rotated on every use.
If the user revokes access at Microsoft, the stored sign-in is deleted. Claude gets a 401 on the next request and asks the user to reconnect.
Only delegated
Notes.ReadWriteis requested, so the server can only touch the signed-in user's own notebooks.
Development
npm test # end-to-end tests against a fake Microsoft + Graph
TEST_DATABASE_URL=postgres://... npm test # same, against Postgres
npm run devThe tests run the real OAuth flow end to end: discovery, dynamic registration, consent, Microsoft redirect, code exchange, refresh rotation and revocation. They then drive every tool through the official MCP client. They also cover Graph pagination, throttling retries, token expiry, and diagram uploads. For diagrams, the fake Graph parses the real multipart requests and checks that the PNGs arrive.
Licence
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Notes and actions in one app. Let Claude or ChatGPT read and update them.
Search, read, create and edit your Memol notes from Claude. Team note-taking with AI search.
- platform7nOAuthtech.p7n
Connect Claude to your Platform7n workspaces — chat, links, and tasks. One-click OAuth.
- TaprootOAuthcom.taproothq
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables Claude to read and write to local Microsoft OneNote notebooks by parsing backup files and utilizing the OneNote COM API. It allows for searching notes, creating pages, and appending content without requiring Azure registration or API keys.104-
- 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.203MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to read, write, and manage Microsoft OneNote notebooks, sections, and pages through OAuth-authenticated MCP tools, resources, and prompts.1619 npm5MIT
- FlicenseAqualityFmaintenanceEnables AI agents to read, create, and analyze Microsoft OneNote notebooks, sections, and pages, including automatic image text extraction via Claude Vision.71-