by rajvirtual
Provides AI assistants read/write capabilities for Microsoft OneNote notebooks, sections, and pages via the Model Context Protocol.
Enables AI models to interact with Microsoft OneNote, allowing them to retrieve content from notebooks, sections, and pages and to create or update pages programmatically.
https://github.com/rajvirtual/MCP-Servers
.npm install
or yarn
).npm run start
or npx -y mcp-servers
).Q: Which authentication method is required?
A: The server uses Microsoft Graph API; you need a valid OAuth access token with Notes.ReadWrite.All
permission.
Q: Can the server run on a serverless platform? A: Yes, because it is a standard Node.js HTTP service, it can be deployed to AWS Lambda, Azure Functions, or similar environments.
Q: Is there support for other Microsoft 365 services? A: The current implementation focuses on OneNote. Additional services can be integrated by extending the MCP handlers.
Q: How do I add custom logic for page formatting?
A: Modify the TypeScript handlers in the src
directory; the server exposes hooks for preprocessing content before writing.
Q: What LLMs are compatible? A: Any model that can generate or parse MCP payloads, such as Claude, GPT‑4, or hosted LLMs that support custom protocols.
A Model Context Protocol (MCP) server that provides AI assistants with access to Microsoft OneNote. This server enables AI models to read from and write to OneNote notebooks, sections, and pages.
This project implements an MCP server that connects to Microsoft OneNote using the Microsoft Graph API. It provides tools for:
onenote/
├── dist/ # Compiled JavaScript files (generated)
├── src/ # TypeScript source files
│ ├── index.ts # Main entry point and server implementation
│ └── types/ # Custom TypeScript type definitions
├── .vscode/ # VS Code configuration
│ ├── launch.json # Debug configurations
│ └── tasks.json # Build tasks
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── Dockerfile # Docker configuration
├── .env.local.example # Example environment variables
└── README.md # This file
The server uses Microsoft Authentication Library (MSAL) with device code flow for authentication:
device-code.txt
in the project directorytoken-cache.json
for future useThe server provides the following MCP tools:
Read content from Microsoft OneNote notebooks, sections, or pages.
Parameters:
type
: "read_content"pageId
: (optional) ID of the specific page to readsectionId
: (optional) ID of the section to list pages fromnotebookId
: (optional) ID of the notebook to list sections fromincludeContent
: (optional) Whether to include the content of the page (default: true)includeMetadata
: (optional) Whether to include metadata about the page (default: false)Create new content in Microsoft OneNote.
Parameters:
type
: "create_page", "create_section", or "create_notebook"title
: Title of the content to createcontent
: Content in HTML format (for pages)parentId
: (optional) ID of the parent section or notebooknpm install
.env.local
file with your Azure client ID:CLIENT_ID=your-client-id-from-azure
To run the application in development mode:
npm run dev
To compile TypeScript to JavaScript:
npm run build
To run the compiled application:
npm start
You can build and run the application using Docker:
# Create a data directory for persistence
mkdir -p data
# Build the Docker image
docker build -t onenote-mcp-server .
# Run the container
docker run -d \
--name onenote-mcp-server \
-e CLIENT_ID=your-client-id \
-v $(pwd)/data:/app/dist \
onenote-mcp-server
When running in Docker, the authentication flow works as follows:
cat data/device-code.txt
data/token-cache.json
for future useClone this repository
Run npm install
to install dependencies
In Claude Desktop, add a new MCP server:
npm run build && npm start
Save the configuration and connect to the server.
Find the file location (claude_desktop_config.json):
The file is typically located at:
On Mac OS (~/Library/Application Support/Claude/claude_desktop_config.json)
On Windows (C:\Users\YourUsername\AppData\Roaming\Claude\claude_desktop_config.json)
device-code.txt
in the project directorytoken-cache.json
token-cache.json
to force re-authenticationnpm run build
to check for compilation errorsPlease log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
by danny-avila
Provides a self‑hosted ChatGPT‑style interface supporting numerous AI models, agents, code interpreter, image generation, multimodal interactions, and secure multi‑user authentication.
by block
Automates engineering tasks on local machines, executing code, building projects, debugging, orchestrating workflows, and interacting with external APIs using any LLM.
by RooCodeInc
Provides an autonomous AI coding partner inside the editor that can understand natural language, manipulate files, run commands, browse the web, and be customized via modes and instructions.
by pydantic
A Python framework that enables seamless integration of Pydantic validation with large language models, providing type‑safe agent construction, dependency injection, and structured output handling.
by lastmile-ai
Build effective agents using Model Context Protocol and simple, composable workflow patterns.
by mcp-use
A Python SDK that simplifies interaction with MCP servers and enables developers to create custom agents with tool‑calling capabilities.
by nanbingxyz
A cross‑platform desktop AI assistant that connects to major LLM providers, supports a local knowledge base, and enables tool integration via MCP servers.
by gptme
Provides a personal AI assistant that runs directly in the terminal, capable of executing code, manipulating files, browsing the web, using vision, and interfacing with various LLM providers.