Skip to main content
Glama

onenote-mcp

一个本地的 MCP 服务器,让 Claude 能够阅读你的 OneNote 笔记本,包括你粘贴到其中的图片

它通过 COM 接口与 OneNote 桌面应用对话。无需注册 Azure 应用,也无需租户同意。没有任何数据会离开本机。

为什么存在

Microsoft 365 连接器不支持 OneNote。它会报错:mime type 'application/msonenote' is not allowed。每一条 Graph API 路由都需要注册 Entra 应用并申请 Notes.ReadWrite.All 权限;在企业租户中,这通常意味着要提交一次 IT 请求。而桌面版 COM API 两者都不需要。

Related MCP server: notebooklm-claude-integration

它能做什么

  • 搜索所有已打开的笔记本,包括粘贴的截图中的文字,因为 OneNote 自己的索引就包含 OCR。

  • 以文本形式读取页面,并列出其上的图片。

  • 以图片形式返回这些图片,并缩小到适合在对话记录中展示的尺寸。

它是只读的,不能修改、创建、删除任何内容。

环境要求

  • 已安装 OneNote 桌面应用 的 Windows。
    Microsoft Store 里的 OneNote 应用是另一个程序,没有 COM 接口。

  • Python 3.11 或更高版本,位数不限。

安装

python -m venv .venv
.venv\Scripts\python.exe -m pip install -e .

注册

当前文件夹中的 .mcp.json 会为当前项目注册这个服务器。若要让它处处可用:

claude mcp add onenote -s user -- C:\path\to\onenote_COM_mcp\.venv\Scripts\python.exe -m onenote_mcp.server

这条命令同样适用于 Claude Desktop 与 VS Code 扩展。

工具

工具

作用

list_notebooks

列出已打开的笔记本及其分区,并标明各笔记本是个人笔记本,还是位于共享团队站点上

list_pages

列出笔记本、分区组或分区下的页面

search_pages

搜索与查询匹配的页面,可搜索全部内容或某个范围

get_page

以文本形式返回单页内容及其图片清单,不包含任何像素数据

get_page_images

按索引返回图片,并缩小到 max_edge 指定的尺寸

get_pageget_page_images 刻意彼此分开。一个页面可能装下十几张全尺寸截图,而读取页面文本时,不应把它们全部拖入对话。

当你想获取 OneNote 在图片中识别出的文字时,可让 get_page 返回 include_ocr,通常仅凭文字就已足够回答问题,完全不必去取图片。

第一次调用较慢

服务器在首次工具调用之前不会联系 OneNote。若此时 OneNote 未打开,该调用会先启动它,因此需要耗一点时。之后的调用很快:读取一个包含十个页面的分区大约只需两秒。

开发

.venv\Scripts\python.exe -m pytest        # no OneNote needed
.venv\Scripts\python.exe tools\smoke.py   # live check, needs OneNote

在修改 com.py 前,请先阅读 CLAUDE.md。COM 接口有两个陷阱,要找出来需花掉一整天,其中一个还会杀掉 OneNote 进程。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables Claude to read and write to local Microsoft OneNote notebooks by parsing backup files and utilizing the OneNote COM API. It allows for searching notes, creating pages, and appending content without requiring Azure registration or API keys.
    10
    3

View all related MCP servers

Related MCP Connectors

  • Connect Claude to Fathom meeting recordings, transcripts, and summaries

  • Read and write your Fresh Jots notes from Claude, Cursor, and any MCP client.

  • Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChristianCruger/onenote-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server