onenote-mcp: Instructions file for Claude Code

CLAUDE.md

onenote-mcp CLAUDE.md is an instructions file for Claude Code from ChristianCruger/onenote-mcp. It costs 1,683 tokens per session, scanned A, original, MIT.

Project instructions for a read-only local server that connects an AI agent to the OneNote desktop application on one Windows computer.

In plain words
What is it for?
They are for guiding safe changes to the OneNote server and its read-only access to notebooks and pages.
Why use it?
They document important limits and compatibility rules, including how to read notes without exposing credentials or damaging the OneNote process.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is ChristianCruger/onenote-mcp's own configuration. It tells Claude Code how to work on onenote-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything onenote-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ChristianCruger/onenote-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ChristianCruger/onenote-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ChristianCruger/onenote-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for onenote-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/christiancruger/onenote-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/christiancruger/onenote-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/christiancruger/onenote-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/christiancruger/onenote-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for onenote-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/christiancruger/onenote-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/christiancruger/onenote-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,683 This file is loaded in full into every session.
When invoked 1,683 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01683 $0.01683
Opus 5 $0.00842 $0.00842
Sonnet 5 $0.00337 $0.00337
Haiku 4.5 $0.00168 $0.00168

Measured 9d ago against content hash 7abb8f6636af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

onenote-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OneNote MCP server

A local, read-only MCP server over the OneNote desktop COM API. It runs as one user, on one machine, against the OneNote application that user already has open.

Hard rules

These are not style preferences. Each one was paid for.

  1. Use comtypes. Never pywin32. OneNote's IDispatch cannot load its own type library, so every pywin32 call — late bound or InvokeTypes — fails with TYPE_E_LIBNOTREGISTERED, "Library not registered". comtypes calls the vtable directly and never asks OneNote to resolve a name. This is not a bitness problem. It was checked from 64-bit and 32-bit Python and fails identically in both. tests/test_guards.py enforces this.
  2. Never touch the 2007 type library. OneNote.Application.12 and {F2A7EE29-8BF6-4A6D-83F1-098E366C709C} marshal successfully, which makes them look like a working alternative. Their GetPageContent takes three arguments against a four-argument vtable, and calling it kills the OneNote process. Only {0EA692EE-BB50-4E3C-AEF0-356D91732725} version 1.1.
  3. Never read a page with piBinaryData or piAll. They inline every image as base64 and turn one ordinary page into 1.7 MB of XML. Read with piBasic, then fetch bytes per image with GetBinaryPageContent.
  4. Never return raw page XML. About 90% of it is <one:OCRData>, one token with pixel coordinates per recognised word. A page whose visible text is 221 characters arrives as 83 KB. page.py renders; it does not forward.
  5. No write path. No UpdatePageContent, no CreateNewPage, no DeleteHierarchy, no NavigateTo. Every tool is read_only_hint=True. A notebook stored on a SharePoint team site is shared, so a write there reaches everyone on that site. See "Before adding writes" below.
  6. All COM calls go through the one thread in com.py. COM interface pointers belong to the apartment of the thread that created them. The single-worker executor is what keeps that true under async.
  7. server.py must not raise while starting. A dead MCP server shows the user "Connection closed" and no reason. It also must not touch COM at start-up: connecting launches OneNote, which can take tens of seconds.
  8. Never commit a real page. Captured page XML carries the note content itself, authorResolutionID attributes holding colleagues' O365 ids and mail addresses, ProjectWise paths, and live OneDrive share links that work. Git history is permanent, so scrubbing after the fact does not help. Every fixture is synthetic and comes from tools/make_fixtures.py. If a bug needs a real page to reproduce, keep that page outside the repository.

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 119 lines · 1,683 tokens per session scan A 7abb8f6636af

Subscribe to this mod's changes

onenote-mcp CLAUDE.md is an instructions file published in the GitHub repository ChristianCruger/onenote-mcp (0 stars, last pushed 17d ago), licensed MIT. It adds 1,683 tokens to every session, about $0.0084 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens