mcpField
N
Nagios MCP

Nagios MCP

Remote
github.com/PROSPIRE-TECHNOLOGY-SERVICESCloud & Infra5Updated 60w ago
Repository

About Nagios MCP

Nagios MCP is an MCP server for Nagios Core web clients. It retrieves host, service, alert, process, and configuration information through Nagios CGI binaries.

Key features

  1. 01Retrieve host and service status
  2. 02Inspect alerts and unhandled problems
  3. 03Check health summaries and program status
  4. 04Read object lists and configuration
  5. 05Review dependencies, contacts, comments, and downtimes

Use cases

  1. 01Check the status of monitored hosts
  2. 02Review service alerts and unresolved problems
  3. 03Inspect Nagios object configuration
  4. 04Examine dependencies and scheduled downtimes

MCP support

Exposes Nagios Core status and configuration lookups as tools for MCP clients, using `statusjson.cgi` and `objectjson.cgi`. It supports STDIO by default and can run with SSE transport.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttp://localhost:8000/sse
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Packages
pypinagios-mcp

Tools

Details

From the project README

nagios-mcp

MCP Server PyPI - Version Python Version from PEP 621 TOML

MCP Server for Nagios Core.

This server is built by us for the Nagios Core web-client. The code for the server can be found here. The server utilizes the CGI binaries located at the cgi-bin or sbin folder in your Nagios folder. More specifically the statusjson.cgi and objectjson.cgi files for the purpose of the status and configuration tooling.

How to install:

Setting up
  1. Installing the PyPI package
# Using pip
pip install nagios-mcp # or pipx install nagios-mcp

# Using uv (Recommended)
uv tool install nagios-mcp
  1. Creating a config file Create a nagios_config.yaml or nagios_config.json file with the configuration parameters given below.
nagios_url: "http://localhost/nagios"
nagios_user: "your_nagios_core_username"
nagios_pass: "your_nagios_core_password"
ca_cert_path: "path_to_your_ssl_cert" # if the url is https, otherwise leave it empty ("")
Starting the SSE server
  • The mcp server by default runs on STDIO transport. If you do not require SSE transport, you can skip this section.
  • Command: uvx nagios-mcp --config NAGIOS_CONFIG_FILE --transport sse --host localhost --port 8000
For Claude Desktop
  • Official setup guide
  • For setting up in Claude Desktop, go to Settings -> Developer -> Edit Config. Or directly modify the config file,
    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Add the following block to the config file,
{
  "mcpServers": {
    "nagios": {
      "command": "uvx",
      "args": [
        "nagios-mcp",
        "--config",
        "PATH_TO_THE_NAGIOS_CONFIG_FILE",
      ],
    },
  },
}
  • For SSE transport:
{
    "mcpServers": {
        "nagios": {
            "url": "http://localhost:8000/sse" # change this if you are using different port
        }
    }
}
For Cursor
  • Official setup guide
  • To setup the server in Cursor, go to Setting -> MCP -> Add new global MCP server, and add the following: For STDIO transport:
{
  "mcpServers": {
    "nagios": {
        "command": "uvx",
        "args": [
                "nagios-mcp",
                "--config", "PATH_TO_THE_NAGIOS_CONFIG_FILE"
            ],
        }
    }
}
  • For SSE Transport:
{
    "mcpServers": {
        "nagios": {
            "url": "http://localhost:8000/sse" # change this if you are using different port
        }
    }
}
For Windsurf
{
    "mcpServers": {
        "nagios": {
            "command": "uvx",
            "args": [
                "nagios-mcp",
                "--config", "PATH_TO_THE_NAGIOS_CONFIG_FILE"
            ],
        }
    }
}
  • For SSE Transport:
{
    "mcpServers": {
        "nagios": {
            "serverUrl": "http://localhost:8000/sse" # change this if you are using different port
        }
    }
}
For Cline
  • Official setup guide
  • For setting up the server in Cline, go to MCP Servers -> Installed -> Configure MCP Servers, this will open the cline_mcp_settings.json file. Add the following code block to the file.
{
    "mcpServers": {
        "nagios": {
            "command": "uvx",
            "args": [
                "nagios-mcp",
                "--config", "PATH_TO_THE_NAGIOS_CONFIG_FILE"
            ],
        }
    }
}
  • For SSE Transport:
{
    "mcpServers": {
        "nagios": {
            "url": "http://localhost:8000/sse" # change this if you are using different port
        }
    }
}
For 5ire

5ire is another MCP client. For setting up in 5ire, go to Tools -> New and add the following configuration.

  1. Tool Key: Nagios
  2. Name: NagiosMCP
  3. Command: uvx nagios-mcp --config PATH_TO_THE_NAGIOS_CONFIG_FILE
List of Tools:
Tool NameTool Description
get_host_statusRetrieves status for all hosts or a specific host.
get_service_statusRetrieves status for services using statusjson.cgi.
get_alertsRetrieves current problematic host and service states (alerts).
get_program_statusRetrieves the Nagios Core program status from statusjson.cgi
get_hosts_in_group_statusRetrieves status for all hosts within a specific host group.
get_services_in_group_statusRetrieves status for all services within a specific service group.
get_services_on_host_in_group_statusRetrieves status for all the services with a specific host group.
get_overall_health_summaryRetrieves overall health summary for all the hosts and services.
get_unhandled_problemsRetrieves all the unhandled problems for all the hosts and services.
get_object_list_configRetrieves configuration list for object types like "hosts", "services", "hostgroups", etc.
get_single_object_configRetrieves configuration for a single specific object.
get_host_dependenciesRetrieves host dependencies for the given host.
get_service_dependenciesRetrieves service dependencies for the given host.
get_contacts_for_objectRetrieves the list of contacts to inform for an object.
get_commentsRetrieves comments based on the host and service.
get_comment_by_idRetrieves comments for the given comment id.
get_downtimesRetrieves the information for the downtimes in the Nagios Host Process.
get_nagios_process_infoReturns the information for the Nagios process. (Alias for get_program_status function)
  • Currently all the tools use GET requests. Other useful tools and tools requiring POST requests will be added soon.

How the MCP server works?

  • Nagios Core web-client is typically hosted on http://YOUR_HOST/nagios/
  • The MCP server reads the details about the processes and services using the CGI binaries, they can be found in the cgi-bin or sbin sub-directory in your Nagios main directory.
  • The Status Tools and Config Tools use the cgi-bin/statusjson.cgi and cgi-bin/objectjson.cgi files respectively for retrieving the information.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.