> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# New Relic

> Connect New Relic with a User API key so agents can run NRQL, check service health, and triage open issues and alerts

Connect New Relic so CloudThinker can run NRQL, check golden metrics and errors for a service, read logs and traces, and triage open issues and alert conditions. CloudThinker reaches New Relic through the New Relic MCP server, authenticated with a User API key (`NRAK-...`).

## Prerequisites

* A New Relic account in the **US** or **EU** region.
* The **New Relic MCP Server** feature left on for your organization. New Relic turns it on by default, but an organization admin can switch it off in the feature control manager, and nothing works while it's off.
* A New Relic user in a group with two kinds of role: an organization role that can read the MCP server, and an account role on each account agents should query. See [Required permissions](#required-permissions).
* Permission to add connections in your CloudThinker workspace.

> [!WARNING]
>
> New Relic's MCP server is in public preview, and New Relic doesn't allow it for FedRAMP or HIPAA-regulated accounts. Don't connect those accounts.

## Setup

**1. Create a User API key**

Open **API keys** from your user menu in New Relic, or go to `one.newrelic.com/api-keys` (EU: `one.eu.newrelic.com/api-keys`). Click **Create a key**, set **Key type** to **User**, name it `cloudthinker`, and save.

Copy the full key now. It starts with `NRAK-` and New Relic shows it only once.

**2. Add the connection**

In the sidebar, click **More → Workspace settings → Connections**, stay on the **Builtin Connections** tab, and select **New Relic**. Fill in:

* **Alias** (optional): a short name such as `newrelic-prod`. Lowercase letters, numbers, and hyphens.
* **Description** (optional): which account or environment this is. Agents read it to pick the right instance.
* **NEWRELIC\_API\_KEY**: the `NRAK-` key.
* **NEWRELIC\_REGION**: **US (mcp.newrelic.com)** or **EU (mcp.eu.newrelic.com)**, matching where you sign in.

Click **Connect**. CloudThinker shows **Connecting** and **Verifying**, then a **Connected** status. **Verifying** opens a session with the New Relic MCP server for your region and lists its tools. It doesn't run a query, so a missing account role shows up later, on the first question. If verification fails, it shows **Failed** and an error message appears. Match the message to [Troubleshooting](#troubleshooting).

> [!WARNING]
>
> License, ingest, and browser keys don't work here. Only a **User** key (`NRAK-...`) can query data. This is the most common setup mistake.

## Connection details

| Field | Description | Example |
| - | - | - |
| **NEWRELIC\_API\_KEY** | New Relic User API key | `NRAK-XXXXXXXXXXXXXXXXXXXX` |
| **NEWRELIC\_REGION** | Data center of your account. Defaults to **US** | `EU (mcp.eu.newrelic.com)` |

If you sign in at `one.eu.newrelic.com`, your region is **EU**. Otherwise it's **US**.

## Required permissions

A User API key carries the permissions of the user who owns it. There are no per-key scopes, so least privilege comes from the user. The user needs both levels:

| Level | Role | Fit |
| - | - | - |
| Organization | **Organization Read Only** | Recommended. Lets the user reach the MCP server |
| Organization | **Organization Product Admin**, **Organization Manager** | Works, but grants more than CloudThinker needs |
| Organization | Custom organization role | Works if it includes permission to read the MCP server |
| Account, on each account to query | **Read Only** | Recommended. Lets NRQL, APM, logs, and alerts reads see that account's data |

> [!TIP]
>
> Create a dedicated New Relic user and a group for it. In New Relic **Access management**, grant the group **Organization Read Only** at the organization level, then **Read Only** on each account you want investigated. Create the key under that user. New Relic user types can affect billing, so check which type the user gets.

## Agent capabilities

| Capability | What CloudThinker does |
| - | - |
| **Discovery** | Lists your accounts, then each account's event types, dashboards, alert policies, and recent issues |
| **NRQL** | Runs NRQL you write, or NRQL it builds from your question, such as `SELECT percentile(duration, 95) FROM Transaction FACET name` |
| **Entities** | Finds services and hosts by name or tag, and the entities one hop away |
| **Service health** | Reads golden metrics (throughput, response time, error rate, saturation), slow transactions, and error groups |
| **Logs and traces** | Reads recent logs, log statistics, and distributed trace details |
| **Alerts and issues** | Lists open issues, alert policies and conditions, and past incidents |
| **Changes** | Lists change events, such as deployments, for an application |
| **Synthetics** | Lists synthetic monitors and their recent results |
| **Dashboards** | Lists and reads dashboards |

New Relic keeps some AI tools, such as natural-language NRQL and deployment impact reports, for OAuth sign-in only. That's a New Relic limit. A User API key can't use them, so CloudThinker writes the NRQL itself and reads change events directly (see **Changes** above).

When the connection first reaches **Connected**, CloudThinker runs a read-only [discovery](https://docs.cloudthinker.io/guide/connections/overview.md#what-happens-after-you-connect) and saves what it finds for later chats.

### Verify the connection

```text theme={null}
Run New Relic discovery and list my accounts, their dashboards and alert policies, and any open issues
```

A healthy answer names at least one account ID and its event types, such as `Transaction` or `Log`.

### Example prompts

```text theme={null}
Show golden metrics for the checkout service over the last hour and anything unusual
Which New Relic issues are open right now, and which alert condition opened each one?
Were there deployments to the checkout service today, and did error rate change after them?
```

## Send New Relic alerts to Resolve

Resolve has no New Relic preset, so you send workflow notifications to a [custom signal source](https://docs.cloudthinker.io/guide/incident/webhook-integrations/custom-source.md).

**1. Create the signal in CloudThinker**

Go to **Resolve → Triggers & Outcomes**, select **Custom source**, and click **Add signal**. Name it `New Relic`, click **Create endpoint**, and copy the **Webhook URL** and secret key. The secret is shown only once.

**2. Add a webhook destination in New Relic**

In New Relic, add a **Webhook** destination. Paste the **Webhook URL** as the endpoint, and set a bearer token authorization with your secret key, so New Relic sends `Authorization: Bearer <your-secret-key>`.

**3. Notify the destination from a workflow**

In a workflow that covers the alert policies you want, add a webhook notification to that destination. Keep New Relic's default payload template.

**4. Send one test event and map the fields**

Send a test notification from the workflow. When CloudThinker shows **Payload received**, click **Map the fields**, pick the issue title field for **Incident title** and the priority field for **Severity**, and click **Save mapping**. New Relic's `CRITICAL`, `HIGH`, `MEDIUM`, and `LOW` priorities are understood as-is.

**Success state:** the next issue from that workflow shows up in [Pulse](https://docs.cloudthinker.io/guide/pulse/overview.md), the alert feed in Resolve, and agents investigate it through this connection.

## Troubleshooting

> [accordion] 401 Unauthorized, at Verifying or on the first question
>
> * The key is missing, deleted, or not a User key. Check that it starts with `NRAK-`, create a new User key if needed, and update the connection from its detail panel.
> * **NEWRELIC\_REGION** doesn't match your account. If you sign in at `one.eu.newrelic.com`, pick **EU**.

> [accordion] Fails at Verifying or on every call, with a valid key
>
> The **New Relic MCP Server** feature is switched off for your organization. It's on by default, so an admin turned it off in New Relic's feature control manager. Ask them to turn it back on, then retest the connection.

> [accordion] Permission errors or missing accounts
>
> The key's user lacks a role that can read the MCP server, or has no account role on that account. Grant the user's group **Organization Read Only** and **Read Only** on the account.

> [accordion] An entity or service isn't found
>
> CloudThinker resolves entities by name before querying them. Use the service name exactly as it appears in New Relic, or ask it to search entities by tag.

## Security

* **Least privilege** — grant only the permissions the agents need for your use case; start read-only and widen later.
* **Read-only by default** — use read-only credentials unless you want agents to make changes through this connection.
* **Rotate credentials** — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
* **Revoke on offboarding** — remove the credential at the provider when you delete a connection or a teammate leaves.

- **Read-only user**: a User key has no scopes of its own, so create it under a user whose only roles are **Organization Read Only** and **Read Only** on the accounts to query.
- **Key is shown once**: store it in your secrets manager when you create it. If you lose it, create a new key and delete the old one.

## Related

> [card] [Custom Signal Source](https://docs.cloudthinker.io/guide/incident/webhook-integrations/custom-source.md)
>
> Capture an event and map its fields

> [card] [Datadog Connection](https://docs.cloudthinker.io/guide/connections/datadog.md)
>
> Logs, metrics, monitors, and traces


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.