zapi-mcp: Instructions file for Claude Code

CLAUDE.md

zapi-mcp CLAUDE.md is an instructions file for Claude Code from shigechika/zapi-mcp. It costs 1,562 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is shigechika/zapi-mcp's own configuration. It tells Claude Code how to work on zapi-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything zapi-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to shigechika/zapi-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shigechika/zapi-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/shigechika/zapi-mcp

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for zapi-mcp CLAUDE.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,562 This file is loaded in full into every session.
When invoked 1,562 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01562 $0.01562
Opus 5.5 $0.00625 $0.00625
Sonnet 5.5 $0.00312 $0.00312
Haiku 4.5 $0.00156 $0.00156

Measured 13d ago against content hash 0552ffdf9545, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 13d 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 · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 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 MCPServer.

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

  • Credentials: zabbix_credentials() is the single reader (used by _client() and __main__). ZABBIX_API_TOKEN (zapi-lib >= 0.9.0 api_token=) wins over a leftover ZABBIX_USER; a token plus both user and password raises CredentialConflict; anything missing (empty counts) raises MissingEnv. Both are KeyErrors, reported via _env_error_text(). _client() and reset_client() hold _CLIENT_LOCK (sync tools run in worker threads).
  • Every tool carries ToolAnnotations. A tool annotated read_only_hint=False is a write tool: _Server.tool records it in server.WRITE_TOOLS and wraps it with _refuse_in_read_only_mode, so the annotation is the only thing to set. ZABBIX_READ_ONLY removes the write tools at import time via mcp.remove_tool; an unrecognized value is treated as read-only (read_only_mode). A new write tool must also be added to tests/test_smoke_probes.STATE_CHANGING.
  • zapi_mcp/server.py — MCPServer 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.py — Category 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 · 103 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. 13d ago Changed · +13 lines · +249 tokens per session 0552ffdf9545
  2. 29d ago Changed · -1 tokens per session 779fa75827a7
  3. 1mo 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 2d ago), licensed MIT. It adds 1,562 tokens to every session, about $0.0062 per session on Opus 5.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.

Related

Other instructions, from other repositories