Token导航 LogoToken导航TokenDH.com
OneNote MCP Server logo
AI代理HTTP官方级别未说明来源级核验

OneNote MCP Server

MCP Server

一个实现模型上下文协议(MCP)的服务器,使AI语言模型如Claude和其他LLMs能够与Microsoft OneNote交互,支持访问、创建、搜索和分析笔记内容。

工具数

0

提示词数

0

GitHub Stars

78

资源数

0
知识管理JavaScriptClaude自动化Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

danosb

提供方

danosb

最后核验

2026/5/17 20:37

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

OneNote MCP服务器

模型上下文协议(MCP)服务器实现,使Claude和其他LLM等AI语言模型能够与Microsoft OneNote交互。

该项目基于 azure onenote mcp服务器 由Zubeid Hendricks设计,经过修改以简化身份验证并提高可用性。

这有什么作用?

该服务器允许AI助手:

  • 访问您的OneNote笔记本、分区和页面
  • 在笔记本中创建新页面
  • 搜索您的笔记
  • 阅读完整的笔记内容,包括HTML格式和文本
  • 直接分析和总结您的笔记

所有这些都直接通过AI界面进行,而无需切换上下文。

使用AI助手

光标设置

  1. 克隆此存储库并按照以下安装步骤进行操作
  1. 启动MCP服务器: npm start
  1. 在Cursor中注册服务器:

- 打开光标首选项(Mac上的Cmd+或Windows上的Ctrl+) - 转到“MCP”选项卡 - 使用以下设置添加新的MCP服务器: - 姓名: onenote - 命令: node - Args: ["/path/to/your/onenote-mcp.mjs"] (使用绝对路径)

以下是完整的JSON配置示例:

   {
     "mcpServers": {
       "onenote": {
         "command": "node",
         "args": ["/absolute/path/to/your/onenote-mcp.mjs"],
         "env": {}
       }
     }
   }
  1. 重新启动游标
  1. 在Cursor中,您现在可以使用自然语言与OneNote数据交互:
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

当您第一次询问OneNote时,AI将引导您完成身份验证过程。

Claude Desktop(或其他MCP兼容助手)的设置

  1. 克隆此存储库并按照以下安装步骤进行操作
  1. 启动MCP服务器: npm start
  1. 在Claude Desktop设置中,添加OneNote MCP服务器:

- 姓名: onenote - 命令: node - Args: ["/path/to/your/onenote-mcp.mjs"] (使用绝对路径)

JSON配置示例:

   {
     "mcpServers": {
       "onenote": {
         "command": "node",
         "args": ["/absolute/path/to/your/onenote-mcp.mjs"],
         "env": {}
       }
     }
   }
  1. 现在,您可以让Claude与您的OneNote数据进行交互

特性

  • 使用设备代码流通过Microsoft OneNote进行身份验证(无需Azure设置)
  • 列出所有笔记本、分区和页面
  • 使用HTML内容创建新页面
  • 阅读完整的页面内容,包括HTML格式
  • 提取文本内容以进行AI分析和总结
  • 在一次操作中汇总所有页面的内容
  • 以可读格式阅读所有页面的全部内容
  • 在笔记中搜索

安装

先决条件

  • Node.js 16或更高版本(从安装 )
  • 具有OneNote访问权限的活动Microsoft帐户
  • Git(从安装 git-scm.com)

步骤1:克隆存储库

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

第二步:下载TypeScript SDK

此项目需要MCP TypeScript SDK,需要单独下载:

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

步骤3:安装项目依赖项

npm install

步骤4:启动MCP服务器

npm start

这将启动MCP服务器,您将看到一条消息:

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

步骤5:通过您的AI助手进行身份验证

服务器运行后,您可以直接通过AI助手进行身份验证:

  1. 在Cursor、Anthropic的Claude Desktop或任何兼容MCP的助手中,要求使用OneNote进行身份验证:
   Can you authenticate with my OneNote account?
  1. AI将触发身份验证流程,并为您提供:

- URL(通常为microsoft.com/devicelogin) - 输入代码

  1. 转到URL,输入代码,然后使用您的Microsoft帐户登录
  1. 成功身份验证后,您可以开始使用OneNote和您的AI助手

可用的MCP工具

一旦通过身份验证,以下工具可供AI助手使用:

工具名称描述
authenticate启动Microsoft身份验证流程
listNotebooks获取所有OneNote笔记本的列表
getNotebook获取特定笔记本的详细信息
listSections列出笔记本中的所有部分
listPages列出一个部分中的所有页面
getPage获取特定页面的完整内容,包括HTML格式
createPage使用HTML内容创建新页面
searchPages在笔记本中搜索页面

交互示例

以下是您如何通过AI助手与OneNote MCP交互的一些示例:

User: Can you show me my OneNote notebooks?
AI: (uses listNotebooks) I found 3 notebooks: "Work", "Personal", and "Projects"

User: What sections are in my Projects notebook?
AI: (uses listSections) Your Projects notebook has the following sections: "Active Projects", "Ideas", and "Completed"

User: Create a new page in Projects with today's date as the title
AI: (uses createPage) I've created a new page titled "2025-04-12" in your Projects notebook

User: Find all my notes about machine learning
AI: (uses searchPages) I found 5 pages with content related to machine learning...

User: Can you read and summarize my notes on the "Project Requirements" page?
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...

User: Extract all the action items from my "Team Meeting" notes
AI: (uses getPage) Here are all the action items from your "Team Meeting" notes:
1. John to complete API documentation by Friday
2. Sarah to schedule design review meeting
3. Team to finalize Q3 roadmap by end of month

User: Summarize content of all my OneNote pages
AI: (runs get-all-page-contents.js) Here's a summary of all your pages:
- Questions: Contains strategic business questions about competitor analysis
- 2025-04-12: Discussion about monetization strategy for bank transfers
- Role Specification: Details about the Chief Payments Officer position
...

User: I want to read through all my OneNote pages so I can ask questions about them
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.

高级:直接脚本使用

出于测试或开发目的,您还可以直接使用提供的脚本:

# Authenticate with Microsoft
npm run auth

# List your notebooks
npm run list-notebooks

# List sections in your first notebook
npm run list-sections

# List pages in the first section
npm run list-pages

# Create a new page
npm run create-page

# Summarize content of all pages
node get-all-page-contents.js

# Read full content of all pages
node read-all-pages.js

故障排除

身份验证问题

  • 如果身份验证失败,请确保您使用的是没有跟踪保护的现代浏览器
  • 尝试清除浏览器Cookie和缓存
  • 如果收到“expired_token”错误,请重新启动身份验证过程

服务器无法启动

  • 验证是否安装了Node.js(16+版本): node --version
  • 确保安装了所有依赖项: npm install
  • 检查TypeScript SDK是否正确构建

AI无法连接到服务器

  • 确保MCP服务器正在运行(npm start)
  • 检查AI助手的设置,确保其配置为使用MCP
  • 对于Cursor,确保它是支持MCP的最新版本

安全说明

  • 身份验证令牌存储在本地 .access-token.txt
  • 令牌授予对OneNote数据的访问权限,因此请确保其安全
  • 令牌在一段时间后过期,需要重新验证
  • 不需要Azure设置或API密钥

鸣谢

该项目建立在 azure onenote mcp服务器 Zubeid Hendricks,专注于简化身份验证过程,改善人工智能助手的用户体验。

许可证

此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件

目录标签

目录标签

知识管理JavaScriptClaude自动化OneNote集成本地部署AI助手笔记管理MCP协议自动化工具

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

HTTP

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

HTTPtoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP