Zabbix

Provides programmable access to Zabbix data and management via a flexible MCP server with read/write operations, security, and multiple transports.
  • python

1

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mhajder-zabbix-mcp": {
      "command": "python",
      "args": [
        "run_server.py"
      ],
      "env": {
        "LOG_LEVEL": "INFO",
        "SENTRY_DSN": "https://your-key@...",
        "ZABBIX_URL": "https://zabbix.example.com/api_jsonrpc.php",
        "ZABBIX_USER": "Admin",
        "ZABBIX_TOKEN": "your-api-token",
        "DISABLED_TAGS": "host,user,maintenance",
        "MCP_HTTP_HOST": "0.0.0.0",
        "MCP_HTTP_PORT": "8000",
        "MCP_TRANSPORT": "stdio",
        "READ_ONLY_MODE": "false",
        "SENTRY_RELEASE": "1.2.3",
        "ZABBIX_TIMEOUT": ":30",
        "ZABBIX_PASSWORD": "zabbix",
        "ZABBIX_VERIFY_SSL": "true",
        "RATE_LIMIT_ENABLED": "false",
        "SENTRY_ENABLE_LOGS": "true",
        "SENTRY_ENVIRONMENT": "production",
        "MCP_HTTP_BEARER_TOKEN": "<MCP_HTTP_BEARER_TOKEN>",
        "RATE_LIMIT_MAX_REQUESTS": "60",
        "SENTRY_SEND_DEFAULT_PII": "true",
        "SENTRY_PROFILE_LIFECYCLE": "trace",
        "RATE_LIMIT_WINDOW_MINUTES": "1",
        "SENTRY_TRACES_SAMPLE_RATE": "1.0",
        "ZABBIX_SKIP_VERSION_CHECK": "false",
        "SENTRY_PROFILE_SESSION_SAMPLE_RATE": "1.0"
      }
    }
  }
}

You can connect to and manage Zabbix data using this MCP server, which exposes a programmable interface for querying and controlling Zabbix resources. It supports secure access, multiple transport options, and both read and write operations, making it ideal for automation, AI-assisted workflows, dashboards, and custom monitoring pipelines.

How to use

Choose your preferred transport method and connect to the MCP server with a client that understands the MCP protocol. You can run the server locally for development or deploy it with a remote transport in production. Once the server is running, you can query hosts, templates, items, triggers, events, users, maintenance periods, and more, or perform management actions such as creating or updating hosts, templates, users, or proxies.

Typical usage patterns include starting the server, selecting a transport (stdio for local usage, or HTTP-based transports for networked deployments), and then issuing requests to retrieve data or perform configuration changes. Enable read-only mode if you want to monitor without making writes, and use the optional authentication mechanisms to secure access.

How to install

Prerequisites: you need Python installed on your system (the server supports Python 3.11 to 3.14). You also need access to a Zabbix server (version 5.4+) and a valid Zabbix API token or user credentials.

Quick install from PyPI using UV (recommended) or pip. Start by installing the MCP server, then set up your environment variables for Zabbix connectivity.

# Using UV (recommended)
uvx zabbix-mcp

# Or using pip
pip install zabbix-mcp

Configuration and environment

Configure how the MCP server connects to Zabbix and how clients authenticate. The environment variable configuration below shows common options you will typically set before running the server.

# Zabbix connection details
ZABBIX_URL=https://zabbix.example.com/api_jsonrpc.php

# Authentication - either token or user/password
# Modern deployments should use API token
ZABBIX_TOKEN=your-api-token
# If using legacy authentication instead
# ZABBIX_USER=Admin
# ZABBIX_PASSWORD=zabbix

# SSL and timeouts
ZABBIX_VERIFY_SSL=true
ZABBIX_TIMEOUT=30
ZABBIX_SKIP_VERSION_CHECK=false

# Read-only mode (no write operations)
READ_ONLY_MODE=false

# Disabled tags for tooling control
DISABLED_TAGS=

# Logging and rate limiting
LOG_LEVEL=INFO
RATE_LIMIT_ENABLED=false
RATE_LIMIT_MAX_REQUESTS=60
RATE_LIMIT_WINDOW_MINUTES=1

# Optional Sentry integration
# SENTRY_DSN=https://your-key@o12345.ingest.us.sentry.io/6789
# Other Sentry settings omitted for brevity

# MCP transport configuration
MCP_TRANSPORT=stdio
MCP_HTTP_HOST=0.0.0.0
MCP_HTTP_PORT=8000
MCP_HTTP_BEARER_TOKEN=

Security and transport options

The server provides multiple transport methods. For local usage, the standard input/output transport is simple to run. For networked deployments, you can enable Server-Sent Events (SSE) over HTTP or use a HTTP streamable transport.

You can enable optional authentication for HTTP transports by using a bearer token. When using a token, clients must present the token in the Authorization header.

# SSE transport with HTTP host/port
MCP_TRANSPORT=sse
MCP_HTTP_HOST=0.0.0.0
MCP_HTTP_PORT=8000
MCP_HTTP_BEARER_TOKEN=your-secret-token
# Example client request (bearer token required)
curl -H "Authorization: Bearer your-secret-token" http://localhost:8000/sse

Sentry integration (optional)

If you want advanced error tracking and performance monitoring, you can enable Sentry integration. This is optional and only activates when you provide a SENTRY_DSN and related settings.

# Enable by providing a DSN in your environment
SENTRY_DSN=https://your-key@o12345.ingest.us.sentry.io/6789
SENTRY_TRACES_SAMPLE_RATE=1.0
SENTRY_SEND_DEFAULT_PII=true

Available tools and endpoints

The MCP server exposes a rich set of operations to read data and manage Zabbix resources. You can list, create, update, or delete hosts, host groups, templates, items, triggers, users, proxies, maintenance periods, and more. You can also retrieve historical data, performance metrics, and SLA information, and you can execute scripts on monitored hosts.

Notes and troubleshooting

If you encounter connection issues, verify that the server process is running with the configured transport and that the Zabbix URL and token (or credentials) are correct. Check logs for errors, and ensure network access between clients and the MCP server when using HTTP or SSE transports.

Configuration references

Environment variables that appear in the configuration cover connection details, security, logging, rate limiting, Sentry, and transport options. They should be set in a local environment file or in your deployment environment before starting the MCP server.

Development setup

If you are contributing to the MCP server, you can set up a development environment to run tests and linting, similar to the process described in the source.

# Clone and install development dependencies
git clone https://github.com/mhajder/zabbix-mcp.git
cd zabbix-mcp
uv sync --group dev

# Run tests
uv run pytest

# Run with coverage
uv run pytest --cov=src/

# Linting and formatting
uv run ruff check .
uv run ruff format .

# Pre-commit hooks
uv run pre-commit install

Troubleshooting quick tips

  • Ensure the Zabbix URL and authentication are correct before starting the server. - Confirm the MCP transport is set to the desired method (stdio, sse, or http). - If you enable read-only mode, verify that no write operations are attempted by clients.

Licensing

This project is licensed under the MIT License.

Available tools

api_version

Retrieve information about the MCP API version and capabilities.

host_get

List and filter hosts by groups, templates, proxies, and search criteria.

host_create

Create a new host with required interfaces and template links.

host_update

Update host properties such as name, status, and description.

host_delete

Delete hosts by their identifier.

hostgroup_get

List host groups with optional filtering.

hostgroup_create

Create a new host group.

hostgroup_update

Update host group properties, such as name.

hostgroup_delete

Delete host groups.

template_get

List templates with optional filtering.

template_create

Create a new template.

template_update

Update template properties such as name and description.

template_delete

Delete templates.

item_get

List items with filtering by hosts, groups, or templates.

item_create

Create a new item on a host.

item_update

Update item properties such as name, delay, and units.

item_delete

Delete items.

trigger_get

List triggers with severity and state filtering.

trigger_create

Create a new trigger with an expression.

trigger_update

Update trigger properties such as description and expression.

trigger_delete

Delete triggers.

problem_get

Get current problems filtered by severity and time.

event_get

Get events with time range filtering.

event_acknowledge

Acknowledge events with an optional message.

history_get

Get historical data for items.

trend_get

Get trend data for items.

user_get

List users with optional filtering.

user_create

Create a new user.

user_update

Update user properties (name, surname, password, type).

user_delete

Delete users.

proxy_get

List proxies with optional filtering.

proxy_create

Create a new proxy.

proxy_update

Update proxy properties (name, operating mode, description).

proxy_delete

Delete proxies.

maintenance_get

List maintenance periods.

maintenance_create

Create a new maintenance period.

maintenance_update

Update maintenance period properties (name, times, description).

maintenance_delete

Delete maintenance periods.

action_get

List actions such as triggers and autoregistration.

mediatype_get

List available media types.

graph_get

List graphs with optional filtering.

discoveryrule_get

List LLD discovery rules.

drule_get

List network discovery rules.

itemprototype_get

Get item prototypes from discovery rules.

sla_get

List SLAs.

service_get

List services.

script_get

List and manage scripts.

script_execute

Execute a script on a host.

usermacro_get

List host and global user macros.

usermacro_create

Create a host macro.

usermacro_delete

Delete host macros.

configuration_export

Export Zabbix configurations to JSON or XML.

configuration_import

Import Zabbix configurations from JSON or XML.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational