Nightingale MCP Serverのロゴ

Nightingale MCP Server

組織
n9e

Nightingale's official MCP Server

公開者n9e
リポジトリn9e-mcp-server
言語Go
フォーク
13
スター
41
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    Nightingale MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには41件のスターと13件のフォークがあります。

Nightingale MCP Server

English | 中文

Go License MCP

An MCP (Model Context Protocol) server for Nightingale monitoring system. This server enables AI assistants to interact with Nightingale APIs for alert management, monitoring, and observability tasks through natural language.

Compatibility

  • Nightingale: v8.0.0+

Key Use Cases

  • Alert Management: Query active and historical alerts, view alert rules and subscriptions
  • Target Monitoring: Browse and search monitored hosts/targets, analyze target status
  • Incident Response: Create and manage alert mutes, notification rules, and event pipelines
  • Team Collaboration: Query users, teams, and business groups

Quick Start

1. Get an API Token

  1. Make sure HTTP.TokenAuth is enabled in config.toml:
toml
  [HTTP.TokenAuth]
  Enable = true
  1. Log in to your Nightingale web interface
  2. Navigate to Personal Settings > Profile > Token Management
  3. Create a new token with appropriate permissions

image-20260205172354525

Security Note: Store your API token securely. Never commit tokens to version control. Use environment variables or secure secret management.

2. Configure MCP Client

Cursor (stdio mode, default)

Add to your ~/.cursor/mcp.json:

json
{
  "mcpServers": {
    "nightingale": {
      "command": "npx",
      "args": ["-y", "@n9e/n9e-mcp-server", "stdio"],
      "env": {
        "N9E_TOKEN": "your-api-token",
        "N9E_BASE_URL": "http://your-n9e-server:17000"
      }
    }
  }
}

HTTP mode (optional)

To run the server over HTTP (MCP streamable transport, JSON only, no SSE), start the server with the http subcommand.

Shared vs non-shared (HTTP only):

  • --shared=false (default): Token and base URL may be omitted at startup. Each client can provide X-User-Token and X-N9e-Base-Url in mcp.json so everyone uses their own Nightingale identity or instance. If you do set N9E_TOKEN and N9E_BASE_URL at startup, they act as defaults and clients can still override via headers.
  • --shared=true: Startup must set N9E_TOKEN and N9E_BASE_URL. The server uses only this config; client headers X-User-Token and X-N9e-Base-Url are ignored. Use this when the MCP server is a shared org service and users must not override credentials.
bash
# Non-shared: users supply token/URL in mcp.json (or you set defaults at startup)
n9e-mcp-server http --listen :8080

# Shared: one token/URL for all; require at startup, ignore client headers
N9E_TOKEN=xxx N9E_BASE_URL=https://n9e.example.com n9e-mcp-server http --listen :8080 --shared

Cursor: connect to HTTP server

If the server is already running in HTTP mode (e.g. on http://localhost:8080), add a URL-based entry to ~/.cursor/mcp.json (no command/args; Cursor will use the streamable HTTP transport).

Token: You can use either source; you do not need to pass token in mcp.json if the server was started with N9E_TOKEN.

  1. Server startup only – Set N9E_TOKEN when starting the server (e.g. N9E_TOKEN=xxx ./n9e-mcp-server http). All clients will use this token; no headers needed in Cursor.
  2. Client headers (optional) – The client can send:
    • X-User-Token: use this token for N9e API calls instead of the startup token.
    • X-N9e-Base-Url: use this URL as the Nightingale API base (e.g. https://n9e.other-env.com) instead of the server's N9E_BASE_URL. So each user can point to a different Nightingale instance or use their own token (or both).

Example when the server was started with N9E_TOKEN (no header needed in Cursor):

json
{
  "mcpServers": {
    "nightingale": {
      "url": "http://localhost:8080"
    }
  }
}

Example when passing token and/or base URL from Cursor (e.g. shared server, or different Nightingale instance):

json
{
  "mcpServers": {
    "nightingale": {
      "url": "http://localhost:8080",
      "headers": {
        "X-User-Token": "your-nightingale-api-token",
        "X-N9e-Base-Url": "http://your-n9e-server:17000"
      }
    }
  }
}

You can omit either header: only X-User-Token, or only X-N9e-Base-Url, or both. The server falls back to startup N9E_TOKEN and N9E_BASE_URL when a header is not set. If the server was started with --shared, these headers are ignored and you must not rely on them.

If your HTTP server is behind a gateway that requires its own auth, add those headers as well (e.g. Authorization: Bearer your-gateway-token). The server uses the X-User-Token header only for calling the Nightingale API.

Docker

The official code uses the stdio protocol by default for inter-process communication. If you need to integrate with web-based LLM orchestration platforms like Dify or FastGPT that only support network calls (HTTP/SSE), we recommend using the provided Docker Compose solution. This deployment automatically introduces the mcp-proxy bridge to enable network protocol support.

Deployment Steps:

  1. Clone this repository:

    bash
    git clone https://github.com/n9e/n9e-mcp-server.git
    cd n9e-mcp-server/docker
  2. Modify the configuration in docker-compose.yml:

    • MCP_VERSION: (Optional) Used by the default Dockerfile to install @n9e/n9e-mcp-server from NPM during image build. Set this explicitly to latest or to a concrete version such as 0.1.1. Do not leave it blank.
    • N9E_BASE_URL: Replace with your actual Nightingale API URL.
    • N9E_TOKEN: Replace with your generated API Token.
  3. Start the service:

    bash
    # By default, it will install the specified version via NPM and start
    docker compose up -d --build
  4. Configure the MCP plugin in Dify:

    • Connection Type: Streamable HTTP (SSE)
    • URL: http://<Your-Server-IP>:8082/sse

Developer Note: If you have modified the source code and wish to build a local test image, change the dockerfile field in docker-compose.yml to docker/Dockerfile.source. This will copy the repository source into the image, build the Go server locally, and still start the server through the mcp-proxy bridge.

3. Restart Cursor or Other Client Processes to Use

Available Tools

Tools split into two tiers:

  • read — always available
  • write — registered unless --read-only is set (covers create/update/import/clone/toggle)

The full default toolset list is alerts, targets, datasource, mutes, busi_groups, notify_rules, alert_subscribes, event_pipelines, users, metrics, logs, dashboards, roles. Restrict via N9E_TOOLSETS.

alerts

ToolTierDescription
list_active_alerts / get_active_alertreadActive firing alerts
list_history_alerts / get_history_alertreadHistorical alerts
list_alert_rules / get_alert_rulereadAlert rule listing
create_alert_rule / update_alert_rulewriteCRUD on a single rule
import_alert_rules / import_prom_ruleswriteBulk import (n9e JSON or Prometheus YAML)
clone_alert_rules_to_bgswriteCopy rules into target business groups
toggle_alert_ruleswriteEnable/disable a batch (uses PUT .../fields)

dashboards

ToolTierDescription
list_dashboards / get_dashboard / get_dashboard_purereadList + metadata + full panel JSON
create_dashboard / update_dashboard_meta / update_dashboard_panelswriteCRUD splits meta vs panels
set_dashboard_public / clone_dashboardwriteVisibility + clone

notify_rules

ToolTierDescription
list_notify_rules / get_notify_rulereadNotification rules
list_notify_channels / get_notify_channel / list_notify_templatesreadChannel + template listing
create_notify_rules / update_notify_rule / test_notify_rulewriteRule CRUD + dry-run test
create_notify_channel / update_notify_channelwriteChannel CRUD
create_notify_template / update_notify_template / update_notify_template_contentwriteTemplate CRUD

datasource

ToolTierDescription
list_datasources / list_datasources_full / get_datasource / list_datasource_pluginsreadBrief + full configs + supported plugins
upsert_datasourcewriteCreate or update; n9e validates connectivity inside upsert
set_datasource_statuswriteEnable/disable batch

users

ToolTierDescription
list_users / get_user / list_user_groups / get_user_groupread
create_user / update_user_profile / reset_user_passwordwriteProfile.roles assigns RBAC roles (no separate endpoint)
create_user_group / update_user_group / add_user_group_memberswriteTeam management

roles (RBAC)

ToolTierDescription
list_roles / list_operations / list_role_operationsread
create_role / update_role / bind_role_operationswritebind_role_operations replaces (not deltas)

metrics (PromQL queries)

ToolTierDescription
query_instantreadPromQL instant query via /api/n9e/query-instant-batch
query_rangereadPromQL range query via /api/n9e/query-range-batch; auto-adjusts step so result ≤ max_points (default 1000); flags truncated:true when downsampled

logs

ToolTierDescription
query_logsreadPlugin-dispatched /logs-query (Loki/ES/OS); default limit=200; rejects time ranges > 7 days
list_log_indices / list_log_fieldsreadES (default) or OpenSearch (engine=os)

mutes / alert_subscribes / event_pipelines / targets / busi_groups

These keep their existing tools (see prior versions). mutes adds no new tools in this revision.

Example Prompts

Once configured, you can interact with Nightingale using natural language:

  • "Show me all critical alerts from the last 24 hours"
  • "What alerts are currently firing?"
  • "List all monitored targets that have been down for more than 5 minutes"
  • "What alert rules are configured in business group 1?"
  • "Create a mute rule for service=api alerts for the next 2 hours due to maintenance"
  • "Show me the event pipeline execution history"
  • "Who are the members of the ops team?"

Configuration

Modes

  • stdio (default): MCP over stdin/stdout. Use with Cursor and other clients that spawn the server process.
  • http: MCP over HTTP using the streamable transport (JSON request/response only, no SSE). Use n9e-mcp-server http and connect with a client that supports streamable HTTP (e.g. StreamableClientTransport).

Environment Variables

VariableFlagDescriptionDefault
N9E_TOKEN--tokenNightingale API token (required)-
N9E_BASE_URL--base-urlNightingale API base URLhttp://localhost:17000
N9E_READ_ONLY--read-onlyDisable write operations (only read tools registered)false
N9E_TOOLSETS--toolsetsEnabled toolsets (comma-separated)all
N9E_LISTEN--listenHTTP mode: listen address:8080
N9E_SESSION_TIMEOUT--session-timeoutHTTP mode: idle session timeout (0 = no timeout)0

Toolsets

By default, all toolsets are enabled. You can use the --toolsets flag or N9E_TOOLSETS environment variable to enable only the toolsets you need, reducing the number of tools exposed to the AI assistant and saving context window tokens.

Available toolsets: alerts, targets, datasource, mutes, busi_groups, notify_rules, alert_subscribes, event_pipelines, users, metrics, logs, dashboards, roles

For example, to enable only alert and target related tools:

json
{
  "mcpServers": {
    "nightingale": {
      "command": "npx",
      "args": ["-y", "@n9e/n9e-mcp-server", "stdio"],
      "env": {
        "N9E_TOKEN": "your-api-token",
        "N9E_BASE_URL": "http://your-n9e-server:17000",
        "N9E_TOOLSETS": "alerts,targets"
      }
    }
  }
}

License

Apache License 2.0

Related Projects

インストール

TypingMind
{
  "mcpServers": {
    "n9e-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@n9e/n9e-mcp-server",
        "stdio"
      ],
      "env": {
        "N9E_TOKEN": "<N9E_TOKEN>",
        "N9E_BASE_URL": "<N9E_BASE_URL>"
      }
    }
  }
}

Nightingale MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Nightingale MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Nightingale MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Nightingale MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "n9e-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@n9e/n9e-mcp-server"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてNightingale MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Nightingale MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Nightingale MCP Serverを使ってこのタスクを手伝ってもらえますか?
Nightingale MCP Server
はい、読みました。
Nightingale MCP Serverで調べた結果をお伝えします。

よくある質問

Nightingale MCP Server MCPサーバーは何に使いますか?

Nightingale MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでNightingale MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでNightingale MCP Serverを利用できます。

TypingMindでNightingale MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Nightingale MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Nightingale MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Nightingale MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでNightingale MCP Server MCPのどのようなツールを利用できますか?

Nightingale MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Nightingale MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Nightingale MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇