logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ms-onenote-interface-adapter

Facilitates seamless interaction between large language models (LLMs) and Microsoft OneNote archives via an AI interface layer, supporting note creation, retrieval, advanced querying, and content abstraction.

Author

ms-onenote-interface-adapter logo

danosb

No License

Quick Info

GitHub GitHub Stars 21
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

onenotenotebookstoolsdanosb onenoteonenote notebooksonenote mcp

OneNote Integration Service for LLMs

A Model Context Protocol (MCP) backend designed to bridge Generative AI agents (like Claude or other LLM frameworks) with the user's Microsoft OneNote repository.

This implementation derives from the structure of azure-onenote-mcp-server by Zubeid Hendricks, optimized here for simplified credential handling and enhanced developer experience.

Core Functionality

This server empowers AI assistants to perform the following actions against your OneNote data:

  • Navigate your collection of notebooks, sections, and individual pages.
  • Programmatically draft and insert new pages into specified notebooks.
  • Execute granular search operations across all stored notes.
  • Fetch and render the full content of a page, preserving original HTML structure and text.
  • Perform on-the-fly analysis and generate summaries of retrieved documentation.

This entire operation chain is executed transparently within the active AI conversational context.

Deployment Guide for AI Frontends

Integration with Cursor IDE

  1. Clone this repository and execute the prerequisite installation procedures.
  2. Initiate the MCP service listener: npm start
  3. Configure the server endpoint within the Cursor IDE:

    • Access Cursor settings (Cmd+, or Ctrl+,).
    • Navigate to the "MCP" configuration panel.
    • Introduce a new MCP entry with the following parameters:
      • Identifier: onenote
      • Execution Binary: node
      • Arguments: ["/absolute/path/to/your/onenote-mcp.mjs"] (Must be an absolute filesystem path)

    The corresponding configuration snippet in your settings JSON:

    { "mcpServers": { "onenote": { "command": "node", "args": ["/absolute/path/to/your/onenote-mcp.mjs"], "env": {} } } }

  4. Restart the Cursor application.

  5. Natural language queries leveraging OneNote are now functional:

List every notebook accessible via my OneNote account. Generate a fresh page in the 'Strategy' notebook containing a synopsis of this chat exchange. Query OneNote for documents pertaining to 'Q4 Performance Review'.

The initial request involving OneNote will automatically invoke the necessary user authorization handshake.

Integration with Claude Desktop (and other MCP-aware assistants)

  1. Clone the repository and complete the setup sequence.
  2. Start the MCP listener: npm start
  3. In the Claude Desktop application settings, register the OneNote adapter:

    • Name: onenote
    • Command: node
    • Args: ["/path/to/your/onenote-mcp.mjs"] (Use absolute path)

    Configuration JSON example:

    { "mcpServers": { "onenote": { "command": "node", "args": ["/absolute/path/to/your/onenote-mcp.mjs"], "env": {} } } }

  4. The assistant is now equipped to manipulate and retrieve data from OneNote.

Comprehensive Feature Set

  • Secure authorization via Microsoft Device Code Flow (eliminating Azure tenant setup).
  • Enumeration of all top-level notebooks, sectional divisions, and pages.
  • Capability to inject new page content formatted in HTML.
  • Full page content retrieval, including retention of HTML markup.
  • Text extraction for downstream AI comprehension and abstraction.
  • Batch summarization across the entire corpus of available pages.
  • Utility for reading and compiling all page contents into a coherent stream.
  • Cross-notebook search indexing.

Setup & Compilation

Prerequisites

  • Node.js version 16 or later (obtainable from nodejs.org)
  • A valid Microsoft credential set authorized for OneNote access
  • Git source control utility (obtainable from git-scm.com)

Step 1: Repository Checkout

bash git clone https://github.com/yourusername/onenote-mcp.git cd onenote-mcp

Step 2: Obtain TypeScript Protocol SDK

This project mandates the companion MCP TypeScript SDK, which must be separately fetched and compiled:

bash git clone https://github.com/modelcontextprotocol/typescript-sdk.git cd typescript-sdk npm install npm run build cd ..

Step 3: Install Local Dependencies

bash npm install

Step 4: Initiate the Service Listener

bash npm start

Upon successful startup, the terminal output will indicate readiness:

Server started successfully. Use the "authenticate" tool to start the authentication flow, or use "saveAccessToken" if you already have a token.

Step 5: Authorization via Assistant

Invoke the authentication procedure through your MCP client (Cursor, Claude Desktop, etc.):

Can you initiate the login procedure for my OneNote account?

  1. The assistant will trigger the Microsoft login sequence, providing:

    • A redirect URL (usually microsoft.com/devicelogin).
    • A unique authorization code.
  2. Navigate to the URL, input the provided code, and complete the Microsoft account sign-in.

  3. Once the token exchange is validated, OneNote operations become available.

Exposed MCP Endpoints

After successful credential registration, the AI assistant can invoke these functions:

Function Signature Purpose
authenticate Triggers the OAuth device code authorization sequence.
listNotebooks Fetches and returns the directory of all accessible notebooks.
getNotebook Retrieves metadata for a singular, specified notebook.
listSections Enumerates all organizational sections within a given notebook.
listPages Returns all pages contained within a specific section.
getPage Fetches the complete content of a page, including HTML structure.
createPage Inserts a new page populated with supplied HTML material.
searchPages Executes a keyword search across the indexed note content.

Interaction Demonstrations

Illustrative command exchanges:

User: Show me the structure of my OneNote environment. AI: (Invokes listNotebooks) I've identified three distinct notebooks: "Corporate", "Personal Archive", and "Development Tasks".

User: What divisions exist within my Development Tasks notebook? AI: (Invokes listSections) The Development Tasks notebook is organized into sections: "Active Sprints", "Design Specs", and "Future Concepts".

User: Draft a placeholder page in the 'Active Sprints' section with the current date as its title. AI: (Invokes createPage) A new entry titled "2025-04-12" has been successfully provisioned in 'Active Sprints'.

User: Locate any documentation referencing 'Cloud Migration Strategy'. AI: (Invokes searchPages) Search yielded 4 relevant pages containing the specified terminology...

User: Please analyze the content of the page named 'Stakeholder Alignment Document'. AI: (Invokes getPage) Summary of 'Stakeholder Alignment Document': Key decisions confirm shifting the launch date to Q4, prioritizing security hardening over feature parity for the initial release.

User: I need a compilation of every action item scattered across my meeting notes. AI: (Invokes getPage & processes) Extracted action items from meeting records: 1. Finance team must approve budget variance by Monday. 2. Engineering lead to review dependency matrix. 3. Marketing to finalize communication collateral outlines.

User: Generate a unified abstract covering all my digitized notes. AI: (Executes specialized script) I have processed the entirety of your page contents. The overarching themes involve project scope adjustments, resource allocation optimization, and preliminary budget forecasting for the next fiscal cycle.

User: I require all raw page content in an easily queryable format for deep exploration. AI: (Executes specialized script) Full, raw content from all pages has been retrieved and indexed for immediate contextual querying.

Supplementary Script Execution

For diagnostic or direct utility use, the following shell commands are available:

bash

Initiate OAuth handshake

npm run auth

Query all notebooks

npm run list-notebooks

Inspect sections of the primary notebook

npm run list-sections

Review pages in the first section

npm run list-pages

Construct a new note

npm run create-page

Produce an aggregated summary script execution

node get-all-page-contents.js

Retrieve all content for local processing

node read-all-pages.js

Operational Diagnostics

Authorization Failures

  • Confirm the use of a non-restrictive browser (disable aggressive anti-tracking features).
  • Clear browser cache and cookies related to Microsoft services.
  • If token expiration errors persist, re-initiate the authenticate process.

Service Startup Issues

  • Validate Node.js environment health: node --version (must be >= 16).
  • Ensure dependencies are correctly installed: npm install.
  • Confirm the prerequisite TypeScript SDK module compilation succeeded.

Connection Refusal by AI Client

  • Verify the MCP adapter process is actively running (npm start).
  • Double-check the client application's MCP configuration parameters.
  • Ensure your AI client software is updated to a version supporting the MCP standard.

Security Considerations

  • The active authorization token is persisted locally in the .access-token.txt file.
  • This token grants full read/write access to your OneNote assets; safeguard this file.
  • Tokens possess an expiration lifetime, necessitating periodic re-authorization.
  • Crucially, this system bypasses the need for managing sensitive Azure application credentials.

Attributions

This project is a functional adaptation of the architecture presented in the azure-onenote-mcp-server repository by Zubeid Hendricks, primarily refactored to streamline the user-facing authentication mechanism.

Licensing

MIT License applies. Consult the LICENSE file for comprehensive details.

== Overview == Business efficiency apparatus encompasses all computational solutions, governance frameworks, calculation engines, and standardized methods employed by organizations to successfully navigate evolving market dynamics, maintain competitive edge, and elevate operational output.

There exists a departmental specialization for these managerial aids, classifiable by core business functions: projection planning, workflow management, document control, human capital administration, strategic determination, performance oversight, and so forth. A standard functional taxonomy includes:

Utilities for initial data capture and integrity verification across any organizational unit. Systems designed for monitoring and refining core operational sequences. Platforms dedicated to data aggregation and facilitating high-level decision architecture. Modern management toolsets have seen exponential advancement recently, driven by rapid technological shifts, making the selection of optimal enterprise tools challenging. This complexity arises from continuous pressure to minimize expenditure while maximizing revenue, the imperative to deeply comprehend client requirements, and the necessity of delivering requested products precisely as specified. In this high-velocity setting, executive leadership must adopt a strategic posture toward tool adoption, rather than simply chasing the newest technology. Often, reliance on unadjusted, off-the-shelf tools leads to systemic instability. Business process support systems must be chosen deliberately and then molded to fit organizational mandates, not the reverse.

== Prevalent Methodologies (2013 Survey Reference) == Data collected by Bain & Company in 2013 mapped the global utilization of strategic business instruments, reflecting regional priorities influenced by economic conditions:

  1. Strategic Roadmapping
  2. Client Relationship Stewardship (CRM)
  3. Workforce Sentiment Analysis
  4. Comparative Performance Analysis (Benchmarking)
  5. Performance Measurement Frameworks (BSC)
  6. Identification of Core Capabilities
  7. External Sourcing/Delegation (Outsourcing)
  8. Organizational Transition Management
  9. Logistics Network Optimization (SCM)
  10. Defining Organizational Purpose (Mission/Vision Statements)
  11. Consumer Group Identification (Market Segmentation)
  12. Total Quality Assurance

== Enterprise Software Applications == Software collections utilized by professional staff to execute diverse corporate functions are termed business software or applications. These systems are employed to enhance productivity metrics, quantify performance indicators, and execute specialized corporate tasks with precision. This domain progressed from foundational Management Information Systems (MIS) into integrated Enterprise Resource Planning (ERP). Subsequently, Customer Relationship Management (CRM) modules were incorporated, culminating in the current paradigm of cloud-native business management suites. Although a tangible correlation exists between IT investment and corporate success, two factors are paramount for value realization: the efficacy of the deployment phase and the diligence applied to tool selection and customization.

== Tools for Smaller Entities (SMEs) == Tools tailored for Small to Medium Enterprises are vital as they offer mechanisms for cost containment...

See Also

`