mcp-newrelic
v1.1.1
Published
MCP server for New Relic — query data, search entities, inspect alerts, deployments and dashboards via NerdGraph
Downloads
350
Readme
mcp-newrelic
Non-official MCP server for New Relic -- query data, search entities, inspect alerts, deployments and dashboards via NerdGraph.
Built on the Model Context Protocol so any MCP-compatible client (Cursor, Claude Desktop, etc.) can talk to your New Relic account through natural language.
Tools
| Tool | Description |
|------|-------------|
| run_nrql_query | Run an arbitrary NRQL query against an account and return raw result rows. |
| search_entities | Search entities by name, type, tags, or any NerdGraph entity-search query. |
| get_entity_tags | Fetch tags, metadata, and APM summary (error rate, throughput, response time) for a single entity. |
| get_alert_violations | List recent alert incidents with optional filters for entity name, priority, and time range. |
| get_deployments | List deployment events, optionally filtered by app name, entity GUID, or time range. |
| list_dashboards | Search dashboard entities by name. |
| get_dashboard | Get full dashboard detail -- pages, widgets, and their underlying NRQL queries. |
Prerequisites
- Node.js >= 18
- A New Relic User API key (create one here)
Install
npm install -g mcp-newrelicOr run directly with npx:
npx mcp-newrelicFrom source
git clone https://github.com/victorcarrico/mcp-newrelic.git
cd mcp-newrelic
npm install
npm run buildConfiguration
Set the following environment variables (or place them in a .env file in the project root):
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| NEW_RELIC_API_KEY | Yes | -- | New Relic User API key. |
| NEW_RELIC_ACCOUNT_ID | Yes | -- | Default account ID for queries. |
| NEW_RELIC_REGION | No | US | Set to EU for EU-region accounts. |
| PORT | No | 3000 | HTTP server port (only used with --http). |
Running
Stdio transport (typical for Cursor / Claude Desktop)
npm start
# or
NEW_RELIC_API_KEY=NRAK-... NEW_RELIC_ACCOUNT_ID=123456 node dist/index.jsHTTP transport
npm run start:http
# MCP endpoint: POST http://localhost:3000/mcp
# Health check: GET http://localhost:3000/healthDevelopment (watch mode)
npm run devUsing with Cursor
Add the server to your MCP config (.cursor/mcp.json):
{
"mcpServers": {
"newrelic": {
"command": "npx",
"args": ["mcp-newrelic"],
"env": {
"NEW_RELIC_API_KEY": "NRAK-...",
"NEW_RELIC_ACCOUNT_ID": "123456"
}
}
}
}Using with Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"newrelic": {
"command": "npx",
"args": ["mcp-newrelic"],
"env": {
"NEW_RELIC_API_KEY": "NRAK-...",
"NEW_RELIC_ACCOUNT_ID": "123456"
}
}
}
}