security_mcp: Instructions file for Claude Code

CLAUDE.md

security_mcp CLAUDE.md is an instructions file for Claude Code from michoo/security_mcp. It costs 1,871 tokens per session, scanned A, original, MIT.

A set of instructions for contributing to a Python security-scanning project. The project runs scanners, combines their results, removes duplicates, and produces standard SARIF or JSON reports.

In plain words
What is it for?
Use it when modifying scanner modules, wiring in new security tools, running the server or command-line interface, and producing scan reports.
Why use it?
It gives contributors a consistent way to add or change scanners without missing the files, interfaces, or project conventions that connect them to the server and command-line tool.

Instructions file for Claude Code

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

This is michoo/security_mcp's own configuration. It tells Claude Code how to work on security_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 security_mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to michoo/security_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/michoo/security_mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/michoo/security_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 security_mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/michoo/security_mcp/claude-md/github.svg)](https://agentmods.dev/instructions/michoo/security_mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/michoo/security_mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/michoo/security_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 security_mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/michoo/security_mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/michoo/security_mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,871 This file is loaded in full into every session.
When invoked 1,871 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01871 $0.01871
Opus 5.5 $0.00748 $0.00748
Sonnet 5.5 $0.00374 $0.00374
Haiku 4.5 $0.00187 $0.00187

Measured 1mo ago against content hash ccb37e3ea471, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security_mcp CLAUDE.md scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Guards empty input, runs via `subprocess.run(..., capture_output=True, text=True, timeout=TIMEOUT, check=False)`.
CLAUDE.md · 117 lines

How it starts

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

CLAUDE.md — conventions for this repository

Guidance for working in the security MCP server. The goal of this file is that every scanner is wired the same way, so adding or changing one is a mechanical, predictable process. When you add a tool, follow the checklist at the bottom — touch every listed place, in the same style as the existing tools.

What this project is

A FastMCP server (server.py) plus a CLI (cli.py) that run a set of security scanners over a target and produce SARIF 2.1.0 (or JSON for zaproxy), then normalize, aggregate and deduplicate the findings into a consolidated report.

  • Python 3.12+, package manager uv (uv run python ..., uv sync).
  • Scanner binaries live under tools/<family>/<tool>/ and are referenced by relative paths (./tools/...). Therefore the server and CLI must run from the repo root — cli.py does os.chdir(REPO_ROOT) for this reason.
  • Generated reports go to ./reports/scan_<timestamp>_<mode>/ (git-ignored).

Module map

File Role
security/<tool>.py One module per scanner. Exposes a single async *_impl(project_dir) (or (target_url), or (project_dir, language)) returning List[types.TextContent] whose text is raw SARIF/JSON.
scanners.py Single source of truth: the SCANNERS registry (Scanner dataclass) + scanners_for_mode(). Everything downstream is driven by this list.
report.py extract_findings(tool, fmt, text) normalizes SARIF/JSON → flat findings; build_report() + render_json/md/html() produce the consolidated report.
aggregate.py Runs all scanners of a mode, dedupes (deduplicate()), and run_and_persist() writes the report. Backs the aggregated MCP tools.
config.py Loads .env and resolves per-scanner toggles (scanner_enabled(), env_var_for()).
server.py FastMCP tool definitions — one per scanner + the aggregated static_scan/dynamic_scan.
cli.py Command-line runner. Picks up scanners from the registry automatically.
tests/test_scanners.py End-to-end harness: one fixture per family under tests/examples/, asserts each scanner emits valid SARIF/JSON.
tools/<family>/<tool>/install.sh Per-tool installer (relative paths, run from its own dir). tools/install-all.sh runs them all; tools/uninstall.sh removes binaries.

Read the full file on GitHub · 117 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. 1mo ago First seen · 117 lines · 1,871 tokens per session scan A ccb37e3ea471

Subscribe to this mod's changes

security_mcp CLAUDE.md is an instructions file published in the GitHub repository michoo/security_mcp (0 stars, last pushed 4mo ago), licensed MIT. It adds 1,871 tokens to every session, about $0.0075 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). 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