Skip to content
Back to search

zabbix-mcp-server

🔌 Complete MCP server for Zabbix integration — Connect AI assistants to Zabbix monitoring with a single unified tool covering 100% of Zabbix APIs. Includes read-only mode and documentation tools for seamless exploration of hosts, items, triggers, templates, problems, and more.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mpeirone--zabbix-mcp-server/badge.svg)](/listings/mpeirone--zabbix-mcp-server)

HTML

<a href="/listings/mpeirone--zabbix-mcp-server"><img src="/api/listings/mpeirone--zabbix-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Option 1: Claude Code Integration

Add to your Claude Code MCP configuration:

claude mcp add zabbix \
  --env ZABBIX_URL=https://your-zabbix-server.com \
  --env ZABBIX_TOKEN=your_api_token \
  -- uvx --from git+https://github.com/mpeirone/zabbix-mcp-server@main zabbix-mcp

Option 2: Run with uv

git clone https://github.com/mpeirone/zabbix-mcp-server.git
cd zabbix-mcp-server
uv sync

# Configure environment
export ZABBIX_URL=https://your-zabbix-server.com
export ZABBIX_TOKEN=your_api_token

# Start the server
uv run python scripts/start_server.py

Test Connection

uv run python scripts/test_server.py

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 242 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Zabbix MCP Server
  2. [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
  3. [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
  4. [![SafeSkill](https://safeskill.dev/api/badge/mpeirone-zabbix-mcp-server)](https://safeskill.dev/scan/mpeirone-zabbix-mcp-server)
  5. A lightweight Model Context Protocol (MCP) server that provides **complete access to the entire Zabbix API** through just 3 tools. Compatible with **Zabbix 6.0+**.
  6. <a href="https://glama.ai/mcp/servers/@mpeirone/zabbix-mcp-server">
  7. <img width="380" height="200" src="https://glama.ai/mcp/servers/@mpeirone/zabbix-mcp-server/badge" alt="zabbix-mcp-server MCP server" />
  8. </a>
  9. ## Why Zabbix MCP Server?
  10. - **Complete API Coverage** - Access every Zabbix API method (100+) through a unified interface
  11. - **Lightweight Context** - Only 3 tools instead of 50+ individual tools, keeping LLM context minimal
  12. - **Always Up-to-Date** - Works with current and future Zabbix API methods automatically
  13. - **Zabbix 6.0+ Compatible** - Supports Zabbix 6.0, 6.4, 7.0, and newer versions
  14. ## The 3 Tools
  15. | Tool | Purpose |
  16. |------|---------|
  17. | `zabbix_api` | Execute any Zabbix API method |
  18. | `zabbix_api_docs` | Get documentation for any API method |
  19. | `zabbix_api_list` | Discover available API objects and methods |
  20. ## Quick Start
  21. ### Option 1: Claude Code Integration
  22. Add to your Claude Code MCP configuration:
  23. ```bash
  24. claude mcp add zabbix \
  25. --env ZABBIX_URL=https://your-zabbix-server.com \
  26. --env ZABBIX_TOKEN=your_api_token \
  27. -- uvx --from git+https://github.com/mpeirone/zabbix-mcp-server@main zabbix-mcp
  28. ```
  29. ### Option 2: Run with uv
  30. ```bash
  31. git clone https://github.com/mpeirone/zabbix-mcp-server.git
  32. cd zabbix-mcp-server
  33. uv sync
  34. # Configure environment
  35. export ZABBIX_URL=https://your-zabbix-server.com
  36. export ZABBIX_TOKEN=your_api_token
  37. # Start the server
  38. uv run python scripts/start_server.py
  39. ```
  40. ### Test Connection
  41. ```bash
  42. uv run python scripts/test_server.py
  43. ```
  44. ## Option 3: Run with docker
  45. ```bash
  46. git clone https://github.com/mpeirone/zabbix-mcp-server.git
  47. cd zabbix-mcp-server
  48. # Using docker-compose
  49. docker compose up -d
  50. # Or build manually
  51. docker build -t zabbix-mcp-server .
  52. docker run -e ZABBIX_URL=https://zabbix.example.com -e ZABBIX_TOKEN=your_token zabbix-mcp-server
  53. ```
  54. ## Environment Variables
  55. ### Required
  56. | Variable | Description | Example |
  57. |----------|-------------|---------|
  58. | `ZABBIX_URL` | Zabbix server URL | `https://your-zabbix-server.com` |
  59. ### Authentication (choose one)
  60. | Variable | Description |
  61. |----------|-------------|
  62. | `ZABBIX_TOKEN` | API token (recommended) |
  63. | `ZABBIX_USER` + `ZABBIX_PASSWORD` | Username and password |
  64. ### Security
  65. | Variable | Default | Description |
  66. |----------|---------|-------------|
  67. | `READ_ONLY` | `false` | Set to `true` to allow only read operations |
  68. | `VERIFY_SSL` | `true` | Enable/disable SSL verification |
  69. | `ZABBIX_API_WHITELIST` | `.*` | Comma-separated regex patterns for allowed API methods |
  70. | `ZABBIX_API_BLACKLIST` | (empty) | Comma-separated regex patterns for blocked API methods |
  71. | `ZABBIX_SKIP_VERSION_CHECK` | `false` | Skip Zabbix version compatibility check |
  72. | `ZABBIX_API_TIMEOUT` | `30` | API request timeout in seconds |
  73. ### Transport
  74. | Variable | Default | Description |
  75. |----------|---------|-------------|
  76. | `ZABBIX_MCP_TRANSPORT` | `stdio` | Transport type: `stdio` or `streamable-http` |
  77. | `ZABBIX_MCP_HOST` | `127.0.0.1` | HTTP server host (when using `streamable-http`) |
  78. | `ZABBIX_MCP_PORT` | `8000` | HTTP server port (when using `streamable-http`)|
  79. | `ZABBIX_MCP_STATELESS_HTTP` | `false` | Stateless HTTP mode |
  80. | `AUTH_TYPE` | - | Must be `no-auth` for HTTP transport (when using `streamable-http`) |
  81. ### Debug
  82. | Variable | Default | Description |
  83. |----------|---------|-------------|
  84. | `DEBUG` | `false` | Set to `true` for verbose logging |
  85. ## Usage Examples
  86. ### Get Hosts
  87. ```python
  88. zabbix_api(method='host.get', params={'output': ['hostid', 'name']})
  89. ```
  90. ### Get Problems
  91. ```python
  92. zabbix_api(method='problem.get', params={'output': 'extend', 'recent': True})
  93. ```
  94. ### Create Host
  95. ```python
  96. zabbix_api(method='host.create', params={
  97. 'host': 'server-01',
  98. 'groups': [{'groupid': '1'}],
  99. 'interfaces': [{'type': 1, 'main': 1, 'useip': 1, 'ip': '192.168.1.100', 'port': '10050'}]
  100. })
  101. ```
  102. ### Get Method Documentation
  103. ```python
  104. zabbix_api_docs(method='host.create')
  105. ```
  106. ### List Available Methods
  107. ```python
  108. zabbix_api_list() # All objects and methods
  109. zabbix_api_list(object='host') # Host methods only
  110. ```
  111. ## Security Features
  112. ### Read-Only Mode
  113. Set `READ_ONLY=true` to block all write operations:
  114. ```bash
  115. export READ_ONLY=true
  116. ```
  117. Only `get`, `version`, `check`, and `export` operations will be allowed.
  118. ### API Method Filtering
  119. Control which API methods can be called using whitelist/blacklist patterns:
  120. ```bash
  121. # Allow only host.* and item.get methods
  122. export ZABBIX_API_WHITELIST="host\..*,item\.get"
  123. # Block all delete and create operations
  124. export ZABBIX_API_BLACKLIST=".*\.delete,.*\.create"
  125. ```
  126. Both support comma-separated regex patterns. Blacklist is checked first.
  127. ## MCP Client Configuration
  128. ### Claude Desktop
  129. Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
  130. ```json
  131. {
  132. "mcpServers": {
  133. "zabbix": {
  134. "command": "uvx",
  135. "args": ["--from", "git+https://github.com/mpeirone/zabbix-mcp-server@main", "zabbix-mcp"],
  136. "env": {
  137. "ZABBIX_URL": "https://zabbix.example.com",
  138. "ZABBIX_TOKEN": "your_api_token"
  139. }
  140. }
  141. }
  142. }
  143. ```
  144. ## Troubleshooting
  145. ### Connection Issues
  146. - Verify `ZABBIX_URL` is accessible
  147. - Check authentication credentials
  148. - Ensure Zabbix API is enabled
  149. ### Permission Errors
  150. - Verify Zabbix user permissions
  151. - Check if `READ_ONLY` mode is enabled
  152. ### Method Blocked
  153. If you see "Method is not in whitelist" or "Method is blacklisted":
  154. - Review `ZABBIX_API_WHITELIST` and `ZABBIX_API_BLACKLIST` patterns
  155. - Ensure your regex patterns match the full method name (e.g., `host.get`)
  156. ### Debug Mode
  157. ```bash
  158. export DEBUG=true
  159. uv run python scripts/start_server.py
  160. ```
  161. ## Contributing
  162. See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
  163. ## License
  164. GPLv3 License - see [LICENSE](LICENSE) for details.
  165. ## Acknowledgments
  166. - [Zabbix](https://www.zabbix.com/) - Monitoring platform
  167. - [Model Context Protocol](https://modelcontextprotocol.io/) - Integration standard
  168. - [FastMCP](https://github.com/PrefectHQ/fastmcp) - MCP framework
  169. - [python-zabbix-utils](https://github.com/zabbix/python-zabbix-utils) - Official Zabbix Python library

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.