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 "Install 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 ServerShow 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"
}
}
}
}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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.