Cover image
Try Now
2025-04-07

新的Relic MCP服务器

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

nr-mcp: New Relic MCP Server

MCP server allowing AI agents to query New Relic for debugging incidents.


For Users

This section is for users who want to use the nr-mcp server with their AI assistants.

Prerequisites

  • New Relic account with:
    • API key
    • Account ID
    • Region (US or EU)

Quick Start

Option 1: Using Docker (Recommended)

# Run the Docker container with required environment variables
docker run -it --rm \
  -e NEW_RELIC_API_KEY=your_api_key \
  -e NEW_RELIC_ACCOUNT_ID=your_account_id \
  -e NEW_RELIC_REGION=US \
  danielng123/nr-mcp

Option 2: Using npx

Not yet supported

MCP Client Configuration

To connect an AI assistant to nr-mcp, add the following configuration to your MCP client setup:

Docker Connection

{
  "mcpServers": {
    "newrelic": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "NEW_RELIC_API_KEY",
        "-e",
        "NEW_RELIC_ACCOUNT_ID",
        "-e",
        "NEW_RELIC_REGION",
        "danielng123/nr-mcp"
      ],
      "env": {
        "NEW_RELIC_API_KEY": "<YOUR_API_KEY>",
        "NEW_RELIC_ACCOUNT_ID": "<YOUR_ACCOUNT_ID>",
        "NEW_RELIC_REGION": "US"
      }
    }
  }
}

Local Installation Connection

{
  "mcpServers": {
    "newrelic": {
      "command": "nr-mcp",
      "args": [],
      "env": {
        "NEW_RELIC_API_KEY": "<YOUR_API_KEY>",
        "NEW_RELIC_ACCOUNT_ID": "<YOUR_ACCOUNT_ID>",
        "NEW_RELIC_REGION": "US"
      }
    }
  }
}

Using with AI Assistants

When using nr-mcp with AI assistants like Claude Opus or GPT-4o, include the following in your prompt:

I need to analyze New Relic data for my application.
Please use the nr-mcp server to:
1. Run NRQL queries
2. Fetch dashboard data
3. Analyze logs
4. [Your specific task]

Example NRQL query: SELECT count(*) FROM Transaction SINCE 1 hour ago

For Developers

This section is for developers who want to contribute to the nr-mcp project.

Development Setup

# Clone the repository
git clone https://github.com/ducduyn31/nr-mcp.git
cd nr-mcp

# Install dependencies
pnpm install

# Build the project
pnpm build

Docker Development

Building the Docker Image

# Build the Docker image locally
docker build -t nr-mcp .

# Build with a specific tag
docker build -t nr-mcp:1.6.0 .

Running the Docker Container for Development

# Run with environment variables for development
docker run -it --rm \
  -e NEW_RELIC_API_KEY=your_api_key \
  -e NEW_RELIC_ACCOUNT_ID=your_account_id \
  -e NEW_RELIC_REGION=US \
  nr-mcp

The MCP Inspector is a powerful tool for debugging and testing MCP servers and clients. We've added a streamlined development workflow that automatically watches for file changes, rebuilds the project, and runs the inspector:

# Start the development workflow
pnpm dev

This command:

  1. Watches the src directory for changes to .ts files
  2. Automatically rebuilds the project when changes are detected
  3. Runs the MCP Inspector in parallel

Manual Testing

You can also run these commands separately:

# Watch for file changes and rebuild
pnpm watch

# Start the inspector
pnpm inspector

Using the Inspector

Once the inspector is running:

  1. Open the web interface (typically at http://localhost:5173)
  2. Select "Connect to Server"
  3. Choose "Stdio" as the transport type
  4. Enter the command to start your server: node dist/index.js
  5. Click "Connect"

After connecting, you can:

  • Browse available tools
  • Make test calls with custom parameters
  • View responses and any errors
  • Record and replay testing sessions

Debugging Tips

  • Use the inspector to compare expected vs. actual responses
  • Monitor the full request/response cycle for each tool call
  • Check for proper error handling by intentionally sending invalid inputs
  • Verify that your tools adhere to their declared schemas

Development

# Create a new tool
pnpm create-tool

# Lint code
pnpm lint

# Format code
pnpm format

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

    Reviews

    1 (1)
    Avatar
    user_GbZjE7Y5
    2025-04-16

    The HQ Pool Services Website by EmundoT is a fantastic resource for all pool maintenance needs. The design is clean and user-friendly, making navigation a breeze. Highly recommend checking it out via the provided link for anyone looking for top-notch pool services!