newrelic-mcp
Use this skill whenever the user wants to query, debug, monitor, or analyze anything in New Relic — including logs, metrics, traces, APM data, alerts, incidents, dashboards, or infrastructure. Triggers on phrases like "check New Relic", "query NRQL", "look at alerts", "analyze performance", "what's happening in production", "check error rate", "find slow transactions", "investigate incident", or any request to pull observability or monitoring data. Also triggers when the user mentions APM, distributed tracing, golden signals, Errors Inbox, or synthetic monitors. Always use this skill rather than guessing — it contains the tool list, NRQL syntax, and multi-step workflows needed to do it right.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 29
- Forks
- 156
01 前言 Front Matter
- name
- newrelic-mcp
- description
- Use this skill whenever the user wants to query, debug, monitor, or analyze anything in New Relic — including logs, metrics, traces, APM data, alerts, incidents, dashboards, or infrastructure. Triggers on phrases like "check New Relic", "query NRQL", "look at alerts", "analyze performance", "what's happening in production", "check error rate", "find slow transactions", "investigate incident", or any request to pull observability or monitoring data. Also triggers when the user mentions APM, distributed tracing, golden signals, Errors Inbox, or synthetic monitors. Always use this skill rather than guessing — it contains the tool list, NRQL syntax, and multi-step workflows needed to do it right.
- compatibility
- { "mcp_servers": [ { "url": "https://mcp.newrelic.com/mcp/", "auth": "oauth", "name": "newrelic-mcp-server" } ] }
02 资源文件 1
- 参考文档references/nrql-patterns.md5.0 KB
03 SKILL.md 正文
New Relic MCP Skill
Note: The New Relic MCP server is currently in preview.
Before starting, let the user know and point them to the setup docs if they haven't connected yet.
MCP Server Setup
Server URL: https://mcp.newrelic.com/mcp/
Auth: OAuth (User API Key — not Ingest key)
Account ID: Required for most calls — ask the user if not provided.
{
"mcpServers": {
"newrelic-mcp-server": {
"url": "https://mcp.newrelic.com/mcp/",
"oauth": {
"authorizationUrl": "https://login.newrelic.com/oauth2/authorize",
"tokenUrl": "https://login.newrelic.com/oauth2/token",
"scopes": ["openid", "profile", "mcp:access"],
"usePKCE": true
}
}
}
}
Tool Reference (30+ tools across 6 categories)
Discovery
| Tool | What it does |
|---|---|
get_entity |
Find entity by GUID or name pattern |
list_related_entities |
Entities 1 hop away from a given GUID |
search_entity_with_tag |
Find entities by tag key/value |
list_entity_types |
Full catalog of entity domain/types |
list_available_new_relic_accounts |
All accessible account IDs |
list_dashboards |
All dashboards for an account |
get_dashboard |
Details for a specific dashboard |
convert_time_period_to_epoch_ms |
Convert relative time → epoch ms |
Data Access
| Tool | What it does |
|---|---|
execute_nrql_query |
Run any NRQL query against NRDB |
natural_language_to_nrql_query |
Convert plain English → NRQL, execute, return results |
Alerting
| Tool | What it does |
|---|---|
list_recent_issues |
All currently open issues |
search_incident |
Filter alert events (open/closed, priority, state) |
list_alert_policies |
Alert policies, optionally filtered by name |
list_alert_conditions |
Alert conditions for a specific policy |
list_synthetic_monitors |
Automated synthetic availability tests |
Incident Response
| Tool | What it does |
|---|---|
generate_alert_insights_report |
Deep analysis report for a specific issue |
generate_user_impact_report |
End-user impact analysis for an issue |
analyze_deployment_impact |
Performance delta before/after a deployment |
list_entity_error_groups |
Error groups from Errors Inbox |
list_change_events |
Deployment/config change history for an entity |
Performance Analytics
| Tool | What it does |
|---|---|
analyze_golden_metrics |
Throughput, latency, error rate, saturation |
analyze_transactions |
Slow and error-prone transaction breakdown |
analyze_entity_logs |
Error patterns, anomalies, recurring issues |
list_recent_logs |
Raw recent logs for an entity |
analyze_threads |
Thread state, CPU, memory |
list_garbage_collection_metrics |
JVM GC and memory metrics |
analyze_kafka_metrics |
Consumer lag, producer throughput, latency, partition balance |
Decision: Which Tool First?
User asks about...
├── "what services do I have?" / "find X service" → get_entity
├── "any alerts / incidents / issues?" → list_recent_issues → search_incident
├── "how is X performing?" → analyze_golden_metrics
├── "what errors are happening?" → list_entity_error_groups → execute_nrql_query
├── "slow transactions" → analyze_transactions
├── "check logs" → analyze_entity_logs / list_recent_logs
├── "did deploy cause this?" → analyze_deployment_impact
└── anything else / complex → natural_language_to_nrql_query
Common Workflows
Workflow 1: Production Error Investigation
1. get_entity → find the service GUID
2. analyze_golden_metrics → health snapshot
3. list_entity_error_groups → error patterns
4. analyze_entity_logs → log anomalies
5. list_change_events → recent deployments
6. execute_nrql_query → drill into specific errors
NRQL for step 6:
SELECT count(*), error.class, error.message
FROM TransactionError
WHERE entity.guid = '<guid>'
FACET error.class, error.message
SINCE 1 hour ago
LIMIT 20
Workflow 2: Performance Degradation
1. get_entity → find the service GUID
2. analyze_transactions → slow/error-prone endpoints
3. analyze_golden_metrics → latency trend
4. list_garbage_collection_metrics → JVM health (if Java)
5. analyze_threads → thread contention
6. analyze_deployment_impact → correlate with a deploy
Workflow 3: Alert Investigation
1. list_recent_issues → open issues
2. generate_alert_insights_report → root cause analysis
3. generate_user_impact_report → customer blast radius
4. get_entity → affected service
5. list_related_entities → upstream/downstream impact
6. analyze_entity_logs → logs during alert window
7. list_change_events → correlated changes
Workflow 4: Natural Language (Quickest Path)
When the user's request is clear but the right NRQL isn't obvious, use:
natural_language_to_nrql_query(request="<user's question verbatim>")
This generates + executes NRQL automatically. Best for one-off queries.
NRQL Quick Reference
Structure
SELECT <functions/attributes>
FROM <event_type>
WHERE <filters>
FACET <grouping>
SINCE <time>
LIMIT <n>
TIMESERIES AUTO -- optional, for trend charts
Key Event Types
Transaction— APM spansTransactionError— app errorsSpan— distributed trace spansLog— log eventsMetric— dimensional metricsSystemSample— host infrastructureProcessSample— process metrics
Golden Signal Queries
Latency (p95/p99):
SELECT percentile(duration, 95, 99) FROM Transaction SINCE 1 hour ago TIMESERIES AUTO
Error rate:
SELECT percentage(count(*), WHERE error IS true) FROM Transaction SINCE 1 hour ago
Throughput:
SELECT rate(count(*), 1 minute) FROM Transaction TIMESERIES AUTO SINCE 1 hour ago
Saturation:
SELECT average(cpuPercent), average(memoryUsedPercent) FROM SystemSample SINCE 1 hour ago
Time Ranges
SINCE 30 minutes agoSINCE 1 hour ago UNTIL 5 minutes agoSINCE '2024-03-01 00:00:00'SINCE today
NRQL Rules (Always Follow)
✅ Do:
- Always include
SINCE— be explicit even though default is 1 hour - Use
LIMITto cap results - Use
FACETto group by service/error/host - Use
percentile()notaverage()for latency (p95/p99 is what matters) - Filter by
appName,service.name, orentity.guidto scope to one service - Use
TIMESERIES AUTOwhen you want to show a trend
❌ Don't:
SELECT *withoutLIMIT(can return huge data)- Query without any
WHEREclause across a whole account - Use long time ranges with raw event queries (use aggregations instead)
- Use vague
LIKE '%..%'patterns on high-cardinality fields
Troubleshooting
| Problem | Likely Cause | Fix |
|---|---|---|
| No results | Filters too strict or wrong event type | Widen time range, remove a WHERE clause, check attribute name casing |
| Query timeout | Too complex / time range too large | Add WHERE filters, narrow SINCE, reduce FACET cardinality |
| Missing attribute | Not instrumented or wrong name | Use Data Explorer in NR UI to check available attributes |
| Incomplete traces | Distributed tracing not enabled | Verify tracing config + context propagation across services |
For Deeper Reference
See references/nrql-patterns.md for:
- Full aggregation function list
- Advanced FACET patterns
- Subquery and nested aggregation examples
- Infrastructure and Kafka-specific query patterns
04 同仓库更多 Skills
business-data
暂无简介
workflow
Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of "workflow", "durable functions", "resumable", "workflow sdk", "queue", "event", "push", "subscribe", or step-based orchestration.
workflow
Vercel Workflow SDK expert guidance. Use when building durable workflows, long-running tasks, API routes or agents that need pause/resume, retries, step-based execution, or crash-safe orchestration with Vercel Workflow.
verification
Full-story verification — infers what the user is building, then verifies the complete flow end-to-end: browser → API → data → response. Triggers on dev server start and 'why isn't this working' signals.
vercel-storage
Vercel storage expert guidance — Blob, Global Config (formerly Edge Config), and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.
vercel-services
Configure and troubleshoot Vercel Services for multiple frontends and backends in one project. Use when composing a polyglot or multi-service application on one Vercel deployment; defining the `services` key, service-targeted rewrites, or service bindings in `vercel.json`; or running all services with `vercel dev`.