Table of contents

You already write, edit, and reason about your code in Cursor. But the moment you start building something that integrates with Datadog, you need details that only live in your Datadog org.
What does a monitor object's JSON actually look like? Which tag keys are valid on the metric you're querying? How is an APM trace structured before you write the code that parses it?
Without the MCP connection, answering those questions means leaving the editor, authenticating against Datadog's API separately, running test calls, and pasting responses back into the session where the integration code is being written.
To help your developers inspect Datadog's data model and query real telemetry without leaving Cursor, we'll show you how to connect Datadog with Merge Agent Handler's Datadog MCP server.
Merge Agent Handler connects Cursor to the Datadog 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 the project's .cursorrules file, which tells Cursor's agent when to call merge search-tools and merge execute-tool to reach Datadog.
Merge handles your Datadog API and application key storage so you never commit credentials to the repo or rotate them by hand.
Related: How to use the Datadog 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 Datadog MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Run the following to install the Merge CLI: pipx install merge-api
Verify your installation: merge --version
Authenticate the CLI with your Merge Agent Handler account: merge login
This links the CLI to your account so it can make authorized requests to Datadog 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, safe to re-run if you need to reset.
Related: Steps for connecting a Datadog MCP with Codex
Open a Cursor chat in your project and try a prompt like:
Fetch the JSON for our existing latency monitors, including the query, thresholds, and tags, so I can write correct payloads in the monitor-management integration I'm building.
The first time you invoke a Datadog 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 Datadog MCP in Cursor, we've addressed several more commonly-asked questions below.
With Datadog connected, Cursor can:
You can connect directly to Datadog's API using your own API and application keys. The REST API is well-documented, key generation is quick, and for a single developer building against one org the setup is fast.
The access control problem appears when you scale beyond one developer or one agent.
Datadog keys carry broad read access across metrics, logs, and traces, and sharing them across agents or teammates means every agent operates with that same reach, with no way to restrict which operations a given agent can call. Rotating a key means updating every system that holds it at once.
Merge Agent Handler handles Datadog authentication centrally.
You define exactly which Datadog operations each agent can call: an agent that inspects monitor and metric structure for code generation can read those objects without reaching write operations like creating monitors or muting alerts. Every call is logged with the timestamp, tool, and inputs, so you have a full record of what each agent read or changed.
For teams running multiple agents against a shared Datadog org, that combination of scoped access and central logging is the difference between a controlled deployment and a shared credential problem.
Datadog's API data, monitor JSON, metric tag schemas, trace structures, dashboard definitions, isn't something you can accurately reconstruct from documentation alone.
These values are org-specific: monitor IDs differ across environments, tag schemas reflect what your instrumentation actually emits, and trace shapes reflect how your services are instrumented.
Connecting Datadog to Cursor puts that discovery step inside the editor. When you're writing a monitor provisioner and need the exact JSON a monitor expects, you fetch a real one. When you're building a metrics report and need to know which tag keys are valid, you query the metric. When you're writing a trace parser and need the span structure, you pull a live trace.
The data that makes the integration code correct stays in the same session where the code is being written, instead of forcing a separate API exploration phase before development can start.
Yes, Merge for Workforce is built to help engineering organizations provision, secure, and govern how employees connect AI tools like Cursor to operational systems like Datadog.
Common patterns include:
The result is that employees can use the Datadog MCP to write monitor-management code against real object structures, build metric reports grounded in actual tag schemas, and write trace parsers that match live span formats, and more, while IT keeps centralized control over which data each agent can reach.
Use Merge Agent Handler’s 150+ connectors (including Datadog) to power reliable, secure, and powerful agents.