nagios-mcp
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
- Installing the PyPI package
# Using pip
pip install nagios-mcp # or pipx install nagios-mcp
# Using uv (Recommended)
uv tool install nagios-mcp
- Creating a config file
Create a
nagios_config.yamlornagios_config.jsonfile with the configuration parameters given below.
nagios_url: "http://localhost/nagios"
nagios_user: "your_nagios_core_username"
nagios_pass: "your_nagios_core_password"
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
- MacOS:
- 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
- Official setup guide
- For setting up the server in Windsurf, add the following lines to the
~/.codeium/windsurf/mcp_config.jsonfile.
{
"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 thecline_mcp_settings.jsonfile. 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.
- Tool Key:
Nagios - Name:
NagiosMCP - Command:
uvx nagios-mcp --config PATH_TO_THE_NAGIOS_CONFIG_FILE
List of Tools:
| Tool Name | Tool Description |
|---|---|
get_host_status |
Retrieves status for all hosts or a specific host. |
get_service_status |
Retrieves status for services using statusjson.cgi. |
get_alerts |
Retrieves current problematic host and service states (alerts). |
get_program_status |
Retrieves the Nagios Core program status from statusjson.cgi |
get_hosts_in_group_status |
Retrieves status for all hosts within a specific host group. |
get_services_in_group_status |
Retrieves status for all services within a specific service group. |
get_services_on_host_in_group_status |
Retrieves status for all the services with a specific host group. |
get_overall_health_summary |
Retrieves overall health summary for all the hosts and services. |
get_unhandled_problems |
Retrieves all the unhandled problems for all the hosts and services. |
get_object_list_config |
Retrieves configuration list for object types like "hosts", "services", "hostgroups", etc. |
get_single_object_config |
Retrieves configuration for a single specific object. |
get_host_dependencies |
Retrieves host dependencies for the given host. |
get_service_dependencies |
Retrieves service dependencies for the given host. |
get_contacts_for_object |
Retrieves the list of contacts to inform for an object. |
get_comments |
Retrieves comments based on the host and service. |
get_comment_by_id |
Retrieves comments for the given comment id. |
get_downtimes |
Retrieves the information for the downtimes in the Nagios Host Process. |
get_nagios_process_info |
Returns 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-binorsbinsub-directory in your Nagios main directory. - The Status Tools and Config Tools use the
cgi-bin/statusjson.cgiandcgi-bin/objectjson.cgifiles respectively for retrieving the information.
Metadata
Release files for nagios-mcp 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nagios_mcp-0.1.4.tar.gz | 19.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nagios_mcp-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.3 kB
Release files / nagios_mcp-0.1.4.tar.gz
| Download URL | nagios_mcp-0.1.4.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e167610d47406378b053c969aab258b3196e28823d74eae294553e0d5da4a6f9
|
|
BLAKE2b-256 checksum How to use checksums |
b290f6d10634014aa2a0996739e06ff7d5e886385fd638faa643d66d45b72479
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / nagios_mcp-0.1.4-py3-none-any.whl
| Download URL | nagios_mcp-0.1.4-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b382fa941fc6a4fa8f2d34017403721fcf273dae2c8b3d69c451d65a3a790d38
|
|
BLAKE2b-256 checksum How to use checksums |
cb876b052e36fdd093bfa7e4d0b2a64867ce8ade7ac14852f546c0a41f614190
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for nagios-mcp 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.