LABSCO SUMMARY
The device-code flow is two steps on purpose, and the second one is easy to forget.
You start authentication, complete it in a browser, then come back and tell the server you are done — skipping that second call is the usual reason nothing works on the first attempt. Token caching is on by default so this is a once-every-few-weeks event, and turning it off is offered for machines where you would rather sign in every session.
What it is
A Python MCP server that connects Claude Desktop to Microsoft OneNote through the Graph API, using a device-code sign-in that you complete in a browser. It turns your notebooks into something an assistant can search and read.
What you get
- Your notebooks, the sections inside them, and the pages inside those
- The content of a page, read back for analysis or summarising
- Plain-language queries such as asking what is in a named section, rather than clicking through the notebook tree
- A two-step authentication flow with an explicit status check and a way to clear the cached tokens
Requirements
Python 3.10+, uv, and a free Azure app registration. The app needs the Graph delegated permissions Notes.Read, User.Read, and Notes.ReadWrite if you want to write. Put the application id in your client config as AZURE_CLIENT_ID; ONENOTE_CACHE_TOKENS controls whether tokens persist between sessions. Complete the sign-in in Firefox, Chrome or Edge — Safari is reported not to handle the Microsoft redirect properly.
Setup effort
Follow the published steps — git clone https://github.com/purpleslurple/onenote-mcp-server.git
USE CASES
01
Finding notes on a topic across every notebook
Ask in plain language rather than opening each notebook and searching separately.
02
Summarising a section you wrote over months
List the pages in the section and read their content into the conversation.
03
Getting reoriented in your own structure
List the notebooks and their sections to see what you actually have.
04
Fixing an expired session
Check the authentication status, clear the cached tokens, and run the sign-in again.
BEFORE YOU INSTALL
What to know first
Requires
- Python 3.10+
- AZURE_CLIENT_ID in your environment
Where it runs
Both documented setups run the server on your machine.
INSTALLATION
Connect your client
Server setup
TERMINAL
git clone https://github.com/purpleslurple/onenote-mcp-server.git
cd onenote-mcp-server
uv syncMCP Clients
Claude Desktop
CLAUDE DESKTOP · JSON
{
"mcpServers": {
"onenote": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_ONENOTE_MCP_SERVER>",
"run",
"python",
"onenote_mcp_server.py"
],
"env": {
"AZURE_CLIENT_ID": "<YOUR_AZURE_CLIENT_ID>"
}
}
}
}<YOUR_PATH_TO_ONENOTE_MCP_SERVER> is the full path of the onenote-mcp-server folder the clone step created, and <YOUR_AZURE_CLIENT_ID> is the Application (client) ID of your Azure app registration.
Claude Desktop — token caching
CLAUDE DESKTOP — TOKEN CACHING · JSON
{
"mcpServers": {
"onenote": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_ONENOTE_MCP_SERVER>",
"run",
"python",
"onenote_mcp_server.py"
],
"env": {
"AZURE_CLIENT_ID": "<YOUR_AZURE_CLIENT_ID>",
"ONENOTE_CACHE_TOKENS": "true"
}
}
}
}<YOUR_PATH_TO_ONENOTE_MCP_SERVER> is the full path of the onenote-mcp-server folder the clone step created, and <YOUR_AZURE_CLIENT_ID> is the Application (client) ID of your Azure app registration. ONENOTE_CACHE_TOKENS=true (the default) keeps you signed in between sessions; set it to false to sign in every session.