Skip to content
Back to search

onenote-mcp

MCP server for Microsoft OneNote

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/danosb--onenote-mcp/badge.svg)](/listings/danosb--onenote-mcp)

HTML

<a href="/listings/danosb--onenote-mcp"><img src="/api/listings/danosb--onenote-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone this repository and follow the installation steps below 2. Start the MCP server: `npm start` 3. Register the server in Cursor: - Open Cursor preferences (Cmd+, on Mac or Ctrl+, on Windows) - Go to the "MCP" tab - Add a new MCP server with these settings: - Name: `onenote` - Command: `node` - Args: `["/path/to/your/onenote-mcp.mjs"]` (use absolute path)

Here's the complete JSON configuration example:

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

4. Restart Cursor 5. In Cursor, you can now interact with your OneNote data using natural language:

Can you show me my OneNote notebooks?
Create a new page in my first notebook with a summary of this conversation
Find notes related to "project planning" in my OneNote

The first time you ask about OneNote, the AI will guide you through the authentication process.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 266 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # OneNote MCP Server
  2. A Model Context Protocol (MCP) server implementation that enables AI language models like Claude and other LLMs to interact with Microsoft OneNote.
  3. > This project is based on [azure-onenote-mcp-server](https://github.com/ZubeidHendricks/azure-onenote-mcp-server) by Zubeid Hendricks, with modifications to simplify authentication and improve usability.
  4. ## What Does This Do?
  5. This server allows AI assistants to:
  6. - Access your OneNote notebooks, sections, and pages
  7. - Create new pages in your notebooks
  8. - Search through your notes
  9. - Read complete note content, including HTML formatting and text
  10. - Analyze and summarize your notes directly
  11. All of this happens directly through the AI interface without you having to switch contexts.
  12. ## Using with AI Assistants
  13. ### Setup for Cursor
  14. 1. Clone this repository and follow the installation steps below
  15. 2. Start the MCP server: `npm start`
  16. 3. Register the server in Cursor:
  17. - Open Cursor preferences (Cmd+, on Mac or Ctrl+, on Windows)
  18. - Go to the "MCP" tab
  19. - Add a new MCP server with these settings:
  20. - Name: `onenote`
  21. - Command: `node`
  22. - Args: `["/path/to/your/onenote-mcp.mjs"]` (use absolute path)
  23. Here's the complete JSON configuration example:
  24. ```json
  25. {
  26. "mcpServers": {
  27. "onenote": {
  28. "command": "node",
  29. "args": ["/absolute/path/to/your/onenote-mcp.mjs"],
  30. "env": {}
  31. }
  32. }
  33. }
  34. ```
  35. 4. Restart Cursor
  36. 5. In Cursor, you can now interact with your OneNote data using natural language:
  37. ```
  38. Can you show me my OneNote notebooks?
  39. Create a new page in my first notebook with a summary of this conversation
  40. Find notes related to "project planning" in my OneNote
  41. ```
  42. The first time you ask about OneNote, the AI will guide you through the authentication process.
  43. ### Setup for Claude Desktop (or other MCP-compatible assistants)
  44. 1. Clone this repository and follow the installation steps below
  45. 2. Start the MCP server: `npm start`
  46. 3. In the Claude Desktop settings, add the OneNote MCP server:
  47. - Name: `onenote`
  48. - Command: `node`
  49. - Args: `["/path/to/your/onenote-mcp.mjs"]` (use absolute path)
  50. JSON configuration example:
  51. ```json
  52. {
  53. "mcpServers": {
  54. "onenote": {
  55. "command": "node",
  56. "args": ["/absolute/path/to/your/onenote-mcp.mjs"],
  57. "env": {}
  58. }
  59. }
  60. }
  61. ```
  62. 4. You can now ask Claude to interact with your OneNote data
  63. ## Features
  64. - Authentication with Microsoft OneNote using device code flow (no Azure setup needed)
  65. - List all notebooks, sections, and pages
  66. - Create new pages with HTML content
  67. - Read complete page content, including HTML formatting
  68. - Extract text content for AI analysis and summaries
  69. - Summarize content of all pages in a single operation
  70. - Read full content of all pages in a readable format
  71. - Search across your notes
  72. ## Installation
  73. ### Prerequisites
  74. - Node.js 16 or higher (install from [nodejs.org](https://nodejs.org/))
  75. - An active Microsoft account with access to OneNote
  76. - Git (install from [git-scm.com](https://git-scm.com/))
  77. ### Step 1: Clone the Repository
  78. ```bash
  79. git clone https://github.com/yourusername/onenote-mcp.git
  80. cd onenote-mcp
  81. ```
  82. ### Step 2: Download the TypeScript SDK
  83. This project requires the MCP TypeScript SDK, which needs to be downloaded separately:
  84. ```bash
  85. git clone https://github.com/modelcontextprotocol/typescript-sdk.git
  86. cd typescript-sdk
  87. npm install
  88. npm run build
  89. cd ..
  90. ```
  91. ### Step 3: Install Project Dependencies
  92. ```bash
  93. npm install
  94. ```
  95. ### Step 4: Start the MCP Server
  96. ```bash
  97. npm start
  98. ```
  99. This will start the MCP server, and you'll see a message:
  100. ```
  101. Server started successfully.
  102. Use the "authenticate" tool to start the authentication flow,
  103. or use "saveAccessToken" if you already have a token.
  104. ```
  105. ### Step 5: Authenticate Through Your AI Assistant
  106. Once the server is running, you can authenticate directly through your AI assistant:
  107. 1. In Cursor, Anthropic's Claude Desktop, or any MCP-compatible assistant, ask to authenticate with OneNote:
  108. ```
  109. Can you authenticate with my OneNote account?
  110. ```
  111. 2. The AI will trigger the authentication flow and provide you with:
  112. - A URL (typically microsoft.com/devicelogin)
  113. - A code to enter
  114. 3. Go to the URL, enter the code, and sign in with your Microsoft account
  115. 4. After successful authentication, you can start using OneNote with your AI assistant
  116. ## Available MCP Tools
  117. Once authenticated, the following tools are available for AI assistants to use:
  118. | Tool Name | Description |
  119. |-----------|-------------|
  120. | `authenticate` | Start the Microsoft authentication flow |
  121. | `listNotebooks` | Get a list of all your OneNote notebooks |
  122. | `getNotebook` | Get details of a specific notebook |
  123. | `listSections` | List all sections in a notebook |
  124. | `listPages` | List all pages in a section |
  125. | `getPage` | Get the complete content of a specific page, including HTML formatting |
  126. | `createPage` | Create a new page with HTML content |
  127. | `searchPages` | Search for pages across your notebooks |
  128. ## Example Interactions
  129. Here are some examples of how you can interact with the OneNote MCP through your AI assistant:
  130. ```
  131. User: Can you show me my OneNote notebooks?
  132. AI: (uses listNotebooks) I found 3 notebooks: "Work", "Personal", and "Projects"
  133. User: What sections are in my Projects notebook?
  134. AI: (uses listSections) Your Projects notebook has the following sections: "Active Projects", "Ideas", and "Completed"
  135. User: Create a new page in Projects with today's date as the title
  136. AI: (uses createPage) I've created a new page titled "2025-04-12" in your Projects notebook
  137. User: Find all my notes about machine learning
  138. AI: (uses searchPages) I found 5 pages with content related to machine learning...
  139. User: Can you read and summarize my notes on the "Project Requirements" page?
  140. AI: (uses getPage) Based on your "Project Requirements" page, here's a summary: The project requires Python 3.8+, integration with AWS services, and completion by Q3. Key deliverables include a web dashboard, API, and documentation...
  141. User: Extract all the action items from my "Team Meeting" notes
  142. AI: (uses getPage) Here are all the action items from your "Team Meeting" notes:
  143. 1. John to complete API documentation by Friday
  144. 2. Sarah to schedule design review meeting
  145. 3. Team to finalize Q3 roadmap by end of month
  146. User: Summarize content of all my OneNote pages
  147. AI: (runs get-all-page-contents.js) Here's a summary of all your pages:
  148. - Questions: Contains strategic business questions about competitor analysis
  149. - 2025-04-12: Discussion about monetization strategy for bank transfers
  150. - Role Specification: Details about the Chief Payments Officer position
  151. ...
  152. User: I want to read through all my OneNote pages so I can ask questions about them
  153. AI: (runs read-all-pages.js) I've retrieved the full content of all your pages in a readable format. Now you can ask me specific questions about any of the content.
  154. ```
  155. ## Advanced: Direct Script Usage
  156. For testing or development purposes, you can also use the provided scripts directly:
  157. ```bash
  158. # Authenticate with Microsoft
  159. npm run auth
  160. # List your notebooks
  161. npm run list-notebooks
  162. # List sections in your first notebook
  163. npm run list-sections
  164. # List pages in the first section
  165. npm run list-pages
  166. # Create a new page
  167. npm run create-page
  168. # Summarize content of all pages
  169. node get-all-page-contents.js
  170. # Read full content of all pages
  171. node read-all-pages.js
  172. ```
  173. ## Troubleshooting
  174. ### Authentication Issues
  175. - If authentication fails, make sure you're using a modern browser without tracking prevention
  176. - Try clearing browser cookies and cache
  177. - If you get "expired_token" errors, restart the authentication process
  178. ### Server Won't Start
  179. - Verify Node.js is installed (version 16+): `node --version`
  180. - Make sure all dependencies are installed: `npm install`
  181. - Check that the TypeScript SDK was built correctly
  182. ### AI Can't Connect to the Server
  183. - Ensure the MCP server is running (`npm start`)
  184. - Check your AI assistant's settings to make sure it's configured to use MCP
  185. - For Cursor, make sure it's the latest version that supports MCP
  186. ## Security Notes
  187. - Authentication tokens are stored locally in `.access-token.txt`
  188. - Tokens grant access to your OneNote data, so keep them secure
  189. - Tokens expire after some time, requiring re-authentication
  190. - No Azure setup or API keys are required
  191. ## Credits
  192. This project builds upon the [azure-onenote-mcp-server](https://github.com/ZubeidHendricks/azure-onenote-mcp-server) by Zubeid Hendricks, with a focus on simplifying the authentication process and improving the user experience with AI assistants.
  193. ## License
  194. This project is licensed under the MIT License - see the LICENSE file for details

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.