OneNoteMCP Server

Enables interaction with Microsoft OneNote via the Microsoft Graph API

README.md

Forked from ZubeidHendricks/azure-onenote-mcp-server see that page for the original README.md

About

An MCP for OneNote. Forked and revised extensively, now works with personal notebooks. Updated to the latest MCP API. Supports caching credentials.

Improvements

Functionality

  • Fixed getPageContent functionality by implementing ReadableStream
  • Successfully implemented API calls against personal notebooks
  • Updated index and tools to use the latest MCP version

Code Architecture

  • Simplified codebase by removing classes that weren't necessary
  • Many unnecessary files removed

Authentication & Performance

  • Implemented disk caching for authentication credentials
  • Updated package dependencies
  • Added dotenv support for direct testing capabilities

Azure App Registration

  1. Go to Azure Portal and navigate to App registrations
  2. Create a new registration for OneNoteMCP
  3. Add Microsoft Graph API permissions:
    • Notes.Read
    • Notes.Read.All
    • (optionally add Notes.Write permissions, but there is a risk of losing your notes)
  4. Create a client secret
  5. Copy the client ID/secret for configuration
  6. In the manifest set signInAudience to AzureADandPersonalMicrosoftAccount

MCP Server setup

Put the client ID/secret n your .env file locally as well as in Claude desktop.

The AUTH_CACHE_DIR should be the directory where you want the generated API access token to be stored.

AZURE_CLIENT_ID=\
AZURE_CLIENT_SECRET=
AUTH_CACHE_DIR="C:\\git\\azure-onenote-mcp-server\\.cache"

Run server manually first to generate the credentials that will be cached and used by Claude desktop when it runs the server later on.

npm install
npm build
npm run

You can test the API works by running this command directly once the server starts up and logs in.

{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "listNotebooks", "arguments": {}}}

Claude MCP config

{
  "mcpServers": {
    "onenote": {
      "command": "node",
      "args": ["C:\\git\\azure-onenote-mcp-server\\dist\\index.js"],
      "env": {
        "AZURE_CLIENT_ID": "...",
        "AZURE_CLIENT_SECRET": "...",
        "AUTH_CACHE_DIR": "C:\\git\\azure-onenote-mcp-server\\.cache"
      }
    }
  }
}

Tools 2

listNotebooksLists all available OneNote notebooks for the authenticated user.
getPageContentRetrieves the content of a specific OneNote page.

Environment Variables

AZURE_CLIENT_IDrequiredThe client ID from your Azure App registration.
AZURE_CLIENT_SECRETrequiredThe client secret from your Azure App registration.
AUTH_CACHE_DIRrequiredThe directory path where API access tokens are cached.

Try it

List all my OneNote notebooks.
Get the content of the page with ID '1-12345' from my OneNote.
Show me the notebooks I have access to in my personal account.

Frequently Asked Questions

What are the key features of OneNoteMCP?

Supports both personal and organization OneNote notebooks. Implements disk caching for authentication credentials. Retrieves page content using ReadableStream. Integrates with Microsoft Graph API.

What can I use OneNoteMCP for?

Quickly searching and retrieving notes from OneNote during a chat session. Summarizing content from specific OneNote pages using Claude. Managing personal knowledge bases stored in OneNote via natural language.

How do I install OneNoteMCP?

Install OneNoteMCP by running: npm install && npm build

What MCP clients work with OneNoteMCP?

OneNoteMCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep OneNoteMCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare