
ivlad003/mcp_newrelic
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
NRQL クエリを使用して新しい Relic ログをクエリするためのモデルコンテキストプロトコル (MCP) サーバー。 このサーバーでは、Claude のような大きな言語モデル (LLM) が新しい Relic データを操作できます.
概要
NRQL クエリを使用して新しい Relic ログをクエリするためのモデルコンテキストプロトコル (MCP) サーバー。 このサーバーでは、Claude のような大きな言語モデル (LLM) が新しい Relic データを操作できます。 また、スラッシュコマンド、スキル、および調査エージェントを備えたインストール可能なプラグインとして利用できます。MCP サーバーは必要ありません。 インストール: /plugin のマーケットプレイスは、Ivlad003/plugins を追加し、/plugin は newrelic-observability@ivlad-plugins をインストールします。詳細については、Ivlad003/plugins を参照してください。 - NRQL - 詳細なエラーロギング - Claudeデスクトップとの簡単な統合 - 人読み可能な出力フォーマット - 設定可能な新しいRelicアカウントID - Python 3.10以上 - 新しいRelicアカウントとAPIキー - Claudeデスクトップアプリケーション 3. 指定したコードでサーバーファイル newrelic logs server.py を作成します。 4. 環境変数の設定: 設定ファイルを編集することにより、Claudeデスクトップの設定: - macOS: ~/ Library/Application Support/Claude/claude desktop config.
概要(AI 翻訳)
NRQL クエリを使用して新しい Relic ログをクエリするためのモデルコンテキストプロトコル (MCP) サーバー。 このサーバーでは、Claude のような大きな言語モデル (LLM) が新しい Relic データを操作できます。
クロードコード ユーザー: また、スラッシュコマンド、スキル、および調査エージェントを備えたインストール可能なプラグインとして利用できます。MCP サーバーは必要ありません。 インストール先:
/plugin marketplace add Ivlad003/plugins→/plugin install newrelic-observability@ivlad-plugins詳細については、Ivlad003/プラグインを参照してください。
##特徴
- NRQLを使用した新しいRelicログとメトリックのクエリ
- 詳細なエラーロギング
- Claudeデスクトップとの容易な統合
- 人読み可能な出力フォーマット
- 新規登録IDの設定
セットアップ手順
前提条件
- Python 3.10以上
- 新しいRelicアカウントとAPIキー
- クロードデスクトップアプリケーション
インストール手順
1。 [uvパッケージマネージャをインストールします。
-
プロジェクトの作成とセットアップ
-
指定したコードでサーバーファイル[
newrelic_logs_server.py]を作成します。 -
環境変数の設定:
##Claudeデスクトップの統合
設定ファイルを編集することにより、Claudeデスクトップの設定:
- macOS: [
~/Library/Application Support/Claude/claude_desktop_config.json
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
New Relic MCP Server
A Model Context Protocol (MCP) server for querying New Relic logs using NRQL queries. This server enables Large Language Models (LLMs) like Claude to interact with your New Relic data.
Claude Code users: Also available as an installable plugin with slash commands, skills, and an investigation agent — no MCP server needed. Install with:
/plugin marketplace add Ivlad003/pluginsthen/plugin install newrelic-observability@ivlad-pluginsSee Ivlad003/plugins for details.
Features
- Query New Relic logs and metrics using NRQL
- Detailed error logging
- Easy integration with Claude Desktop
- Human-readable output formatting
- Configurable New Relic account ID
Setup Instructions
Prerequisites
- Python 3.10 or higher
- New Relic account and API key
- Claude Desktop application
Installation Steps
- Install
uvpackage manager:
# On macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- Create and setup project:
# Create directory
mkdir newrelic-mcp
cd newrelic-mcp
# Create virtual environment
uv venv
# Activate virtual environment
source .venv/bin/activate # On Unix/macOS
.venv\Scripts\activate # On Windows
# Install dependencies
uv pip install "mcp[cli]" httpx
-
Create server file
newrelic_logs_server.pywith the provided code. -
Configure your environment variables:
# On Unix/macOS
export NEW_RELIC_API_KEY="your-api-key-here"
export NEW_RELIC_ACCOUNT_ID="your-account-id-here"
# On Windows (CMD)
set NEW_RELIC_API_KEY=your-api-key-here
set NEW_RELIC_ACCOUNT_ID=your-account-id-here
# On Windows (PowerShell)
$env:NEW_RELIC_API_KEY = "your-api-key-here"
$env:NEW_RELIC_ACCOUNT_ID = "your-account-id-here"
Claude Desktop Integration
Configure Claude Desktop by editing your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"newrelic": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/newrelic-mcp",
"run",
"app.py"
],
"env": {
"NEW_RELIC_API_KEY": "your-api-key-here",
"NEW_RELIC_ACCOUNT_ID": "your-account-id-here"
}
}
}
}
Usage
Example NRQL Queries
- Basic Transaction Query:
SELECT * FROM Transaction SINCE 1 hour ago
- Error Analysis:
SELECT * FROM Transaction WHERE error IS TRUE SINCE 1 hour ago LIMIT 10
- Performance Analysis:
インストール
npx @modelcontextprotocol/inspector uv run newrelic_logs_server.py設定
{
"mcpServers": {
"newrelic": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/newrelic-mcp",
"run",
"app.py"
],
"env": {
"NEW_RELIC_API_KEY": "your-api-key-here",
"NEW_RELIC_ACCOUNT_ID": "your-account-id-here"
}
}
}
}