The zabbix-mcp-server provides comprehensive Zabbix API functionality through an MCP-compatible interface, enabling management and monitoring of your infrastructure.
- Host Management: Create, retrieve, update, and delete hosts with advanced configurations
- Host Group Management: Perform CRUD operations on host groups
- Item Management: Handle monitoring items and their configurations
- Trigger Management: Manage alerts and notification conditions
- Template Management: Work with monitoring templates
- Problem & Event Management: Retrieve problems, historical events, and acknowledge events
- Data Retrieval: Access historical monitoring data and trend statistics
- User Management: Manage user accounts
- Maintenance Management: Schedule and manage maintenance periods
- Configuration Management: Handle discovery rules, item prototypes, and user macros
- Import/Export: Transfer configurations in JSON or XML formats
- API Information: Retrieve Zabbix API version details
Provides Docker support for containerizing and running the Zabbix MCP server with Docker Compose or as a standalone Docker image.
Enables configuration of the Zabbix MCP server through environment variables stored in .env files for settings like server URLs and authentication credentials.
Integrates with GitHub for issue tracking, discussions, and project management related to the Zabbix MCP server development.
Requires Python 3.10+ as the runtime environment for the Zabbix MCP server implementation.
Displays status badges in the README for license information and Python version requirements.
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.
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:
- Install dependencies:
- Configure environment variables:
- Test the installation:
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):
Direct execution:
Testing
Run test suite:
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:
Get hosts in specific group:
Create a new host:
Get recent problems:
Get history data:
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:
- Run with Docker Compose:
Building Docker Image
Development
Project Structure
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
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:
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
Made with ❤️ for the Zabbix and MCP communities
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
🔌 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.
- Features
- Installation
- Configuration
- Usage
- MCP Integration
- Docker Support
- Development
- Error Handling
- Security Considerations
- Troubleshooting
- Dependencies
- License
- Acknowledgments
- Support
Related Resources
Related MCP Servers
- -securityAlicense-qualityA simple MCP server for interacting with OpenAI assistants. This server allows other tools (like Claude Desktop) to create and interact with OpenAI assistants through the Model Context Protocol.Last updated -31PythonMIT License
- -security-license-qualityAn MCP server that integrates Apifox API documentation with AI assistants, allowing AI to extract and understand API information from Apifox projects.Last updated -91TypeScript
- AsecurityFlicenseAqualityAn MCP server that supercharges AI assistants with powerful tools for software development, enabling research, planning, code generation, and project scaffolding through natural language interaction.Last updated -1140TypeScript
- AsecurityAlicenseAqualityEnables AI assistants to discover, retrieve details about, and manage MCP (Model Context Protocol) servers that provide additional tools and capabilities on demand.Last updated -42093JavaScriptAGPL 3.0