NewRelic MCP Server
The NewRelic MCP Server provides 25 tools for querying, monitoring, and analyzing NewRelic observability data across NRQL, entities, alerts, dashboards, logs, and more.
Data Access & Queries
Execute arbitrary NRQL queries for custom analytics and data exploration
Convert natural language descriptions into NRQL query suggestions
Convert human-readable time periods (e.g., "last 6 hours") to epoch milliseconds
Logs
List recent logs with filtering by level, time range, and custom conditions
Analyze logs for a specific entity by GUID
Search logs by field/value with wildcard/pattern support
Entity Management
Get detailed information about any entity by GUID (APM, Browser, Infra, etc.)
Find related entities (dependencies, infrastructure relationships)
Search entities by tags (environment, team, service name, etc.)
List all available entity types and accessible NewRelic accounts
Alerts & Incidents
List alert policies, NRQL conditions, and recent AI-detected issues
Search incidents by time range, state, priority, and entity
Analyze deployment impact on error rates and throughput
Generate comprehensive alert insights reports with actionable recommendations
Get error groups for an entity and list change tracking/deployment events
Dashboards & Synthetics
Retrieve full dashboard details including pages, widgets, and embedded NRQL queries
List all dashboards with pagination support
List synthetic monitors with status and success rate information
Performance Analysis
Analyze golden metrics (throughput, errors, latency) for any entity
Analyze transaction performance with grouping, filtering, and slowest breakdowns
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NewRelic MCP Server Show me the error rate for the production-api over the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
newrelic-mcp-server
A comprehensive MCP server for NewRelic with 25 tools for querying, monitoring, and analyzing your observability data — NRQL, entities, alerts, dashboards, logs, and more.
Quick Start
Using npx
Add to your .mcp.json:
{
"mcpServers": {
"newrelic": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@ruminaider/newrelic-mcp-server"],
"env": {
"NEW_RELIC_API_KEY": "NRAK-XXXXXXXXXXXX",
"NEW_RELIC_ACCOUNT_ID": "1234567"
}
}
}
}Using Docker
docker build -t newrelic-mcp-server .{
"mcpServers": {
"newrelic": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "NEW_RELIC_API_KEY", "-e", "NEW_RELIC_ACCOUNT_ID", "-e", "NEW_RELIC_REGION", "newrelic-mcp-server"],
"env": {
"NEW_RELIC_API_KEY": "NRAK-XXXXXXXXXXXX",
"NEW_RELIC_ACCOUNT_ID": "1234567",
"NEW_RELIC_REGION": "US"
}
}
}
}Related MCP server: nr-mcp
Authentication
The server authenticates via a NewRelic User API key (recommended over license keys):
Variable | Required | Default | Description |
| Yes | - | User API key (format: |
| Yes | - | NewRelic Account ID |
| No |
| API region ( |
| No |
| Log level ( |
API keys are automatically redacted in log output.
Performance
Response Optimization
All tool responses use compact JSON (no whitespace) to reduce token usage. Tools that build structured response objects include only essential fields — verbose NerdGraph metadata like __typename, permalink, and rawConfiguration is stripped when raw API data is returned.
Rate Limiting
The server enforces NewRelic's API limits:
25 concurrent requests with semaphore-based backpressure
Exponential backoff on 429 responses (base 1s, max 30s, with jitter)
Automatic retry for rate limit and network errors (3 attempts)
Tools
Data Access — 5 tools
Tool | Description |
| Execute arbitrary NRQL queries with full result parsing |
| List recent logs with filtering by time range and entity |
| Analyze logs for a specific entity with pattern detection |
| Search logs by field/value with configurable limits |
| Get NRQL query suggestions from natural language descriptions |
Entity Management — 5 tools
Tool | Description |
| Get entity details by GUID including summary metrics |
| Find entities related to a given entity |
| Search entities by tag key/value pairs |
| List all available entity types and domains |
| List accessible NewRelic accounts |
Alerts & Incidents — 8 tools
Tool | Description |
| List alert policies with condition counts |
| List NRQL alert conditions for a policy |
| List recent AI-detected issues (experimental) |
| Search incidents by time range and entity |
| Analyze deployment effects on error rates and throughput |
| Generate comprehensive alert analysis reports |
| Get error groups for an entity with occurrence counts |
| List deployment and change tracking events |
Dashboards & Synthetics — 3 tools
Tool | Description |
| Get dashboard details including widgets and NRQL queries |
| List all dashboards with pagination |
| List synthetic monitors with status and locations |
Performance Analysis — 3 tools
Tool | Description |
| Analyze entity golden metrics (throughput, errors, latency) |
| Analyze transaction performance with slowest breakdown |
| Convert human-readable time periods to epoch milliseconds |
Utility — 1 tool
Tool | Description |
| Convert time descriptions like "last 6 hours" to epoch timestamps |
Example Usage
Query Error Rates
execute_nrql_query with:
query: "SELECT percentage(count(*), WHERE error IS true) FROM Transaction SINCE 1 hour ago"Find Slow Transactions
analyze_transactions with:
entityGuid: "YOUR_APM_ENTITY_GUID"
sinceMinutesAgo: 60Search Logs for Errors
query_logs with:
field: "level"
value: "ERROR"
limit: 100Get Help Writing NRQL
natural_language_to_nrql_query with:
description: "Show me error rates by service over the last 6 hours"Development
pnpm install # install dependencies
pnpm build # compile TypeScript
pnpm test # run tests
pnpm dev # run with tsx (no build needed)
pnpm watch # recompile on change
pnpm lint # lint with Biome
pnpm format # format with BiomeProject Structure
src/
index.ts # Entry point (stdio transport)
server.ts # MCP server creation and tool registration
config.ts # Environment variable parsing and validation
services/
nerdgraph-client.ts # Core GraphQL client with rate limiting and retry
nrql-service.ts # NRQL query execution
log-service.ts # Log querying and analysis
entity-service.ts # Entity retrieval and relationships
alert-service.ts # Alert policies, conditions, and incidents
dashboard-service.ts # Dashboard retrieval and listing
synthetic-service.ts # Synthetic monitor management
performance-service.ts # Transaction and golden metrics analysis
tools/
nrql-tools.ts # NRQL query tools
entity-tools.ts # Entity management tools
alert-tools.ts # Alert and incident tools
incident-tools.ts # Incident search and analysis tools
dashboard-tools.ts # Dashboard tools
log-tools.ts # Log query tools
performance-tools.ts # Performance analysis tools
synthetic-tools.ts # Synthetic monitor tools
account-tools.ts # Account listing tools
utility-tools.ts # Time conversion utilities
types/
newrelic.ts # NewRelic API type definitions
utils/
errors.ts # Custom error types (AuthenticationError, RateLimitError, etc.)
logger.ts # Structured stderr logging with API key redaction
response.ts # Response optimization (field stripping, compact JSON)
retry.ts # Exponential backoff retry with jitterDocker Development
docker compose build # build image
docker compose run --rm newrelic-mcp # run server
docker compose --profile dev up newrelic-mcp-dev # dev mode with hot reloadTroubleshooting
"Missing required environment variables"
Ensure NEW_RELIC_API_KEY and NEW_RELIC_ACCOUNT_ID are set and passed to Docker.
"Authentication failed"
Verify your API key has appropriate permissions. User API keys (NRAK-...) are recommended.
"Rate limit exceeded"
The server automatically retries with backoff. If persistent, reduce query frequency.
aiIssues endpoints failing
These use experimental NerdGraph headers. The server handles this automatically for list_recent_issues and search_incident.
License
MIT
Available Tools
24 toolsanalyze_deployment_impactB
Analyze the impact of a deployment by comparing metrics (error rate, throughput, response time) before and after the deployment. Helps identify if a deployment caused performance degradation.
Inputs: entityGuid (required), deploymentTimestamp, beforeMinutes, afterMinutes.
analyze_entity_logsB
Analyze logs for a specific NewRelic entity by GUID. Use this to investigate issues with a particular service, application, or infrastructure component.
Inputs: entityGuid (required), limit, sinceMinutesAgo, level, +1 more.
analyze_golden_metricsB
Get the golden metrics defined for a NewRelic entity. Golden metrics are the key performance indicators that NewRelic recommends monitoring for each entity type (APM applications, hosts, etc.). Returns metric names, titles, and the NRQL queries used to calculate them. Use these queries to understand what metrics are important for an entity.
Inputs: guid (required).
analyze_transactionsA
Analyze transaction performance using NRQL with FACET grouping. Query the Transaction event type to analyze web requests, API calls, and background jobs. Group by transaction name, host, or other attributes. Calculate metrics like count, average duration, error rate, and throughput. Useful for identifying slow transactions, high-error endpoints, or traffic patterns.
Inputs: since, until, facets, appName, +4 more.
convert_time_period_to_epoch_msA
Convert human-readable time strings to epoch milliseconds. Supports relative times like '1 hour ago', '30 minutes ago', '7 days ago' and absolute times like ISO 8601 dates. Useful for constructing NRQL time ranges or comparing timestamps. This is a local utility that does not make API calls.
Inputs: timeString (required), timezone, referenceTime.
execute_nrql_queryB
Execute an arbitrary NRQL query against NewRelic. Returns raw query results with metadata. Use this for custom analytics, metrics, and data exploration.
Inputs: query (required), timeout.
generate_alert_insights_reportC
Generate a comprehensive alert insights report combining AI issues, error groups, and recent deployments. Provides actionable recommendations based on the current state of alerts and incidents.
Inputs: entityGuid, sinceDays.
get_dashboardA
Get a NewRelic dashboard with full page and widget details. Returns the dashboard structure including all pages, their widgets, and widget configurations. Use this to understand dashboard layout and widget queries.
Inputs: guid (required).
get_entityA
Retrieve detailed information about a NewRelic entity by its GUID. Returns entity metadata, tags, and type-specific metrics (APM throughput/error rate, Browser page views, etc).
Inputs: guid (required).
get_entity_error_groupsB
Get error groups from TransactionError events. Groups errors by class and message to identify the most frequent and impactful errors.
Inputs: entityGuid, transactionName, sinceDays, limit.
list_alert_conditionsB
List NewRelic NRQL alert conditions with optional filtering by policy, name, or enabled status. Returns condition details including NRQL query, thresholds, and configuration.
Inputs: policyId, nameFilter, enabledOnly, limit.
list_alert_policiesA
List NewRelic alert policies with optional name filtering. Returns policy ID, name, and incident preference settings.
Inputs: nameFilter, limit.
list_available_new_relic_accountsA
List all NewRelic accounts accessible with the current API key. Shows account IDs and names. Also indicates the currently configured account.
Inputs: no named parameters.
list_change_eventsC
List change events from NrChangeTracking. Includes deployments, configuration changes, and other tracked changes with version and user information.
Inputs: entityGuid, changeType, sinceDays, limit.
list_dashboardsA
List NewRelic dashboards with optional account filtering. Returns dashboard names and GUIDs. Use pagination cursor for large result sets. Useful for discovering available dashboards before fetching full details.
Inputs: accountId, cursor, limit.
list_entity_typesA
List all available entity types in NewRelic. Returns domain/type combinations like APM/APPLICATION, INFRA/HOST, BROWSER/APPLICATION, etc.
Inputs: no named parameters.
list_recent_issuesB
List recent AI-detected issues from NewRelic. Uses the experimental aiIssues API to fetch active and recent incidents with priority and state information.
Inputs: states, priorities, entityGuids, limit.
list_recent_logsB
List recent logs from NewRelic. Useful for getting an overview of recent log activity, filtering by level, or searching with custom conditions.
Inputs: limit, sinceMinutesAgo, level, whereClause.
list_synthetic_monitorsA
List NewRelic synthetic monitors with status and success rate information. Synthetic monitors are automated tests that check endpoint availability and performance. Filter by account or status. Returns monitor GUIDs, names, current status, and success rates.
Inputs: accountId, status, cursor, limit.
natural_language_to_nrql_queryB
Convert a natural language description into NRQL query suggestions. Returns matching query patterns, templates, and NRQL syntax guidance. Use this when you need help constructing NRQL queries for NewRelic.
Inputs: description (required), eventType, includeExamples.
query_logsA
Search logs by field and value with optional time range. Supports wildcards (%) for pattern matching. Use this for targeted log searches based on specific criteria.
Inputs: field (required), value (required), limit, startTime, +2 more.
search_entity_with_tagB
Search for NewRelic entities using tags and NerdGraph query syntax. Use this to find entities by environment, team, service name, or any custom tag.
Inputs: query, tagKey, tagValue, additionalFilters, +1 more.
search_incidentC
Search NewRelic incidents with filtering by state, priority, and entity. Uses NRQL to query the NrAiIncident event type.
Inputs: state, priority, entityGuid, sinceDays, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools have distinct purposes, such as analyze_deployment_impact for deployment analysis and get_entity for entity retrieval. However, some overlap exists between analyze_entity_logs and query_logs, which both handle logs but with different scopes, potentially causing minor confusion. Overall, descriptions help clarify boundaries, but a few tools like list_recent_logs and query_logs might be ambiguous without careful reading.
Tool names follow a highly consistent verb_noun pattern throughout, such as analyze_deployment_impact, list_alert_conditions, and get_dashboard. All tools use snake_case without deviation, making them predictable and easy to parse. This consistency aids in agent selection and understanding of the toolset's structure.
With 24 tools, the count is slightly high but reasonable for a comprehensive NewRelic monitoring and analytics server. It covers various aspects like alerts, dashboards, entities, logs, and queries, which justifies the breadth. However, it borders on feeling heavy, as some tools might be consolidated or specialized, but it remains well-scoped for the domain.
The toolset provides complete coverage for NewRelic's domain, including CRUD-like operations for entities, dashboards, alerts, and logs, along with advanced analytics and query capabilities. Tools like execute_nrql_query and natural_language_to_nrql_query support custom exploration, while list_related_entities and analyze_golden_metrics offer lifecycle insights. No obvious gaps are present, enabling agents to handle typical workflows without dead ends.
Related MCP Connectors
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
Analytics for MCP servers. Query your tool calls, first-call success, retries and schema cost.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Nephia is a brand monitoring service, and this is its remote MCP server. Claude, Cursor, ChatGPT or any MCP client can read the mentions your brand gets on 14 sources: X, Reddit (posts and comments), YouTube, TikTok, Bluesky, Hacker News, Mastodon, Lemmy, GitHub, Product Hunt, Stack Overflow, any RSS feed, Vinted, and AI answers from ChatGPT, Gemini and Perplexity. Every mention arrives already read, with its sentiment and intent, so an agent can answer plain questions: which complaints came in since Friday, what Reddit said about us this week. The source is an argument, not a tool, so one call reads every source you watch. Sign-in is OAuth in the browser: no API key to copy. The consent screen has three permissions: read your mentions and Queries, change what is running (pause, resume, retire), and spend credits (semantic search and AI passes), which arrives unticked. Every tool description states its cost, so a model can budget before it spends. The server is on every plan, Free included, and reading your own mentions through it costs nothing.
Related MCP Servers
- AlicenseBqualityCmaintenanceRun NRQL, NerdGraph, and REST v2 operations to query data, manage incidents, create synthetics, and annotate deployments — all from your MCP client.181,164 npm15MIT
- AlicenseCqualityDmaintenanceMCP server allowing AI agents to query New Relic for debugging incidents.2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for New Relic workflows, enabling NRQL queries, NerdGraph access, entity lookup, logs, alerts, dashboards, and service levels.1,164 npm3MIT
- AlicenseBqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server for New Relic monitoring, observability, and management operations.45MIT