Table of contents

Microsoft Graph's message and event API resources aren't simple.
A message splits body content across body and bodyPreview, attachments come back as a separate base64-encoded resource, and events represent time as separate start and end objects. Writing a parser, handling attachments, or building scheduling logic all mean checking the real response first, not guessing from the docs.
That means leaving the editor for Graph Explorer or a scratch script and carrying the answer back in a browser tab.
To help your developers query Outlook data without leaving Cursor, we'll show you how to connect Outlook with Merge Agent Handler's Outlook MCP server.
Merge Agent Handler connects Cursor to Microsoft Graph's Outlook 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 .cursorrules file, which tells Cursor's agent when to call merge search-tools and merge execute-tool to reach Outlook.
Merge will then manage your Microsoft Graph OAuth token storage and refresh on your behalf, so no credential state lives in your local environment.
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 Outlook MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Add the Merge CLI to your environment with pipx: pipx install merge-api
Confirm the installation succeeded: merge --version
Related: How to use the Outlook MCP in Claude Code
Connect the CLI to your Merge Agent Handler account: merge login
This links the CLI to your account so Merge can make authorized requests against Outlook on your behalf.
Run the following from the root of the project where you want to use Merge tools:
This writes a ## Merge CLI section to .cursorrules so Cursor knows to use the CLI for third-party services. The command is idempotent, so it's safe to re-run if you need to reset.
Open a Cursor chat in your project and try a prompt such as:
Fetch a real message from my inbox and show me the full response, including the body, bodyPreview, and attachment references, so I can write the parser correctly.
The first time you invoke an Outlook tool, a Magic Link will appear to complete connector authentication.
{{this-blog-only-cta}}
In case you have more questions on setting up and using the Outlook MCP in Cursor, we've addressed several more commonly-asked questions below.
With Outlook connected, Cursor can:
body and bodyPreview, and how attachments are referenced, so your deserialization matches the actual Graph responsestart, end, and time zone fields before you write code that creates or compares events@odata.nextLink and delta tokens behave before implementing a sync loopYou can self-host an MCP server that wraps Microsoft Graph's mail and calendar APIs directly. For a solo developer working against their own mailbox, that setup works: register an app in Azure AD, request the Graph scopes you need, and manage the token yourself.
The overhead compounds at the team level.
Microsoft Graph app registrations typically need tenant admin consent, and every developer who wants Outlook access through Cursor either shares that registration or goes through the same approval separately. There's no built-in way to scope which mailboxes, folders, or operations a given agent can reach, and token refresh across multiple developers becomes a manual coordination problem.
Merge Agent Handler centralizes the Microsoft Graph connection and adds a control layer on top.
You define which Outlook operations each agent is allowed to call, Merge enforces those boundaries, and every tool call is logged with a full audit trail that includes the input and output.
Developers writing Outlook integrations have to understand Microsoft Graph's data model before the code will work: a message that splits body content across two fields, attachments that live behind a separate resource, and calendar events that represent time as structured objects rather than plain strings.
That structure is documented, but reading about it isn't the same as seeing a real message or event from the mailbox your integration will run against.
With the Outlook MCP connected, Cursor can pull real Outlook data directly in the chat panel.
You can fetch a message while writing the parser that will process it, check an event's time zone fields while writing the scheduling logic that depends on them, or resolve real folder IDs while writing the query that filters by folder.
Yes, Merge for Workforce is built to help organizations provision, secure, and govern how employees connect AI tools like Cursor to systems like Outlook.
Common patterns include:
Put together, employees can use the Outlook MCP to write integrations grounded in real message and event structures, build sync logic tied to actual delta query behavior, and validate scheduling code against real time zone data, while IT keeps centralized control over which mailboxes and calendars each agent can reach.
Use Merge Agent Handler’s 170+ connectors (including Outlook) to power reliable, secure, and powerful agents.