- Home
- MCP servers
- New Relic
New Relic
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mohdhaji87-newrelicmcp": {
"command": "uv",
"args": [
"--directory",
"/Users/mohaji/mcp-servers/newrelic-mcp",
"run",
"server.py"
],
"env": {
"NEW_RELIC_API_KEY": "<YOUR_NEW_RELIC_API_KEY>",
"NEW_RELIC_ACCOUNT_ID": "<YOUR_NEW_RELIC_ACCOUNT_ID>"
}
}
}
}This MCP server exposes New Relic NerdGraph and REST API endpoints as tools, letting you interact with your New Relic account programmatically. You run it locally with the UV runner, authenticate using your New Relic API key and account ID, and then call the available tools to query logs, dashboards, alerts, and more from your account.
How to use
You run this MCP server as a local process and connect to it from any MCP-compatible client. When the server is running, you call the available tools to perform actions such as querying logs, fetching account information, and retrieving dashboards or alerts. Each tool is exposed as an MCP endpoint you can invoke from your client, enabling automation and scripted interactions with your New Relic data.
How to install
Prerequisites: you need Python 3.12 or newer. You also need a working UV runtime to launch the MCP server.
Install dependencies and start the server using the following commands.
uv pip install -r requirements.txt
export NEW_RELIC_API_KEY=your_api_key
export NEW_RELIC_ACCOUNT_ID=your_account_id
uv --directory /Users/mohaji/mcp-servers/newrelic-mcp run server.py
Additional notes
Configuration for running with MCP clients follows the provided JSON examples. The server expects two environment variables for authentication: NEW_RELIC_API_KEY and NEW_RELIC_ACCOUNT_ID. Include these when launching the server in your environment or in your MCP client configuration.
The available tools include query_logs (NerdGraph/GraphQL), query_logs_rest (REST API v2), get_account_info, get_user_info, get_alerts, get_dashboards, and get_entities. Each one is exposed as an MCP tool to be invoked by your client.
Security and credentials
Keep your New Relic API key secret. Do not commit credentials to version control. Use environment variables or a secure secrets manager in your deployment environment.
Available tools
query_logs
Query NerdGraph/GraphQL logs and metrics from New Relic using the NerdGraph API.
query_logs_rest
Query metrics/logs via the New Relic REST API v2.
get_account_info
Retrieve information about the connected New Relic account.
get_user_info
Retrieve information about the authenticated user.
get_alerts
Fetch alert policies and current alerts for the account.
get_dashboards
List and retrieve dashboards available to the account.
get_entities
Query entities (applications, hosts, services) in the account.