
zabbix-mcp-server
๐ Complete MCP server for Zabbix integration - Connect AI assistants to Zabbix monitoring with 40+ tools for hosts, items, triggers, templates, problems, and more. Features read-only mode and comprehensive API coverage.
Tools
host_get
Get hosts from Zabbix with optional filtering. Args: hostids: List of host IDs to retrieve groupids: List of host group IDs to filter by templateids: List of template IDs to filter by output: Output format (extend, shorten, or specific fields) search: Search criteria filter: Filter criteria limit: Maximum number of results Returns: str: JSON formatted list of hosts
host_create
Create a new host in Zabbix. Args: host: Host name groups: List of host groups (format: [{"groupid": "1"}]) interfaces: List of host interfaces templates: List of templates to link (format: [{"templateid": "1"}]) inventory_mode: Inventory mode (-1=disabled, 0=manual, 1=automatic) status: Host status (0=enabled, 1=disabled) Returns: str: JSON formatted creation result
host_update
Update an existing host in Zabbix. Args: hostid: Host ID to update host: New host name name: New visible name status: New status (0=enabled, 1=disabled) Returns: str: JSON formatted update result
host_delete
Delete hosts from Zabbix. Args: hostids: List of host IDs to delete Returns: str: JSON formatted deletion result
hostgroup_get
Get host groups from Zabbix. Args: groupids: List of group IDs to retrieve output: Output format search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of host groups
hostgroup_create
Create a new host group in Zabbix. Args: name: Host group name Returns: str: JSON formatted creation result
hostgroup_update
Update an existing host group in Zabbix. Args: groupid: Group ID to update name: New group name Returns: str: JSON formatted update result
hostgroup_delete
Delete host groups from Zabbix. Args: groupids: List of group IDs to delete Returns: str: JSON formatted deletion result
item_get
Get items from Zabbix with optional filtering. Args: itemids: List of item IDs to retrieve hostids: List of host IDs to filter by groupids: List of host group IDs to filter by templateids: List of template IDs to filter by output: Output format search: Search criteria filter: Filter criteria limit: Maximum number of results Returns: str: JSON formatted list of items
item_create
Create a new item in Zabbix. Args: name: Item name key_: Item key hostid: Host ID type: Item type (0=Zabbix agent, 2=Zabbix trapper, etc.) value_type: Value type (0=float, 1=character, 3=unsigned int, 4=text) delay: Update interval units: Value units description: Item description Returns: str: JSON formatted creation result
item_update
Update an existing item in Zabbix. Args: itemid: Item ID to update name: New item name key_: New item key delay: New update interval status: New status (0=enabled, 1=disabled) Returns: str: JSON formatted update result
item_delete
Delete items from Zabbix. Args: itemids: List of item IDs to delete Returns: str: JSON formatted deletion result
trigger_get
Get triggers from Zabbix with optional filtering. Args: triggerids: List of trigger IDs to retrieve hostids: List of host IDs to filter by groupids: List of host group IDs to filter by templateids: List of template IDs to filter by output: Output format search: Search criteria filter: Filter criteria limit: Maximum number of results Returns: str: JSON formatted list of triggers
trigger_create
Create a new trigger in Zabbix. Args: description: Trigger description expression: Trigger expression priority: Severity (0=not classified, 1=info, 2=warning, 3=average, 4=high, 5=disaster) status: Status (0=enabled, 1=disabled) comments: Additional comments Returns: str: JSON formatted creation result
trigger_update
Update an existing trigger in Zabbix. Args: triggerid: Trigger ID to update description: New trigger description expression: New trigger expression priority: New severity level status: New status (0=enabled, 1=disabled) Returns: str: JSON formatted update result
trigger_delete
Delete triggers from Zabbix. Args: triggerids: List of trigger IDs to delete Returns: str: JSON formatted deletion result
template_get
Get templates from Zabbix with optional filtering. Args: templateids: List of template IDs to retrieve groupids: List of host group IDs to filter by hostids: List of host IDs to filter by output: Output format search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of templates
template_create
Create a new template in Zabbix. Args: host: Template technical name groups: List of host groups (format: [{"groupid": "1"}]) name: Template visible name description: Template description Returns: str: JSON formatted creation result
template_update
Update an existing template in Zabbix. Args: templateid: Template ID to update host: New template technical name name: New template visible name description: New template description Returns: str: JSON formatted update result
template_delete
Delete templates from Zabbix. Args: templateids: List of template IDs to delete Returns: str: JSON formatted deletion result
problem_get
Get problems from Zabbix with optional filtering. Args: eventids: List of event IDs to retrieve groupids: List of host group IDs to filter by hostids: List of host IDs to filter by objectids: List of object IDs to filter by output: Output format time_from: Start time (Unix timestamp) time_till: End time (Unix timestamp) recent: Only recent problems severities: List of severity levels to filter by limit: Maximum number of results Returns: str: JSON formatted list of problems
event_get
Get events from Zabbix with optional filtering. Args: eventids: List of event IDs to retrieve groupids: List of host group IDs to filter by hostids: List of host IDs to filter by objectids: List of object IDs to filter by output: Output format time_from: Start time (Unix timestamp) time_till: End time (Unix timestamp) limit: Maximum number of results Returns: str: JSON formatted list of events
event_acknowledge
Acknowledge events in Zabbix. Args: eventids: List of event IDs to acknowledge action: Acknowledge action (1=acknowledge, 2=close, etc.) message: Acknowledge message Returns: str: JSON formatted acknowledgment result
history_get
Get history data from Zabbix. Args: itemids: List of item IDs to get history for history: History type (0=float, 1=character, 2=log, 3=unsigned, 4=text) time_from: Start time (Unix timestamp) time_till: End time (Unix timestamp) limit: Maximum number of results sortfield: Field to sort by sortorder: Sort order (ASC or DESC) Returns: str: JSON formatted history data
trend_get
Get trend data from Zabbix. Args: itemids: List of item IDs to get trends for time_from: Start time (Unix timestamp) time_till: End time (Unix timestamp) limit: Maximum number of results Returns: str: JSON formatted trend data
user_get
Get users from Zabbix with optional filtering. Args: userids: List of user IDs to retrieve output: Output format search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of users
user_create
Create a new user in Zabbix. Args: username: Username passwd: Password usrgrps: List of user groups (format: [{"usrgrpid": "1"}]) name: First name surname: Last name email: Email address Returns: str: JSON formatted creation result
user_update
Update an existing user in Zabbix. Args: userid: User ID to update username: New username name: New first name surname: New last name email: New email address Returns: str: JSON formatted update result
user_delete
Delete users from Zabbix. Args: userids: List of user IDs to delete Returns: str: JSON formatted deletion result
maintenance_get
Get maintenance periods from Zabbix. Args: maintenanceids: List of maintenance IDs to retrieve groupids: List of host group IDs to filter by hostids: List of host IDs to filter by output: Output format Returns: str: JSON formatted list of maintenance periods
maintenance_create
Create a new maintenance period in Zabbix. Args: name: Maintenance name active_since: Start time (Unix timestamp) active_till: End time (Unix timestamp) groupids: List of host group IDs hostids: List of host IDs timeperiods: List of time periods description: Maintenance description Returns: str: JSON formatted creation result
maintenance_update
Update an existing maintenance period in Zabbix. Args: maintenanceid: Maintenance ID to update name: New maintenance name active_since: New start time (Unix timestamp) active_till: New end time (Unix timestamp) description: New maintenance description Returns: str: JSON formatted update result
maintenance_delete
Delete maintenance periods from Zabbix. Args: maintenanceids: List of maintenance IDs to delete Returns: str: JSON formatted deletion result
graph_get
Get graphs from Zabbix with optional filtering. Args: graphids: List of graph IDs to retrieve hostids: List of host IDs to filter by templateids: List of template IDs to filter by output: Output format search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of graphs
discoveryrule_get
Get discovery rules from Zabbix with optional filtering. Args: itemids: List of discovery rule IDs to retrieve hostids: List of host IDs to filter by templateids: List of template IDs to filter by output: Output format search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of discovery rules
itemprototype_get
Get item prototypes from Zabbix with optional filtering. Args: itemids: List of item prototype IDs to retrieve discoveryids: List of discovery rule IDs to filter by hostids: List of host IDs to filter by output: Output format search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of item prototypes
configuration_export
Export configuration from Zabbix. Args: format: Export format (json, xml) options: Export options Returns: str: JSON formatted export result
configuration_import
Import configuration to Zabbix. Args: format: Import format (json, xml) source: Configuration data to import rules: Import rules Returns: str: JSON formatted import result
usermacro_get
Get global macros from Zabbix with optional filtering. Args: globalmacroids: List of global macro IDs to retrieve hostids: List of host IDs to filter by (for host macros) output: Output format (extend, shorten, or specific fields) search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of global macros
apiinfo_version
Get Zabbix API version information. Returns: str: JSON formatted API version info
README
Zabbix MCP Server
A comprehensive Model Context Protocol (MCP) server for Zabbix integration using FastMCP and python-zabbix-utils. This server provides complete access to Zabbix API functionality through MCP-compatible tools.
<a href="https://glama.ai/mcp/servers/@mpeirone/zabbix-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@mpeirone/zabbix-mcp-server/badge" alt="zabbix-mcp-server MCP server" /> </a>
Features
๐ Host Management
host_get
- Retrieve hosts with advanced filteringhost_create
- Create new hosts with interfaces and templateshost_update
- Update existing host configurationshost_delete
- Remove hosts from monitoring
๐ฅ Host Group Management
hostgroup_get
- Retrieve host groupshostgroup_create
- Create new host groupshostgroup_update
- Modify existing host groupshostgroup_delete
- Remove host groups
๐ Item Management
item_get
- Retrieve monitoring items with filteringitem_create
- Create new monitoring itemsitem_update
- Update existing itemsitem_delete
- Remove monitoring items
โ ๏ธ Trigger Management
trigger_get
- Retrieve triggers and alertstrigger_create
- Create new triggerstrigger_update
- Modify existing triggerstrigger_delete
- Remove triggers
๐ Template Management
template_get
- Retrieve monitoring templatestemplate_create
- Create new templatestemplate_update
- Update existing templatestemplate_delete
- Remove templates
๐จ Problem & Event Management
problem_get
- Retrieve current problems and issuesevent_get
- Get historical eventsevent_acknowledge
- Acknowledge events and problems
๐ Data Retrieval
history_get
- Access historical monitoring datatrend_get
- Retrieve trend data and statistics
๐ค User Management
user_get
- Retrieve user accountsuser_create
- Create new usersuser_update
- Update user informationuser_delete
- Remove user accounts
๐ง Maintenance Management
maintenance_get
- Retrieve maintenance periodsmaintenance_create
- Schedule maintenance windowsmaintenance_update
- Modify maintenance periodsmaintenance_delete
- Remove maintenance schedules
๐ Additional Features
graph_get
- Retrieve graph configurationsdiscoveryrule_get
- Get discovery rulesitemprototype_get
- Retrieve item prototypesconfiguration_export
- Export Zabbix configurationsconfiguration_import
- Import configurationsapiinfo_version
- Get API version information
Installation
Prerequisites
- Python 3.10 or higher
- uv package manager
- Access to a Zabbix server with API enabled
Quick Start
-
Clone the repository:
git clone https://github.com/mpeirone/zabbix-mcp-server.git cd zabbix-mcp-server
-
Install dependencies:
uv sync
-
Configure environment variables:
cp config/.env.example .env # Edit .env with your Zabbix server details
-
Test the installation:
uv run python scripts/test_server.py
Configuration
Required Environment Variables
ZABBIX_URL
- Your Zabbix server API endpoint (e.g.,https://zabbix.example.com
)
Authentication (choose one method)
Method 1: API Token (Recommended)
ZABBIX_TOKEN
- Your Zabbix API token
Method 2: Username/Password
ZABBIX_USER
- Your Zabbix usernameZABBIX_PASSWORD
- Your Zabbix password
Optional Configuration
READ_ONLY
- Set totrue
,1
, oryes
to enable read-only mode (only GET operations allowed)
Usage
Running the Server
With startup script (recommended):
uv run python scripts/start_server.py
Direct execution:
uv run python src/zabbix_mcp_server.py
Testing
Run test suite:
uv run python scripts/test_server.py
Read-Only Mode
When READ_ONLY=true
, the server will only expose GET operations (retrieve data) and block all create, update, and delete operations. This is useful for:
- ๐ Monitoring dashboards
- ๐ Read-only integrations
- ๐ Security-conscious environments
- ๐ก๏ธ Preventing accidental modifications
Example Tool Calls
Get all hosts:
host_get()
Get hosts in specific group:
host_get(groupids=["1"])
Create a new host:
host_create(
host="server-01",
groups=[{"groupid": "1"}],
interfaces=[{
"type": 1,
"main": 1,
"useip": 1,
"ip": "192.168.1.100",
"dns": "",
"port": "10050"
}]
)
Get recent problems:
problem_get(recent=True, limit=10)
Get history data:
history_get(
itemids=["12345"],
time_from=1640995200,
limit=100
)
MCP Integration
This server is designed to work with MCP-compatible clients like Claude Desktop. See MCP_SETUP.md for detailed integration instructions.
Docker Support
Using Docker Compose
-
Configure environment:
cp config/.env.example .env # Edit .env with your settings
-
Run with Docker Compose:
docker compose up -d
Building Docker Image
docker build -t zabbix-mcp-server .
Development
Project Structure
zabbix-mcp-server/
โโโ src/
โ โโโ zabbix_mcp_server.py # Main server implementation
โโโ scripts/
โ โโโ start_server.py # Startup script with validation
โ โโโ test_server.py # Test script
โโโ config/
โ โโโ .env.example # Environment configuration template
โ โโโ mcp.json # MCP client configuration example
โโโ pyproject.toml # Python project configuration
โโโ requirements.txt # Dependencies
โโโ Dockerfile # Docker configuration
โโโ docker-compose.yml # Docker Compose setup
โโโ README.md # This file
โโโ MCP_SETUP.md # MCP integration guide
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ CHANGELOG.md # Version history
โโโ LICENSE # MIT license
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Running Tests
# Test server functionality
uv run python scripts/test_server.py
# Test with Docker
docker-compose exec zabbix-mcp python scripts/test_server.py
Error Handling
The server includes comprehensive error handling:
- โ Authentication errors are clearly reported
- ๐ Read-only mode violations are blocked with descriptive messages
- โ๏ธ Invalid parameters are validated
- ๐ Network and API errors are properly formatted
- ๐ Detailed logging for troubleshooting
Security Considerations
- ๐ Use API tokens instead of username/password when possible
- ๐ Enable read-only mode for monitoring-only use cases
- ๐ก๏ธ Secure your environment variables
- ๐ Use HTTPS for Zabbix server connections
- ๐ Regularly rotate API tokens
- ๐ Store configuration files securely
Troubleshooting
Common Issues
Connection Failed:
- Verify
ZABBIX_URL
is correct and accessible - Check authentication credentials
- Ensure Zabbix API is enabled
Permission Denied:
- Verify user has sufficient Zabbix permissions
- Check if read-only mode is enabled when trying to modify data
Tool Not Found:
- Ensure all dependencies are installed:
uv sync
- Verify Python version compatibility (3.10+)
Debug Mode
Set environment variable for detailed logging:
export DEBUG=1
uv run python scripts/start_server.py
Dependencies
- FastMCP - MCP server framework
- python-zabbix-utils - Official Zabbix Python library
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Zabbix for the monitoring platform
- Model Context Protocol for the integration standard
- FastMCP for the server framework
Support
- ๐ Documentation
- ๐ Issue Tracker
- ๐ฌ Discussions
Made with โค๏ธ for the Zabbix and MCP communities
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.