mcp-security-inspector AGENTS.md

mcp-security-inspector AGENTS.md is an instructions file for Codex, OpenCode from danveil/mcp-security-inspector. It costs 560 tokens per session, scanned A, original, MIT.

Project instructions for MCP Security Inspector, a tool that checks MCP tool descriptions and metadata without running the tools. Static analysis examines code or data without executing it.

In plain words
What is it for?
It helps developers understand the project's architecture, security requirements, development commands, tests, type checks, and package-building process.
Why use it?
It defines safety rules that prevent scanned tools, linked resources, or catalog content from being executed, downloaded, or sent to a model.

Instructions file for CodexOpenCode

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/danveil/mcp-security-inspector/agents-md
Clone the repo
git clone --depth 1 https://github.com/danveil/mcp-security-inspector

Made for: Codex, OpenCode.

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 mcp-security-inspector AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/danveil/mcp-security-inspector/agents-md.svg)](https://agentmods.dev/instructions/danveil/mcp-security-inspector/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/danveil/mcp-security-inspector/agents-md"><img src="https://agentmods.dev/badge/instructions/danveil/mcp-security-inspector/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 560 This file is loaded in full into every session.
When invoked 560 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.00560 $0.00560
Opus 5 $0.00280 $0.00280
Sonnet 5 $0.00112 $0.00112
Haiku 4.5 $0.00056 $0.00056

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

Security

Grade A, and why

mcp-security-inspector AGENTS.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 5d 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.

AGENTS.md · 52 lines

How it starts

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

AGENTS.md

Purpose

MCP Tool Security Inspector performs deterministic defensive static analysis of MCP tool metadata. It must never invoke scanned tools, execute metadata, download metadata-linked resources, or send catalog content to a model.

Architecture

  • src/mcpsec/loader.py and resource_policy.py: bounded hostile-input handling
  • src/mcpsec/normalizer.py: NFC normalization, alias validation, and typed tool definitions
  • src/mcpsec/detectors/ and rules/: built-in detectors and data-only custom rules
  • src/mcpsec/risk.py: deterministic, capped risk calculation
  • fingerprint.py, baseline.py, and compare.py: canonical hashes and drift
  • src/mcpsec/retrieval.py: explicit loopback-only MCP tools/list transport
  • src/mcpsec/evaluation/: corpus validation and metrics
  • src/mcpsec/reporter.py and cli.py: inert output and CLI coordination

Commands

python -m pip install -e ".[dev]"
ruff check .
ruff format --check .
mypy src
python -m pytest --cov=mcpsec --cov-report=term-missing
python -m build
python scripts/smoke_wheel.py dist/<wheel-file>.whl

If .venv\Scripts\python.exe --version fails, recreate the virtual environment before using the helper scripts.

Security invariants

  • Treat names, descriptions, schemas, annotations, metadata, rules, suppressions, baselines, and server responses as hostile data.
  • Static analysis remains the default; never invoke tools or start supplied commands.
  • Retrieval remains opt-in and loopback-only at the HTTP transport layer; do not enable redirects or environment proxies.
  • Reject inputs over resource limits and conflicting aliases; never silently truncate or discard security-significant content.
  • Preserve deterministic finding order, canonical hashes, risk caps, and stable rule IDs.
  • Render hostile terminal text literally and neutralize spreadsheet formulas.
  • Keep custom configuration data-only; do not introduce executable expressions or user-controlled regular expressions.

Read the full file on GitHub · 52 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. 5d ago First seen · 52 lines · 560 tokens per session scan A 25c0da7d91c9

Subscribe to this mod's changes

mcp-security-inspector AGENTS.md is an instructions file published in the GitHub repository danveil/mcp-security-inspector (1 stars, last pushed 7d ago), licensed MIT. It adds 560 tokens to every session, about $0.0028 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.