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 MCP search my OneNote for meeting notes from last week"
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.
@atomiclabs97/onenote-mcp
An MCP server for Microsoft OneNote. Bring your notebooks into Claude, Cursor, and any MCP-compatible client — list notebooks and sections, full-text search across pages, read individual pages, and create or delete pages from natural language. Authentication uses Microsoft's device-code flow against your own Entra ID app registration, so your data and credentials never leave your machine.
Screenshot/demo coming soon — drop a GIF in
docs/images/demo.gifand reference it here.
Two ways to run it
You want to use OneNote in… | Run mode | Start here |
Claude Desktop, Cursor, Claude Code on your laptop |
| Quick start below |
claude.ai web + iOS/Android, or any remote client |
|
Stdio is the default and needs no hosting. The HTTP transport is opt-in.
Related MCP server: onenote-mcp
Quick start
1. Register a Microsoft Entra app
The server talks to Microsoft Graph using a Microsoft Entra (Azure AD) app registration that you own. This takes about 2 minutes.
Screenshots referenced below live in
docs/images/. They are placeholders today — contributions welcome.
a. Create the registration
Go to the Microsoft Entra admin center → App registrations and click + New registration.
Name: anything (e.g.
onenote-mcp).Supported account types: choose "Accounts in any organizational directory and personal Microsoft accounts" if you want both work and personal OneNote to work; otherwise pick what matches your tenant.
Redirect URI: leave blank — the device-code flow doesn't need one.
Click Register.

b. Add the API permissions
In the new app's left nav, click API permissions → + Add a permission → Microsoft Graph → Delegated permissions.
Search for and check both:
Notes.ReadWriteoffline_access
Click Add permissions. (No admin consent is required for personal Microsoft accounts. Work/school tenants may need an admin to grant consent for the directory.)

c. Allow the public client flow
The device-code flow is a "public client" flow — it doesn't use a client secret.
Go to Authentication in the left nav.
Scroll to Advanced settings → Allow public client flows and toggle it Yes.
Click Save.

d. Grab the client ID
Back on the app's Overview page, copy the Application (client) ID. You'll pass it to the server via the ONENOTE_MCP_CLIENT_ID environment variable.
![]()
2. Sign in
ONENOTE_MCP_CLIENT_ID=<your-app-client-id> npx @atomiclabs97/onenote-mcp loginThis prints a code and a URL like:
To sign in, use a web browser to open https://microsoft.com/devicelogin
and enter the code ABCD-1234 to authenticate.Open the URL, paste the code, sign in with the Microsoft account whose OneNote you want to access, and approve the requested permissions. The refresh token is then cached at ~/.config/onenote-mcp/tokens.json (mode 600) so the MCP server can run silently.
To sign out:
npx @atomiclabs97/onenote-mcp logout3. Wire it into your MCP client
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"onenote": {
"command": "npx",
"args": ["-y", "@atomiclabs97/onenote-mcp"],
"env": {
"ONENOTE_MCP_CLIENT_ID": "your-app-client-id"
}
}
}
}Restart Claude Desktop. The OneNote tools should appear in the tool picker.
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"onenote": {
"command": "npx",
"args": ["-y", "@atomiclabs97/onenote-mcp"],
"env": {
"ONENOTE_MCP_CLIENT_ID": "your-app-client-id"
}
}
}
}Anything else
Any MCP-compatible client that supports stdio servers will work. Run npx @atomiclabs97/onenote-mcp with ONENOTE_MCP_CLIENT_ID set in the environment.
Remote transport (HTTP)
In addition to the default stdio mode, the server can speak the MCP Streamable HTTP transport. Use this when the MCP client lives somewhere other than the same machine as the server — for example, claude.ai Connectors (web, iOS, Android), a self-hosted bridge on a home server, or a backend integration.
Stdio is still the default. Nothing changes for existing Claude Desktop / Cursor users.
When to use which
Transport | When |
| Local desktop clients (Claude Desktop, Cursor, Claude Code). Tokens never leave your disk; the server runs as a subprocess of the client. |
| Remote clients (claude.ai web/mobile Connectors), self-hosted deployments, any setup where the server runs separately from the client. |
Boot it
# Generate a strong shared secret first — clients must send this as `Authorization: Bearer <token>`.
export ONENOTE_MCP_HTTP_TOKEN="$(openssl rand -base64 32)"
ONENOTE_MCP_CLIENT_ID=<your-app-client-id> \
npx @atomiclabs97/onenote-mcp --transport http --port 3000The server refuses to start without ONENOTE_MCP_HTTP_TOKEN — a remote MCP endpoint with no auth is the entire world reading your OneNote.
Endpoints
Method | Path | Auth | Purpose |
|
|
| MCP Streamable HTTP transport. All tools mounted here. |
|
| none | Liveness probe; returns 200 with no body. For platform health checks. |
Bearer-token comparison is constant-time. Wrong or missing tokens return 401 Unauthorized with a WWW-Authenticate: Bearer header.
Defaults and overrides
Flag | Env var | Default | Notes |
| — |
| |
|
|
| Set to |
|
|
|
Flags win over env vars.
Pointing a client at it
# Sanity check
curl http://127.0.0.1:3000/healthz # → 200
curl -X POST -H "Authorization: Bearer $ONENOTE_MCP_HTTP_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
http://127.0.0.1:3000/mcpSign in with npx @atomiclabs97/onenote-mcp login (one-time, on the host running the server) before any tools are invoked — the device-code flow is the same as the stdio path and caches tokens at ~/.config/onenote-mcp/tokens.json. The bearer token is server↔client auth only; the Microsoft Graph credentials still come from the cached refresh token.
On a headless host (a container, a PaaS) there's no terminal for the device-code login. Run login on your laptop instead, then pass the resulting tokens.json to the server via the ONENOTE_MCP_TOKEN_CACHE env var — on first boot in HTTP mode the server seeds its cache from it. The deployment guides walk through this.
Rotating the bearer token
Pick a new token:
openssl rand -base64 32.Update
ONENOTE_MCP_HTTP_TOKENand restart the server.Update the token everywhere a client uses it.
No session state is kept between requests, so rotation is just a restart — there is nothing to migrate.
Multi-tenant?
No. v0.2 assumes one OneNote account per deployment. The bearer token gates access to whichever account onenote-mcp login was last run for on the host. If you need per-user separation today, run one instance per user.
Limitations
The HTTP transport is stateless: each request gets a fresh transport, no
Mcp-Session-Idis issued, and the server does not push notifications. Tools that perform a single request → single response (i.e. all eleven shipped tools) work normally.No rate-limiting beyond the bearer-token gate. Put the server behind a reverse proxy / API gateway if you need it.
Self-hosting
To use OneNote from claude.ai (web + mobile) you host the HTTP transport somewhere with a public HTTPS URL, then add it as a custom Connector. Copy-paste recipes:
Guide | For |
Fastest path — free-tier eligible, ~10 minutes, HTTPS handled for you. | |
Any host you control; uses the published | |
Wiring the deployed URL into claude.ai and verifying the tools. |
Released Docker images are pushed to the GitHub Container Registry on every version tag.
Tools
Tool | Description | Key inputs |
| Lists all OneNote notebooks for the signed-in user. | (none) |
| Lists sections, optionally scoped to a single notebook. |
|
| Lists section groups (folders), optionally scoped to a notebook. |
|
| Full-text search across pages (title + content). |
|
| Returns page metadata + content (HTML or Markdown). |
|
| Creates a new top-level notebook. |
|
| Creates a section inside a notebook or section group. |
|
| Creates a section group inside a notebook or another section group. |
|
| Creates a page in a section. Accepts Markdown (default) or HTML, plus optional binary attachments. |
|
| Applies edits to a page: append/prepend/insert/replace/delete elements. |
|
| Permanently deletes a page. Irreversible. |
|
Configuration
Env var | Required | Description |
| yes | Application (client) ID of your Microsoft Entra app registration. |
| no | Tenant ID. Defaults to |
| http only | Shared bearer token for the HTTP transport. Required when |
| no | Bind address for the HTTP transport. Defaults to |
| no | Listen port for the HTTP transport. Defaults to |
| no | Verbatim |
| no | Override the config directory. Tokens are stored at |
Known limitations
Attachments are sent in-memory.
create_pagereads attachment files synchronously before posting; very large files (~150 MB+) may strain Node's heap. Streamed uploads are a future enhancement.update_pagetargets are rawdata-idselectors. To edit a specific element, read the page first and pull thedata-idattribute out of the returned HTML. Higher-level selectors (e.g. "the section under heading X") are tracked for a follow-up.Search latency. Microsoft Graph's
$searchagainst/me/onenote/pagescan take a few seconds against large notebooks; the server retries on 429s with exponential backoff.
Contributing
PRs welcome. The codebase aims to stay small and focused.
git clone https://github.com/ahmadAlMezaal/onenote-mcp
cd onenote-mcp
yarn install
yarn build
yarn testyarn typecheck—tsc --noEmit(coverssrc/+scripts/)yarn lint— ESLintyarn test— Vitest (unit tests, mocked Graph)yarn dev— incremental rebuild on save (tsc --watch+tsc-alias --watch);dist/stays runnable
Use Yarn (Classic), not npm. The repo's lockfile is
yarn.lock—package-lock.jsonshould not be committed.
End-to-end smoke test
scripts/smoke.ts exercises every shipped tool against a real OneNote account. It's not in CI — needs real credentials.
# One-time: register an Entra app (see Quick start above) and sign in
ONENOTE_MCP_CLIENT_ID=<your-client-id> yarn build
ONENOTE_MCP_CLIENT_ID=<your-client-id> node dist/cli.js login
# Then run the smoke test
ONENOTE_MCP_CLIENT_ID=<your-client-id> yarn smokeIt's idempotent: reuses (or creates) a notebook called OneNote MCP Smoke Test, walks through 12 steps covering auth, list/search/read/create/update/delete and the multipart attachment path, and cleans up the pages it creates. Sections and section groups are left behind for the next run.
If you're using an AI coding assistant (Claude Code, Cursor, etc.), see CLAUDE.md for project conventions, the arrow-function rule, and the tool-authoring checklist.
Commits follow Conventional Commits (feat:, fix:, chore:, etc.). CI runs typecheck + lint + test + build on every push and PR.
Roadmap
update_page— in-place edits via Graph'sPATCHsyntaxcreate_section/create_notebookImage and attachment upload (multipart create_page)
Section group support (list + create + section-in-group targeting)
HTTP (Streamable HTTP) transport with bearer-token auth
Self-hosted deployment guide (Dockerfile + Fly.io recipe + claude.ai Connector validation)
Streamed attachment uploads (avoid in-memory buffering for large files)
Resource-style page browsing (alongside the tool surface)
License
MIT © Ahmad Al Mezaal
Available Tools
18 toolsauth_statusAuth StatusA
Reports which Microsoft account is signed in, the token cache location, and whether the cached token still works. Use it first when a OneNote call fails with an authentication error.
Inputs: no named parameters.
copy_pageCopy PageA
Copies a page into another section, alongside its original. The source page is left untouched — this never moves or deletes anything.
Inputs: pageId (required), targetSectionId (required).
create_notebookCreate NotebookB
Creates a new top-level OneNote notebook with the given display name.
Inputs: name (required).
create_pageCreate PageA
Creates a new OneNote page in the given section. Accepts Markdown (default) or HTML; optional attachments upload binary parts referenced from the content via name:<name> URIs.
Inputs: title (required), content (required), sectionId (required), format, +1 more.
create_sectionCreate SectionA
Creates a new section inside the given notebook or section group. Exactly one of notebookId or sectionGroupId must be provided.
Inputs: name (required), notebookId, sectionGroupId.
create_section_groupCreate Section GroupA
Creates a new section group inside the given notebook or another section group. Exactly one of notebookId or sectionGroupId must be provided.
Inputs: name (required), notebookId, sectionGroupId.
delete_pageDelete PageADestructiveIdempotent
Permanently deletes a OneNote page by ID. There is no undo — confirm with the user before calling.
Inputs: pageId (required).
find_pagesFind PagesA
Searches OneNote pages by text and returns matches with page IDs, titles, and where they live. Works section-scoped, notebook-scoped, or across the whole account. This is the working alternative to search_pages, which relies on a Graph search endpoint that rejects requests on this account.
Inputs: query (required), limit, sectionId, notebookId, +2 more.
get_notebook_treeGet Notebook TreeA
Maps the OneNote structure: notebooks, the section groups inside them, and every section with its ID. Start here when you need section IDs for list_pages, create_page, or find_pages.
Inputs: notebookId, includePageCounts.
indexPage IndexA
Maintains a local mirror of the OneNote structure (notebook/section/page names and IDs) so page lookup and search are instant instead of costing a Graph round trip each. Search and status are offline. Sync/rebuild hit Graph and can take minutes on a large account — prefer sync, and scope it with sections when you know what changed.
Inputs: mode (required), limit, query, section, +3 more.
list_notebooksList NotebooksA
Lists all OneNote notebooks accessible to the signed-in user, including notebook IDs needed for other tools.
Inputs: no named parameters.
list_pagesList PagesA
Lists pages in a OneNote section, or across every section of a notebook, without needing a search term. Use it to browse what exists and get page IDs. Note: there is no account-wide page listing — Graph rejects it on accounts with many sections, so scope by section or notebook.
Inputs: limit, order, orderBy, sectionId, +1 more.
list_section_groupsList Section GroupsC
Lists OneNote section groups (folders that contain sections and/or other section groups), optionally scoped to a single notebook.
Inputs: notebookId.
list_sectionsList SectionsA
Lists OneNote sections, optionally scoped to a single notebook by ID. Section IDs are needed by create_page.
Inputs: notebookId.
read_pageRead PageA
Returns the full content and metadata for a single OneNote page. Defaults to HTML; pass format="markdown" for converted output.
Inputs: pageId (required), format.
resolve_pageResolve PageA
Turns a human description of a page ("今日任务 / 香港", or a title alone) into a real page ID, served from the local index. Use this before reading or editing a page you named rather than identified. Stored IDs go stale when a page is moved, so this verifies against Graph on a miss and repairs the index.
Inputs: title, pageId, section, notebook.
search_pagesSearch PagesA
Searches OneNote pages by full-text query. Returns matching pages with IDs, titles, and parent section/notebook info.
Inputs: query (required), limit.
update_pageUpdate PageADestructive
Applies one or more edits to an existing OneNote page (append, prepend, insert, replace, delete). Targets are body, title, or #<data-id> selectors — find data-id values in the HTML returned by read_page.
Inputs: pageId (required), operations (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools target distinct resources and actions, but search_pages and find_pages are nearly identical in purpose, with find_pages described as a working alternative to a broken search endpoint. This creates a real selection hazard. Other pairs like list_sections and get_notebook_tree overlap somewhat but are differentiated by scope.
The overwhelming majority of tools follow a clear verb_noun snake_case pattern: list_notebooks, create_page, update_page, delete_page, copy_page. Minor deviations exist with auth_status and index, which are nouns rather than verb_noun actions, but the pattern remains predictable and readable.
18 tools is on the heavy side for a single-domain server and includes some redundancy, particularly search_pages/find_pages. The count is still within a usable range, but the set feels slightly bloated due to overlapping search functionality and support tools like index and resolve_page.
Page lifecycle coverage is solid: create, read, update, delete, list, search, and copy all exist. However, notebooks, sections, and section groups only support create/list, with no update, delete, or move operations, leaving noticeable structural management gaps. Search also has a redundant/broken path, which suggests incomplete cleanup of the tool surface.
Maintenance
Related MCP Connectors
Save and search your LostInNotes notes by meaning from any MCP client. OAuth sign-in or token.
Search and manage your team's knowledge from MCP clients.
Search, read, write, and organize your Scratchpad notes from any MCP client.
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables natural language access to Microsoft OneNote notebooks, sections, and pages for reading and listing content.59MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read, write, and manage Microsoft OneNote notebooks, sections, and pages through OAuth-authenticated MCP tools, resources, and prompts.1627 npm6MIT
- AlicenseAqualityBmaintenanceMCP server that enables AI assistants to interact with Microsoft OneNote, allowing listing, reading, searching, and creating notes.191MIT
- AlicenseAqualityCmaintenanceMCP server that connects AI tools to Microsoft OneNote for Business via the Microsoft Graph API, enabling listing, creating, and updating notebooks, sections, and pages.6MIT