Obtain a New Relic User API key from the API Keys UI (Account Settings > API Keys) and note your Account ID
Send GraphQL requests via POST to 'https://api.newrelic.com/graphql' with 'Content-Type: application/json' and 'API-Key: YOUR_KEY' header
For NRQL queries embed them in the actor.account.nrql query: '{actor {account(id: YOUR_ACCOUNT_ID) {nrql(query: "SELECT count(*) FROM Transaction SINCE 1 hour ago") {results}}}}'
For mutations such as creating alert policies use the 'alertsPolicyCreate' mutation, passing the account ID and policy input object with name and incident preference
Paginate large results using the 'cursor' field returned in responses; re-send the query with 'cursor: "<value>"' argument to fetch subsequent pages
Known gotchas
NerdGraph uses a single endpoint for all operations; errors are returned in the 'errors' array alongside partial data in the 'data' field — always check both fields
User API keys are tied to the creating user's permissions; queries against accounts the user cannot access return null data without a top-level error, making access issues hard to diagnose
Rate limits apply per API key; bulk historical queries can exhaust limits quickly — use NRQL TIMESERIES with appropriate SINCE/UNTIL windows and batch requests rather than looping single-point queries
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp