zapi-mcp CLAUDE.md

zapi-mcp CLAUDE.md is an instructions file for coding agents from shigechika/zapi-mcp. It costs 1,314 tokens per session, scanned A, original, MIT.

Project instructions for zapi-mcp, an MCP server that connects AI assistants to the Zabbix monitoring system. Zabbix monitors servers and services, including problems, hosts, and measured values.

In plain words
What is it for?
Use it when changing or reviewing the server, monitoring categories, API behavior, tests, linting, or release-related code in this repository.
Why use it?
It gives contributors the repository’s commands, architecture, testing expectations, and security rules in one place.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/shigechika/zapi-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/shigechika/zapi-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zapi-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shigechika/zapi-mcp/claude-md.svg)](https://agentmods.dev/instructions/shigechika/zapi-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/shigechika/zapi-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/shigechika/zapi-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,314 This file is loaded in full into every session.
When invoked 1,314 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01314 $0.01314
Opus 5 $0.00657 $0.00657
Sonnet 5 $0.00263 $0.00263
Haiku 4.5 $0.00131 $0.00131

Measured 4d ago against content hash 762c8b131f00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

zapi-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Overview

MCP (Model Context Protocol) server for the Zabbix API. Exposes a daily_brief morning-patrol summary plus problem/host/item query and acknowledgement tools to AI assistants via STDIO transport, built on the official mcp Python SDK's FastMCP.

Commands

uv sync --dev
uv run pytest -v                    # run all tests
uv run ruff check .                 # lint
uv run ruff format --check .        # format check

This mirrors .github/workflows/ci.yml (separate lint and test jobs; test runs on Python 3.10/3.12/3.13 on Linux plus one Windows 3.12 smoke job to guard against stdio newline regressions).

Architecture

  • zapi_mcp/server.py — FastMCP server with 8 tools: health_check, daily_brief, get_problems, get_hosts, get_host_items, acknowledge_problem, set_maintenance (idempotent maintenance window, by location tag or by exact host name — exactly one of the two required; thin wrapper over zapi_lib.ZapiClient.set_maintenance/ set_maintenance_for_hosts, which live on the base client, not just ZapiProvisioner, specifically so this MCP server's plain ZapiClient can call them), get_maintenance_windows (the read counterpart: lists Active/Upcoming/Expired windows via zapi_lib.ZapiClient.get_maintenances, classifying "active" against each window's own one-time time period, not just its outer active_since/active_till frame — exact for windows set_maintenance creates; a recurring time period falls back to the outer frame and is labeled accordingly). daily_brief also gains an "In Maintenance" section, independent of Active Problems, listing hosts under an active window plus any starting later today — cross-check other tools' findings against it before treating a planned outage as a new incident.
  • zapi_mcp/client.py — backward-compatible re-export shim; the real ZapiClient/ZapiError/tag_filter now live in the separate zapi-lib package.
  • zapi_mcp/categories.pyCategory dataclass + load_categories() for the optional ZABBIX_CATEGORIES_INI-driven daily_brief sections.
  • zapi_mcp/__main__.py — CLI entry point (--version/--check/--brief) and the mcp.run() stdio server start. The mcp.run() call is wrapped in except (KeyboardInterrupt, asyncio.CancelledError)os._exit(0): what escapes on ^C is Python-version-dependent (3.10 raises CancelledError, 3.12/3.13 raise KeyboardInterrupt) and os._exit(0) suppresses anyio's teardown traceback (guarded by test_main.py::test_sigint_exits_cleanly).

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 90 lines · 1,314 tokens per session scan A 762c8b131f00

Subscribe to this mod's changes

zapi-mcp CLAUDE.md is an instructions file published in the GitHub repository shigechika/zapi-mcp (0 stars, last pushed today), licensed MIT. It adds 1,314 tokens to every session, about $0.0066 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.