Table of contents

Developers capture requirements specs, data model definitions, and acceptance criteria in OneNote notebooks.
When they create a Codex task to implement those requirements, they describe the work from memory instead of using what's in the actual spec page (e.g., the exact field names).
Codex generates code against the developer's description, so when that description says "build a parser for the payment object," Codex infers what the model looks like. The page in OneNote might define different field names, require nullable handling the developer didn't mention, or specify enumeration values that didn't make it into the task.
To give Codex direct access to OneNote as it works through your coding tasks, we'll show you how to connect OneNote with Merge Agent Handler's OneNote MCP server.
Merge Agent Handler connects Codex to the OneNote API through the Merge CLI. You install the CLI, authenticate once, and run a single setup command from your project root.
That command writes a Merge CLI section to your project's AGENTS.md file, which tells Codex when to call merge search-tools and merge execute-tool to reach OneNote.
Once connected, Merge handles Microsoft Graph's OAuth token lifecycle and Azure AD authorization on your behalf, so no tenant credentials live in your repo.
Related: How to use the OneNote MCP in Claude Code
Before getting started, you'll need the following:
pipx --version to confirm, or install via pip install pipx)If you want to connect Merge Agent Handler's OneNote MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Install with pipx: pipx install merge-api
Verify your installation: merge --version
Authenticate the CLI with your Merge Agent Handler account: merge login
This authenticates your session and links the CLI to your Merge account.
From the root of the project where you want Codex to have access to Merge tools, run:
This writes a Merge CLI section to your project's AGENTS.md file so Codex knows to use the CLI when a task requires OneNote data. The command is idempotent, safe to re-run if you need to reset the configuration.
Commit the updated AGENTS.md so the configuration travels with the repo.
Related: A guide to integrating the OneNote MCP with Cursor
Create a Codex task that requires live OneNote data, something like: "Find the payment data model spec in my OneNote planning notebook and scaffold a Python dataclass, including validators for every nullable and enumerated field defined in the page."
The first time Codex invokes a OneNote tool, a Magic Link will appear to complete connector authentication.

Once authenticated, Codex has access to your OneNote notebooks through Merge for all subsequent tasks in this project.
{{this-blog-only-cta}}
In case you have more questions on setting up and using the OneNote MCP with Codex, we've addressed several more commonly-asked questions below.
With OneNote connected, Codex can:
You can build a self-hosted MCP server directly on Microsoft Graph. OneNote's API is part of the Graph surface, the documentation is thorough, and for a single developer working against their own Microsoft account the initial setup is workable: register an app in Azure AD, configure the right scopes, and complete the OAuth flow.
The complexity compounds once more than one developer is involved. Each user goes through a tenant-specific auth flow, and managing per-user access tokens and refresh tokens adds state that has to live somewhere.
Teams on strict Azure AD tenants may require admin consent before any user can authorize the app, adding an approval step that breaks self-service onboarding for Codex workflows.
Merge Agent Handler handles the Microsoft Graph OAuth lifecycle centrally. Developers authenticate once through the Merge CLI rather than managing Azure AD tokens individually, and you can scope each agent's access to specific OneNote operations.
Every tool call Codex makes is logged with the agent identity, inputs, and timestamp. For teams where Codex tasks pull from shared notebooks that hold production specs or customer-facing documentation, that combination of managed auth and per-call audit logging matters.
OneNote is where teams capture the detailed context that shapes how code should be written: the data model from a sprint planning session, the API contract from a design review, the acceptance criteria written before a feature is built. None of that makes it into a Codex task description in full.
When the task description is the only source, Codex invents field names, guesses at nullability, assumes enum values, and fills in validation logic that may not match what the team specified. Those mismatches aren't obvious until a test fails or a schema mismatch surfaces in production.
Connecting OneNote gives Codex the ability to read the source page when a task depends on it. The dataclass it generates matches the actual model.
The tests it writes cover the edge cases the team documented. The script it produces reflects the operational steps the team defined.
Yes, Merge for Workforce is built to help organizations provision, secure, and govern how employees connect AI tools like Codex to knowledge systems like OneNote.
Common patterns include:
Taken together, employees can use the OneNote MCP to scaffold code from live spec pages, generate tests grounded in documented acceptance criteria, and produce scripts aligned with actual operational runbooks, while IT keeps centralized control over which notebooks and sections each employee's agent can reach.
Use Merge Agent Handler’s 150+ connectors (including OneNote) to power reliable, secure, and powerful agents.