# New Relic MCP

> New Relic monitors your entire stack, giving your AI agent full visibility into infrastructure performance. Use this MCP to list applications, run raw New Relic Query Language (NRQL) queries, track Service Level Objectives (SLOs), and check real-time error rates without opening the browser or dashboard. It's direct metrics access for SREs.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** apm, infrastructure-monitoring, nrql, log-management, real-time-alerts, graphql

## Description

Connect your New Relic account to your AI client and stop clicking through dashboards just to check system health. This MCP lets you talk to your infrastructure using natural language, querying deep performance data with the NerdGraph API. You can ask about specific applications, compare error rates across services, or list all active alerts—all in one conversation. It's like having a single pane of glass that answers questions instead of just showing graphs.

Need to check if your deployment went smoothly? Ask for the golden metrics (like Apdex scores and average response times) on demand. Want to know which services are running low on capacity, or what SLO targets you’re close to missing? Just ask. If you're building a catalog of external connections, Vinkius makes it easy to integrate this kind of deep system monitoring into your existing agent workflow.

## Tools

### get_apm_summary
Pulls the primary performance metrics, including error rates and Apdex scores, for an application.

### get_dashboard
Fetches the configuration details for a specific observability dashboard.

### get_entity_details
Retrieves detailed metadata about any monitored entity, like an app or host.

### get_me
Returns the current user and account information associated with your connection.

### list_accounts
Lists all New Relic accounts that are accessible under your API key.

### list_alerts
Retrieves a list of currently open and active issues or alerts across the monitored environment.

### list_dashboards
Lists all custom observability dashboards configured within your New Relic account.

### list_entities
Searches and lists various monitored assets, such as APM applications or container groups.

### list_service_levels
Lists all defined Service Level Objectives (SLOs) to check against performance targets.

### run_nrql
Executes an arbitrary New Relic Query Language query to retrieve custom dataset metrics.

## Prompt Examples

**Prompt:** 
```
List all APM applications in my account.
```

**Response:** 
```
Retrieving entities... I found 5 APM applications: 'Web-Frontend-Prod', 'Inventory-Service', 'Auth-API', and 2 others. Would you like the golden metrics for 'Web-Frontend-Prod'?
```

**Prompt:** 
```
Show me the error rate and response time for application GUID 'MTIzNDU2fEFQTXxBUFBMSUNBVElPTnwxMjM'.
```

**Response:** 
```
Fetching APM summary... For application 'Web-Frontend-Prod', the current error rate is 0.05%, the Apdex score is 0.98, and the average response time is 156ms. These values are within normal operating ranges.
```

**Prompt:** 
```
Run NRQL: 'SELECT average(duration) FROM Transaction FACET appName SINCE 1 DAY AGO' for account 12345.
```

**Response:** 
```
Executing NRQL query... The results show the average duration per application over the last 24 hours. 'Web-Frontend' averaged 0.12s, 'Auth-API' averaged 0.08s, and 'DB-Proxy' averaged 0.45s. Shall I format this into a table for you?
```

## Capabilities

### Check Application Health
Gets the primary performance metrics (error rates and response times) for specific applications.

### Query Custom Data Sets
Runs raw New Relic Query Language (NRQL) strings to pull highly specific, custom metrics from your data lake.

### List and Discover Assets
Searches for and lists all types of monitored assets, including applications, hosts, and containers.

### Review Active Incidents
Retrieves a list of currently open alerts and AI-detected issues across your accounts.

### Track Service Goals
Monitors defined Service Level Objectives (SLOs) to tell you if your service is meeting its performance targets.

## Use Cases

### Investigating an intermittent latency spike
A developer notices slow transactions. They ask their agent to run `run_nrql` with the query: 'SELECT average(duration) FROM Transaction SINCE 3 HOURS AGO'. The agent returns a table showing which specific services spiked, letting them pinpoint the bottleneck without digging through raw logs.

### On-call shift handover
The on-call engineer starts their shift by asking for an overview. They use `list_alerts` to get a clean summary of all active incidents, and then call `get_apm_summary` on the top three applications to assess general health.

### Compliance reporting
A product manager needs proof that the core user journey meets its SLA. They use `list_service_levels` to check the status of the 'Checkout Flow' SLO and confirm performance is green.

### Auditing system coverage
An SRE wants to know what systems are monitored but haven't been checked in weeks. They first use `list_accounts` to ensure they have access, then run `list_entities` to get a comprehensive list of all assets.

## Benefits

- Eliminate manual dashboard checks. Use `run_nrql` to execute complex queries and pull specific metrics—like average transaction duration over the last 7 days—in a single conversation.
- Know if you’re failing your goals instantly. You can use `list_service_levels` to see defined SLOs and check their current performance status without navigating deep into dedicated dashboards.
- Rapid incident triage is finally easy. Instead of clicking through multiple pages, simply ask the agent to run `list_alerts` and get a summary of all active issues.
- Understand what you're monitoring. Use `list_entities` and `get_entity_details` to quickly map out every application, host, or container that has been added to your system.
- Check core app health with one command. Calling `get_apm_summary` gives you the golden metrics (error rate, Apdex score) for a service, letting developers confirm stability immediately.

## How It Works

The bottom line is you get real-time system metrics delivered to your conversation thread, eliminating manual dashboard checks.

1. First, subscribe to this MCP and provide your New Relic User API Key.
2. Next, instruct your AI client to use the appropriate tool name (e.g., `list_accounts`) with specific parameters.
3. Finally, your agent executes the query against New Relic's graph database and returns structured data directly in the chat.

## Frequently Asked Questions

**Can I use the New Relic MCP to find out who owns an application?**
The MCP can help you discover applications using `list_entities` and retrieve metadata with `get_entity_details`. However, ownership details are usually stored in your internal CMDB; this tool confirms what is monitored by New Relic.

**How do I check my SLO status using the New Relic MCP?**
You use the `list_service_levels` tool to retrieve definitions and current performance metrics for all defined Service Level Objectives. This tells you if your service is meeting its targets.

**Is the New Relic MCP better than just running a query manually?**
Yes. Instead of writing, executing, and then copying results from a raw NRQL console window, the agent runs the `run_nrql` for you and presents the structured data right in your chat conversation.

**Does the New Relic MCP support all my environments?**
You first use `list_accounts` to see every account connected via the API key. This confirms which distinct environments (like Staging or Production) the agent can monitor for you.

**What if I want metrics from a specific container?**
You should first use `list_entities` to find the container's name, then pass that entity ID and run a specialized query using `run_nrql` for detailed performance data.