Home / MCP / OneNote MCP Server
Provides programmatic access to a public OneNote notebook via MCP for navigation, reading, writing, searching, and screenshots.
Configuration
View docs{
"mcpServers": {
"onenote": {
"command": "python",
"args": [
"-m",
"onenote_mcp"
]
}
}
}You can run a Python-based MCP server that automates browsing and interacting with shared OneNote notebooks. It lets AI assistants navigate notebooks, read and write page content, search, and take screenshots, all through MCP-compatible clients.
You use the OneNote MCP Server by running it locally or integrating it with an MCP host. Start the server in standalone mode to control OneNote directly from your MCP client, or configure a client to launch the server as part of its MCP setup. Once running, you can launch OneNote with a shared notebook URL, browse notebooks, sections, and pages, read or append page content, create new pages, search Across OneNote, and capture screenshots of the current view. The server maintains state across the session so your workflow can be stateful across multiple actions.
# Prerequisites
Python 3.10 or higher
Playwright
A Python environment with pip
A shared OneNote notebook URL that is accessible without authentication
# Install the package in editable mode
cd onenote-mcp
pip install -e .
# Install Playwright browsers
playwright install
```
# Run the server in standalone mode
python -m onenote_mcpTo integrate the OneNote MCP Server with an MCP host, use the standard Python command to start the server as shown in the example configuration: you can run the server by invoking Python with the module name for the server.
{
"type": "stdio",
"name": "onenote",
"command": "python",
"args": ["-m", "onenote_mcp"]
}Only notebooks shared via a public link (no authentication) are supported. Keep in mind that browser automation can be sensitive to UI changes in the web app, so occasional updates to the server may be needed if the OneNote web interface changes.
If the server cannot connect to OneNote, verify that the shared notebook URL is accessible without login. If selectors fail during automation, the OneNote UI may have changed and you may need to update the automation selectors in the server code. Check the server logs for error messages to guide your fixes.
Launch the OneNote web app with a shared notebook URL to start a session.
List all notebooks available in the current session.
List all sections within the currently opened notebook.
List all pages within the current section.
Navigate to a specific notebook by its name.
Navigate to a specific section by name.
Navigate to a specific page by name.
Retrieve the content of the currently opened page.
Append content to the current page.
Create a new page with the given name.
Search OneNote for specific terms across notebooks, sections, and pages.
Capture a screenshot of the current OneNote view.
Return current state information such as current notebook/section/page and session status.
Terminate the OneNote session and clean up resources.