OneNote MCP Serverのロゴ

OneNote MCP Server

コミュニティ
danosb

MCP server for Microsoft OneNote

公開者danosb
リポジトリonenote-mcp
言語JavaScript
フォーク
69
スター
124
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    OneNote MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには124件のスターと69件のフォークがあります。

OneNote MCP Server

A Model Context Protocol (MCP) server implementation that enables AI language models like Claude and other LLMs to interact with Microsoft OneNote.

This project is based on azure-onenote-mcp-server by Zubeid Hendricks, with modifications to simplify authentication and improve usability.

What Does This Do?

This server allows AI assistants to:

  • Access your OneNote notebooks, sections, and pages
  • Create new pages in your notebooks
  • Search through your notes
  • Read complete note content, including HTML formatting and text
  • Analyze and summarize your notes directly

All of this happens directly through the AI interface without you having to switch contexts.

Using with AI Assistants

Setup for Cursor

  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:

    json
    {
      "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.

Setup for Claude Desktop (or other MCP-compatible assistants)

  1. Clone this repository and follow the installation steps below

  2. Start the MCP server: npm start

  3. In the Claude Desktop settings, add the OneNote MCP server:

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

    JSON configuration example:

    json
    {
      "mcpServers": {
        "onenote": {
          "command": "node",
          "args": ["/absolute/path/to/your/onenote-mcp.mjs"],
          "env": {}
        }
      }
    }
  4. You can now ask Claude to interact with your OneNote data

Features

  • Authentication with Microsoft OneNote using device code flow (no Azure setup needed)
  • List all notebooks, sections, and pages
  • Create new pages with HTML content
  • Read complete page content, including HTML formatting
  • Extract text content for AI analysis and summaries
  • Summarize content of all pages in a single operation
  • Read full content of all pages in a readable format
  • Search across your notes

Installation

Prerequisites

  • Node.js 16 or higher (install from nodejs.org)
  • An active Microsoft account with access to OneNote
  • Git (install from git-scm.com)

Step 1: Clone the Repository

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

Step 2: Download the TypeScript SDK

This project requires the MCP TypeScript SDK, which needs to be downloaded separately:

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

Step 3: Install Project Dependencies

bash
npm install

Step 4: Start the MCP Server

bash
npm start

This will start the MCP server, and you'll see a message:

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

Step 5: Authenticate Through Your AI Assistant

Once the server is running, you can authenticate directly through your AI assistant:

  1. In Cursor, Anthropic's Claude Desktop, or any MCP-compatible assistant, ask to authenticate with OneNote:

    Can you authenticate with my OneNote account?
  2. The AI will trigger the authentication flow and provide you with:

    • A URL (typically microsoft.com/devicelogin)
    • A code to enter
  3. Go to the URL, enter the code, and sign in with your Microsoft account

  4. After successful authentication, you can start using OneNote with your AI assistant

Available MCP Tools

Once authenticated, the following tools are available for AI assistants to use:

Tool NameDescription
authenticateStart the Microsoft authentication flow
listNotebooksGet a list of all your OneNote notebooks
getNotebookGet details of a specific notebook
listSectionsList all sections in a notebook
listPagesList all pages in a section
getPageGet the complete content of a specific page, including HTML formatting
createPageCreate a new page with HTML content
searchPagesSearch for pages across your notebooks

Example Interactions

Here are some examples of how you can interact with the OneNote MCP through your AI assistant:

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.

Advanced: Direct Script Usage

For testing or development purposes, you can also use the provided scripts directly:

bash
# 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

Troubleshooting

Authentication Issues

  • If authentication fails, make sure you're using a modern browser without tracking prevention
  • Try clearing browser cookies and cache
  • If you get "expired_token" errors, restart the authentication process

Server Won't Start

  • Verify Node.js is installed (version 16+): node --version
  • Make sure all dependencies are installed: npm install
  • Check that the TypeScript SDK was built correctly

AI Can't Connect to the Server

  • Ensure the MCP server is running (npm start)
  • Check your AI assistant's settings to make sure it's configured to use MCP
  • For Cursor, make sure it's the latest version that supports MCP

Security Notes

  • Authentication tokens are stored locally in .access-token.txt
  • Tokens grant access to your OneNote data, so keep them secure
  • Tokens expire after some time, requiring re-authentication
  • No Azure setup or API keys are required

Credits

This project builds upon the azure-onenote-mcp-server by Zubeid Hendricks, with a focus on simplifying the authentication process and improving the user experience with AI assistants.

License

This project is licensed under the MIT License - see the LICENSE file for details

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "danosb-onenote-mcp": {
      "command": "",
      "args": []
    }
  }
}

OneNote MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度OneNote MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

OneNote MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. OneNote MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "danosb-onenote-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-onenote"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてOneNote MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. OneNote MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
OneNote MCP Serverを使ってこのタスクを手伝ってもらえますか?
OneNote MCP Server
はい、読みました。
OneNote MCP Serverで調べた結果をお伝えします。

よくある質問

OneNote MCP Server MCPサーバーは何に使いますか?

OneNote MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでOneNote MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでOneNote MCP Serverを利用できます。

TypingMindでOneNote MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。OneNote MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

OneNote MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

OneNote MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでOneNote MCP Server MCPのどのようなツールを利用できますか?

OneNote MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

OneNote MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。OneNote MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇