Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>OneNote MCP ServerNew to Visual Studio Code? Get it now.
OneNote MCP Server

OneNote MCP Server

vdovnich

|
5 installs
| (0) | Free
MCP Server for Microsoft OneNote - Access your notebooks, pages, and notes directly from GitHub Copilot
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

OneNote MCP Server for VS Code

Version License

Access your Microsoft OneNote notebooks directly from GitHub Copilot using the Model Context Protocol (MCP).

✨ Features

  • 🔒 Secure Authentication - Uses Microsoft Device Code Flow with token caching
  • 📓 Full Notebook Access - List, create, and manage notebooks
  • 📄 Page Operations - Create, edit, delete, move, and copy pages
  • 🔍 Powerful Search - Search across all your notes
  • ✅ Todo Extraction - Find all todo items across recent pages
  • 🏷️ Tag Support - Extract tags like "important", "question", etc.
  • 📎 Attachments - Add images and files to pages
  • 🌐 Web Capture - Save web pages as OneNote pages

🚀 Quick Start

Prerequisites

Before using this extension, make sure you have:

  • ✅ VS Code 1.99.0 or later - Download VS Code
  • ✅ GitHub Copilot subscription - Get GitHub Copilot
  • ✅ GitHub Copilot Chat extension - Install from VS Code Marketplace
  • ✅ Microsoft account - Personal, work, or school account with OneNote access

Option 1: Install from VS Code Marketplace (Recommended)

  1. Open VS Code
  2. Go to Extensions (Cmd+Shift+X on Mac / Ctrl+Shift+X on Windows)
  3. Search for "OneNote MCP Server"
  4. Click Install
  5. Reload VS Code when prompted

The extension automatically registers the MCP server with VS Code.

Option 2: Manual Configuration via mcp.json

If you prefer to configure the MCP server manually, add it to your VS Code MCP configuration:

User-level (all workspaces): Cmd+Shift+P → "MCP: Open User Configuration"

Workspace-level (current project): Create .vscode/mcp.json

{
  "servers": {
    "onenote": {
      "type": "stdio",
      "command": "node",
      "args": ["${userHome}/.vscode/extensions/vdovnich.vscode-mcp-onenote-0.1.1/out/server.js"],
      "env": {}
    }
  }
}

💡 Note: Replace 0.1.1 with the installed extension version if different.

Step 2: Open GitHub Copilot Chat

  1. Click the Copilot icon in the sidebar (or press Cmd+Shift+I / Ctrl+Shift+I)
  2. Make sure you're signed into GitHub Copilot

Step 3: Sign In to Microsoft

When you first use a OneNote command, you'll be prompted to authenticate:

  1. Type a command like List my OneNote notebooks in Copilot Chat
  2. A notification will appear with a device code (automatically copied to clipboard)
  3. Click "Open Login URL" - this opens https://microsoft.com/devicelogin
  4. Paste the code and press Continue
  5. Sign in with your Microsoft account
  6. Click Accept to grant permissions
  7. Return to VS Code - you're now authenticated! 🎉

💡 Tip: Your login is cached, so you won't need to sign in again for a while.

Step 4: Start Using OneNote with Copilot!

Open GitHub Copilot Chat and try these prompts:

List my OneNote notebooks
Search my notes for "meeting minutes"
Create a new page called "Project Ideas" in my default notebook
Show me all todos from my recent notes

📋 Available Tools

Notebooks

Tool Description
list_notebooks List all OneNote notebooks
get_notebook Get details of a specific notebook
get_default_notebook Get the default notebook
create_notebook Create a new notebook
get_notebook_hierarchy Get full notebook structure
get_notebook_from_web_url Get notebook by web URL

Sections

Tool Description
list_sections List sections in a notebook
get_section Get section details
create_section Create a new section
copy_section Copy a section

Section Groups

Tool Description
list_section_groups List section groups
get_section_group Get section group details
create_section_group Create a section group

Pages

Tool Description
list_pages List pages in a section (with pagination)
list_all_pages List all pages across notebooks
list_recent_pages List recently modified pages
get_page Get a page by ID
get_page_by_title Find a page by title
get_page_content Get page HTML content
get_page_metadata Get page metadata
get_page_preview Get page preview
create_page Create a new page
create_page_in_default_section Create in default section
create_daily_page Create/get today's page
delete_page Delete a page
move_page Move page to another section
copy_page Copy a page
update_page Update page content
append_to_page Append content to a page
split_page Split page into multiple pages
combine_pages_to_master Merge multiple pages

Search & Utilities

Tool Description
search_pages Search pages by text
extract_tags Extract tags from a page
list_todos Find all todo items
list_pages_with_links Find pages with hyperlinks
create_sharing_link Get sharing links for a page

Media & Resources

Tool Description
add_image_to_page Add an image to a page
add_attachment_to_page Add a file attachment
capture_web_page Save a web page snapshot
get_resource Get resource (image/file) as base64

Advanced

Tool Description
run_graph_query Run raw Microsoft Graph queries

⚙️ Configuration

Setting Description Default
onenote.clientId Azure App Client ID Pre-configured
onenote.authority Azure Authority URL https://login.microsoftonline.com/common

🔐 Security & Privacy

  • No data storage: Your notes are accessed directly from Microsoft Graph API
  • Secure auth: Uses Microsoft's official MSAL library
  • Token caching: Tokens are securely stored in VS Code's secret storage
  • Minimal permissions: Only requests Notes.ReadWrite and User.Read scopes

🤝 Commands

Command Description
OneNote: Sign Out Sign out and clear cached tokens
OneNote: Show Connection Status Check authentication status

📝 Example Workflows

Daily Note Taking

Create a daily page for today and add "Meeting at 2pm with team" as a todo

Research Collection

Search my OneNote for all pages about "machine learning" and list them

Todo Review

Show me all incomplete todos from my recent notes

Meeting Notes

Create a new page called "Sprint Planning - Dec 26" with sections for Agenda, Attendees, and Action Items

🐛 Troubleshooting

Tools not appearing in Copilot Chat?

  1. Check MCP server status: Run Cmd+Shift+P → "MCP: List Servers" to see if the OneNote server is listed
  2. Start the server: If listed but not running, select it and choose "Start Server"
  3. Reload VS Code: Press Cmd+Shift+P (Mac) / Ctrl+Shift+P (Windows) → "Developer: Reload Window"
  4. Check extension is enabled: Go to Extensions and verify "OneNote MCP Server" is installed and enabled
  5. Verify GitHub Copilot: Make sure you have an active Copilot subscription and the Copilot Chat extension installed

MCP server not registering?

If you installed the extension but the MCP server doesn't appear:

  1. Open Cmd+Shift+P → "MCP: Open User Configuration"
  2. Manually add the server configuration:
{
  "servers": {
    "onenote": {
      "type": "stdio",
      "command": "node",
      "args": ["${userHome}/.vscode/extensions/vdovnich.vscode-mcp-onenote-0.1.1/out/server.js"]
    }
  }
}

Authentication issues?

  1. Sign out and sign in again: Run Cmd+Shift+P → "OneNote: Sign Out", then try again
  2. Device code expired: The code is valid for 15 minutes. If it expires, try your request again to get a new code
  3. Wrong account: Make sure you're signing in with an account that has OneNote access

"No notebooks found"?

  • Ensure your Microsoft account has OneNote notebooks
  • Try accessing OneNote directly at https://onenote.com to verify your notebooks exist

Check connection status

Run the command: Cmd+Shift+P → "OneNote: Show Connection Status"

This shows:

  • Whether you're authenticated
  • Your signed-in account
  • MCP server status

📝 Known Limitations

  • delete_section: Microsoft Graph API does not support deleting sections
  • Pagination: Large notebooks may require multiple requests

📄 License

MIT License - see LICENSE for details.

🙏 Contributing

Contributions are welcome! Please open an issue or submit a PR on GitHub.


Made with ❤️ for the VS Code and OneNote community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft