onenote-mcp
onenote-mcp
Claude が OneNote ノートブックを読めるようにするローカル MCP サーバーです。そこに貼り付けた画像も含みます。
OneNote デスクトップ アプリケーションには COM インターフェイスで接続します。Azure アプリの登録も、テナントの同意も不要です。何もマシンの外へ送信されません。
なぜ作ったのか
Microsoft 365 コネクタは OneNote をサポートしていません。mime type 'application/msonenote' is not allowed というエラーで拒否されます。Graph API のどのルートでも、Notes.ReadWrite.All を伴う Entra アプリの登録が必要になり、企業テナントの場合は IT 部門への依頼が必要です。デスクトップ COM API はそのどちらも必要としません。
Related MCP server: MCP OneNote Server
できること
開いているすべてのノートブックを検索できます。貼り付けたスクリーンショット内のテキストも対象です。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 拡張機能の両方で使用できます。
ツール
ツール | 内容 |
| 開いているノートブックとそのセクションを返し、それぞれのノートブックが個人用か共有チーム サイトにあるかも返します |
| ノートブック、セクション グループ、またはセクション配下のページを返します |
| 全範囲、または指定した範囲内でクエリに一致するページを返します |
| 1 つのページをテキストとして返し、画像のマニフェストも返します。画像ピクセルは含みません |
| インデックスで指定した画像を、 |
get_page と get_page_images は意図的に分離されています。1 ページにフルサイズのスクリーンショットが複数含まれることがあり、そのテキストを読むたびにすべての画像を会話に読み込むべきではないためです。
画像の中で OneNote が認識したテキストが必要なときは、get_page に include_ocr を指定してください。画像を一切取得せずに質問に答えるのに十分なこともよくあります。
最初の呼び出しは遅い
サーバーは最初のツール呼び出しまで OneNote にアクセスしません。その呼び出しは、OneNote が閉じていれば OneNote を起動するため、時間がかかることがあります。以降の呼び出しは高速で、10 ページのセクションなら約 2 秒で読み取れます。
開発
.venv\Scripts\python.exe -m pytest # no OneNote needed
.venv\Scripts\python.exe tools\smoke.py # live check, needs OneNotecom.py を変更する前に CLAUDE.md を読んでください。COM インターフェイスには、見つけるのに 1 日かかる罠が 2 つあり、そのうちの 1 つは OneNote プロセスを強制終了させます。
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Notes, tasks, habits, journal and 6 more tools Claude can read and change, with undo. Free.
A second brain for Claude: remembers your work, plans your day, encrypted under a key only you hold.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables 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.104-
- FlicenseAqualityFmaintenanceEnables AI agents to read, create, and analyze Microsoft OneNote notebooks, sections, and pages, including automatic image text extraction via Claude Vision.71-
- AlicenseNot gradedqualityBmaintenanceGives Claude direct access to local Microsoft OneNote notebooks, enabling reading from backups and live via COM automation, plus writing sections and pages without a Microsoft account or API key.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to sign in with a Microsoft account and read, write, search, create, move, and organize notebooks, section groups, sections, and pages, including drawing Mermaid or SVG diagrams rendered into notes. It also fetches embedded images and page contents as Markdown so handwritten-note workflows and checkboxes can be managed conversationally.19 npmMIT