• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Set up New Relic MCP

This guide walks you through setting up New Relic's Model Context Protocol (MCP) server with your preferred AI development tools. Choose your environment below for platform-specific instructions.

Your use of any AI tools, including but not limited to the ones listed on this page, with New Relic AI MCP servers means your AI will take action on your behalf. When using either of the methods described here, create and use appropriate New Relic accounts that have RBAC and the least access permissions appropriate for your use case, requirements, and internal policies.

Before you begin the New Relic MCP setup, ensure you have completed the prerequisites, including the authentication setup. Then, follow the instructions for your specific development environment.

Filtering Tools with include-tags

The New Relic MCP tools are organized and categorized using internal tags (such as alerting, discovery, and data-access).

You can dynamically filter the tools your AI agent accesses by sending the include-tags HTTP header with your requests as shown here:

US/EU Region Notice: The configuration examples in this topic use the US region MCP connection URL: https://mcp.newrelic.com/mcp/. If your New Relic account is in the EU region, you must replace this URL with the regional endpoint in all configuration files and command-line arguments: https://mcp.eu.newrelic.com/mcp/.

"servers": {
"new-relic-mcp-server": {
"url": "https://mcp.newrelic.com/mcp/",
"type": "http",
"headers": {
"api-key": "NRAK-****",
"include-tags": "discovery,alerting"
}
}
}

For the complete list of available tags and the tools associated with each, refer to the New Relic MCP tool reference documentation.

Claude Code setup

Claude Code supports both OAuth (recommended) and API key authentication methods.

OAuth method (recommended)

  1. Ensure you have Claude Code installed and configured.
  2. Add the MCP server using the command line:
bash
$
claude mcp add newrelic --transport http https://mcp.newrelic.com/mcp/

Or, edit ~/.claude.json as shown here:

{
"mcpServers": {
"newrelic": {
"httpUrl": "https://mcp.newrelic.com/mcp/",
"oauth": {
"enabled": true,
"clientId": "pUWGgnjsQ0bydqCbavTPpw==",
"authorizationUrl": "https://login.newrelic.com/login",
"tokenUrl": "https://mcp.newrelic.com/oauth2/token",
"scopes": ["openid"]
}
}
}
}
  1. Verify that the MCP server is listed:
bash
$
claude mcp list
  1. Start Claude:
bash
$
claude
  1. Authenticate:
bash
$
/mcp auth newrelic

Follow the browser OAuth flow.

API key method

  1. Add the MCP server using the command line:
bash
$
claude mcp add newrelic --transport http --env NEW_RELIC_API_KEY=NRAK-YOUR-KEY https://mcp.newrelic.com/mcp/

Or, edit ~/.claude.json as shown here:

{
"mcpServers": {
"newrelic": {
"url": "https://mcp.newrelic.com/mcp/",
"transport": "http",
"env": {
"NEW_RELIC_API_KEY": "NRAK-YOUR-KEY-HERE"
}
}
}
}
  1. Verify that the MCP server is listed:
bash
$
claude mcp list
  1. Start Claude:
bash
$
claude

Claude Desktop setup

Claude Desktop requires the mcp-remote proxy for OAuth authentication.

OAuth method (recommended)

  1. Create the config directory (if needed):
bash
$
mkdir -p "~/Library/Application Support/Claude"
  1. Edit the config file: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
{
"mcpServers": {
"new-relic-mcp": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.newrelic.com/mcp/"]
}
}
}
  1. Restart Claude Desktop.

API key method

  1. Add the MCP server by editing ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) as shown here:
{
"mcpServers": {
"newrelic": {
"url": "https://mcp.newrelic.com/mcp/",
"transport": "http",
"headers": {
"api-key": "NRAK-YOUR-KEY-HERE"
}
}
}
}
  1. Restart Claude Desktop.

Windsurf setup

OAuth method (via mcp-remote proxy)

  1. Edit the config file, ~/.codeium/windsurf/mcp_config.json, as shown here:
{
"mcpServers": {
"newrelic-oauth": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.newrelic.com/mcp/"]
}
}
}
  1. Restart Windsurf.

  2. Check MCP servers using the hammer icon in the Cascade panel.

API key method

  1. Add the MCP server by editing ~/.codeium/windsurf/mcp_config.json as shown here:
{
"mcpServers": {
"newrelic-api": {
"serverUrl": "https://mcp.newrelic.com/mcp/",
"headers": {
"api-key": "NRAK-YOUR-API-KEY"
}
}
}
}
  1. Restart Windsurf.

Gemini CLI setup

OAuth method

  1. Edit the settings file: ~/.gemini/settings.json (Linux/macOS) or %APPDATA%\Gemini\settings.json (Windows).
{
"theme": "Default",
"selectedAuthType": "oauth-personal",
"mcpServers": {
"newrelic": {
"httpUrl": "https://mcp.newrelic.com/mcp/",
"oauth": {
"enabled": true,
"clientId": "pUWGgnjsQ0bydqCbavTPpw==",
"authorizationUrl": "https://login.newrelic.com/login",
"tokenUrl": "https://mcp.newrelic.com/oauth2/token",
"scopes": ["openid"]
}
}
}
}
  1. Start Gemini CLI:
bash
$
gemini
  1. Authenticate:
bash
$
/mcp auth newrelic

API key method

  1. Add the MCP server by editing ~/.gemini/settings.json (Linux/macOS) or %APPDATA%\Gemini\settings.json (Windows) as shown here:
{
"theme": "Default",
"selectedAuthType": "oauth-personal",
"mcpServers": {
"newrelic": {
"url": "https://mcp.newrelic.com/mcp/",
"headers": {
"api-key": "NRAK-YOUR-KEY-HERE"
}
}
}
}
  1. Start Gemini CLI:
bash
$
gemini
  1. Authenticate:
bash
$
/mcp auth newrelic

VS Code setup

VS Code remains fully supported with both authentication methods. You need VS Code (version 1.60 or later).

OAuth method

Add the MCP server by editing .vscode/mcp.json as shown here:

{
"servers": {
"new-relic-mcp": {
"url": "https://mcp.newrelic.com/mcp/",
"type": "http"
}
}
}

API key method

Add the MCP server by editing .vscode/mcp.json as shown here:

{
"servers": {
"new-relic-mcp": {
"url": "https://mcp.newrelic.com/mcp/",
"headers": {
"api-key": "NRAK-YOUR-API-KEY-HERE"
}
}
}
}

Setup steps

  1. Create or open mcp.json in your VS Code workspace:
  • If you don't have a .vscode directory, create one in your project root.
    • Inside .vscode, create a file named mcp.json.
    • Add your authentication configuration using one of the methods above.
  1. Start server:
    • Ensure your mcp.json file is open in the editor.
    • Look for a clickable link (CodeLens) above your server configuration. Click it to start the MCP server.

Once connected, you can interact with New Relic AI using natural language prompts. The MCP server will manage authentication and data retrieval from your New Relic account.

Copyright © 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.