Back to MCP Catalog

Microsoft OneNote MCP Server

Knowledge & MemoryTypeScript
Access and manage Microsoft OneNote notebooks, sections, and pages
Available Tools

onenote-read

Read content from Microsoft OneNote notebooks, sections, or pages

typepageIdsectionIdnotebookIdincludeContentincludeMetadata

onenote-create

Create new content in Microsoft OneNote (notebooks, sections, or pages)

typetitlecontentparentId

The Microsoft OneNote MCP provides AI assistants with seamless access to your OneNote content. It enables reading from and writing to notebooks, sections, and pages, allowing AI models to retrieve information from your notes and create new content directly in OneNote. This integration leverages the Microsoft Graph API to provide a comprehensive set of tools for interacting with OneNote. It supports converting HTML content to text for better RAG processing and maintains a clean authentication flow using Microsoft's device code authentication.

Overview

The Microsoft OneNote MCP server enables AI assistants to interact with your OneNote notebooks, providing access to your notes and the ability to create new content. This integration is particularly useful for knowledge management, research, and productivity workflows.

Prerequisites

Before setting up the OneNote MCP server, you'll need:

  1. A Microsoft account with access to OneNote
  2. Node.js (v14 or higher) and npm (v6 or higher)
  3. A registered application in the Microsoft Azure Portal

Azure Application Setup

  1. Go to the Azure Portal and sign in with your Microsoft account
  2. Navigate to "App registrations" and click "New registration"
  3. Name your application (e.g., "OneNote MCP")
  4. For "Supported account types," select "Accounts in any organizational directory and personal Microsoft accounts"
  5. Click "Register"
  6. Once created, note your "Application (client) ID" for later use
  7. Under "API permissions," add the following Microsoft Graph permissions:
    • Notes.Read
    • Notes.ReadWrite
  8. Under "Authentication," enable "Allow public client flows"

Installation

Method 1: Local Installation

  1. Clone the repository:

    git clone https://github.com/rajvirtual/MCP-Servers.git
    cd MCP-Servers/onenote
    
  2. Install dependencies:

    npm install
    
  3. Create a .env.local file with your Azure client ID:

    CLIENT_ID=your-client-id-from-azure
    
  4. Build and start the server:

    npm run build && npm start
    

Method 2: Docker Installation

  1. Clone the repository:

    git clone https://github.com/rajvirtual/MCP-Servers.git
    cd MCP-Servers/onenote
    
  2. Create a data directory for persistence:

    mkdir -p data
    
  3. Build the Docker image:

    docker build -t onenote-mcp-server .
    
  4. Run the container:

    docker run -d \
      --name onenote-mcp-server \
      -e CLIENT_ID=your-client-id \
      -v $(pwd)/data:/app/dist \
      -p 3000:3000 \
      onenote-mcp-server
    

Authentication Process

When you first run the server, it will initiate the Microsoft authentication flow:

  1. The server will generate a device code and URL, saving the code to device-code.txt
  2. You'll need to visit the provided URL and enter the code to authenticate
  3. After successful authentication, tokens will be cached in token-cache.json for future use
  4. Subsequent runs will use the cached token if it's still valid

Configuration with Claude Desktop

  1. In Claude Desktop, add a new MCP server:
    • Set the server directory to your cloned repository's onenote folder
    • Set the command to: npm run build && npm start
    • Add the environment variable:
      • Name: CLIENT_ID
      • Value: [Your Microsoft Azure Application Client ID]
  2. Save the configuration and connect to the server

The Claude Desktop configuration file is typically located at:

  • Mac OS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: C:\Users\YourUsername\AppData\Roaming\Claude\claude_desktop_config.json

Troubleshooting

  • Authentication Issues: Delete token-cache.json to force re-authentication
  • Connection Problems: Ensure the server is running and the port is accessible
  • Permission Errors: Verify you've added the correct API permissions in Azure
  • Module Errors: Make sure you're using Node.js 14+ with ES modules support

If you encounter persistent issues, check the server logs for more detailed error messages.

Related MCPs

Knowledge Graph Memory
Knowledge & MemoryTypeScript

A persistent memory system using a local knowledge graph

MemoryMesh
Knowledge & MemoryTypeScript

A knowledge graph server for structured memory persistence in AI models

Cognee
Knowledge & MemoryPython

Knowledge management and retrieval system with code graph capabilities

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.