onenote-mcp
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-mcplist 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
A Model Context Protocol (MCP) server for Microsoft OneNote, authenticated via OAuth. Provides full read/write access to notebooks, sections, and pages through 16 tools, 5 resources, and 3 prompt templates.
Quick Start
Prerequisites
Node.js v22 or higher
A Microsoft Entra app registration with OAuth enabled
Client ID and client secret for your app registration
Step 1: Register an OAuth App
Open Microsoft Entra App registrations in Azure Portal
Create (or select) an application
Add a redirect URI:
http://localhost:3000/callbackCreate a client secret
Copy Application (client) ID and client secret
Step 2: Configure Your MCP Client
Claude Desktop (Recommended)
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"onenote": {
"command": "npx",
"args": ["-y", "onenote-mcp"],
"env": {
"ONENOTE_OAUTH_CLIENT_ID": "your-client-id",
"ONENOTE_OAUTH_CLIENT_SECRET": "your-client-secret"
}
}
}
}Claude Code (CLI)
{
"mcpServers": {
"onenote": {
"command": "npx",
"args": ["-y", "onenote-mcp"],
"env": {
"ONENOTE_OAUTH_CLIENT_ID": "your-client-id",
"ONENOTE_OAUTH_CLIENT_SECRET": "your-client-secret"
}
}
}
}Cursor
{
"mcpServers": {
"onenote": {
"command": "npx",
"args": ["-y", "onenote-mcp"],
"env": {
"ONENOTE_OAUTH_CLIENT_ID": "your-client-id",
"ONENOTE_OAUTH_CLIENT_SECRET": "your-client-secret"
}
}
}
}Step 3: First-Time Authorization
On first use, the server will:
Print an OAuth authorization URL to stderr
Wait for you to open the URL in your browser
Receive the callback at localhost
Cache tokens locally for reuse and refresh
Related MCP server: OneNote MCP Server
Transport Mode
This server uses STDIO transport exclusively.
Tools
The server exposes 16 tools for interacting with OneNote:
Tool | Description |
| List all notebooks accessible to the authenticated user |
| Get detailed information about a specific notebook |
| List section groups in a notebook or across all notebooks |
| Get details of a specific section group including its sections |
| List sections in a notebook, section group, or across all notebooks |
| Get detailed information about a specific section |
| Create a new section in a notebook or section group |
| List pages in a specific section |
| Get metadata for a specific page (title, timestamps, parent info) |
| Get the full HTML content of a page |
| Get a short text preview of a page (up to 300 characters) |
| Create a new page in a section with HTML content |
| Update page content using JSON patch commands |
| Permanently delete a page |
| Search pages by keyword across titles and content |
| Get the complete notebook/section-group/section tree in one call |
Resources
The server exposes 5 resources for direct data access:
Resource | URI | Description |
|
| List of all notebooks |
|
| A specific notebook with its sections and section groups |
|
| Sections in a specific notebook |
|
| Pages in a specific section |
|
| The HTML content of a specific page |
Prompts
The server includes 3 prompt templates for common workflows:
Prompt | Description |
| Fetch and summarize the content of a specific OneNote page |
| Guide through a search workflow across OneNote notes |
| Guide through creating a new page in the right notebook and section |
Configuration Reference
Variable | Required | Default | Description |
| Yes* | - | OAuth client ID |
| Yes* | - | OAuth client secret |
| No | - | Manual token override (bypasses OAuth) |
| No |
| OAuth tenant selector |
| No |
| OAuth callback URI |
| No |
| Space-delimited OAuth scopes |
| No | platform default | Token cache file path |
| No |
| OAuth authority base override |
| No |
| Graph API base override |
* Required unless ONENOTE_ACCESS_TOKEN is set.
Features
16 MCP tools for full OneNote read/write access (notebooks, sections, pages)
5 MCP resources for direct data access via URI templates
3 MCP prompt templates for common workflows (summarize, search, create)
OAuth authorization code flow with automatic token refresh
Secure token cache with platform-specific default locations
Microsoft Graph API client with error handling and pagination
Security hardening (CodeQL, dependency review, Scorecard, SBOM)
CI/CD with automated release and npm trusted publishing
Development
Setup
# Clone the repo
git clone https://github.com/jacob-hartmann/onenote-mcp.git
cd onenote-mcp
# Use Node.js 22
# (macOS/Linux nvm): nvm install && nvm use
# (Windows nvm-windows): nvm install 22 && nvm use 22
# Install dependencies
pnpm install
# Copy env template
cp .env.example .envRunning Locally
# Development mode (auto-reload)
pnpm dev
# Production build
pnpm build
# Production run
pnpm startDebugging
# Run from source
pnpm inspect
# Run from built output
pnpm inspect:distContributing
See CONTRIBUTING.md.
Security
See SECURITY.md.
Support
See SUPPORT.md.
License
MIT © Jacob Hartmann
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
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/jacob-hartmann/onenote-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server