OneNote MCP Server
Click on "Install 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 Serverlist 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.
OneNote MCP Server
MCP server (SSE & Streamable HTTP) that connects to OneNote via Microsoft Graph and exposes tools to list your notes and read each note’s content. Built with the official Model Context Protocol (MCP) Python SDK and a clean, layered architecture.
Features
Transports: Streamable HTTP (default) and SSE (Server-Sent Events)
Tools:
list_notes— list all OneNote notebookslist_note_sections— list sections in a notebooklist_note_pages— list pages (in a section or all)read_note_content— get the HTML content of a page
Auth: Microsoft Graph via Azure Identity (delegated or application)
Related MCP server: OneNoteMCP
Architecture
src/onenote_mcp/
├── domain/ # Models and ports (interfaces)
│ ├── models.py # Notebook, Section, Page
│ └── ports.py # OneNoteGateway
├── application/ # Use cases
│ └── use_cases.py # list_notebooks, list_sections, list_pages, get_note_content
├── infrastructure/ # Microsoft Graph
│ └── graph_client.py # GraphOneNoteGateway
├── server.py # MCP FastMCP app + tools
└── main.py # Entrypoint (SSE / Streamable HTTP)Domain: entities and gateway interface; no framework or Graph details.
Application: use cases that call the gateway.
Infrastructure: Graph API implementation of the gateway.
Server: MCP (FastMCP) tools that use the use cases and lifespan-injected gateway.
Requirements
Python ≥ 3.10
Azure app registration with Notes.Read (delegated) or Notes.Read.All (application)
Setup
1. Clone and install
cd onenote
python3 -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -e .This installs the package in editable mode so onenote_mcp is on your path. Alternatively:
pip install -r requirements.txt
pip install -e .Or with uv:
uv sync2. Azure app registration
In Azure Portal → App registrations → New registration (name e.g. "OneNote MCP").
API permissions → Add permission → Microsoft Graph → Delegated:
Notes.Read(orNotes.ReadWrite)User.Read
Authentication → Add a platform → Mobile and desktop applications → add a redirect URI (e.g.
http://localhost:8400; must matchAZURE_REDIRECT_URIin.env) → Save. Then set Allow public client flows = Yes.In
.env: setAZURE_CLIENT_ID; optionallyAZURE_TENANT_IDandAZURE_REDIRECT_URI(defaulthttp://localhost:8400).For application (app-only) auth instead: add Application permission
Notes.Read.All, create a client secret, and setONENOTE_USER_ID.
Enterprise: admin consent
In work or school (organization) tenants, your IT admin may need to grant consent for the app before you can access OneNote. If you see an error like "Need admin approval" or "Need permission to access resources in your organization that only an admin can grant":
Ask your admin to grant consent for the app (your app’s Application (client) ID from Azure).
Admin steps (Azure Portal): App registrations → select the app → API permissions → click Grant admin consent for <Your org>.
Alternatively, the admin can use Enterprise applications → select the app → Permissions → Grant admin consent.
After admin consent is granted, sign in again (or run the MCP server again); the app will then have permission to access OneNote on behalf of users in your organization.
3. Environment
cp .env.example .envDelegated (browser login): set
AZURE_CLIENT_ID(and optionallyAZURE_TENANT_ID) to your app registration from step 2. First run will open the browser to sign in.Application (app-only): set
AZURE_TENANT_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET, andONENOTE_USER_ID.
Running the server
If you get ModuleNotFoundError: No module named 'onenote_mcp', install the package first: pip install -e .
Both SSE and Streamable HTTP run on the same server (no config to choose):
python -m onenote_mcp.main
# or after pip install -e .
onenote-mcpCustom host/port:
PORT=3000 python -m onenote_mcp.main
HOST=0.0.0.0 PORT=8000 python -m onenote_mcp.mainConnecting a client
Both transports are available on the same server. Use whichever your client supports.
Streamable HTTP — single URL:
http://localhost:8000/mcp(or yourHOST/PORT)
{
"mcpServers": {
"onenote": {
"type": "streamable-http",
"url": "http://localhost:8000/mcp"
}
}
}SSE — connect to the SSE endpoint; the server will tell the client where to POST messages:
SSE:
GET http://localhost:8000/sseMessages:
POST http://localhost:8000/messages/(with?session_id=...from the first SSE event)
{
"mcpServers": {
"onenote": {
"type": "sse",
"url": "http://localhost:8000/sse"
}
}
}Tools reference
Tool | Description |
| List all OneNote notebooks. Optional: |
| List sections in a notebook. Required: |
| List pages; optional |
| Get HTML content of a page. Required: |
Use IDs from list_notes / list_note_sections / list_note_pages as inputs to the next tool.
Testing
Install dev dependencies and run tests (mock OneNote gateway, no Azure credentials):
pip install -e ".[dev]"
# or
pip install -r requirements-dev.txt
pytest tests/ -vTests use a mock gateway and run offline. They cover:
Use cases:
list_notebooks,list_sections,list_pages,get_note_contentwith mock dataTool output format: markdown/HTML shape of tool responses
App structure: combined app mounts
/sseand/mcproutes
License
MIT.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/benamaraissam/onenote-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server