MCP_Market_Distribution: Command for Claude Code

.claude/commands/setup/preflight-mcp.md

preflight-mcp is a command for Claude Code from g-digital-by-Garrigues/MCP_Market_Distribution. It costs 30 tokens per session (585 once invoked), scanned A, original, MIT.

A local checker that validates an MCP source folder and its pipeline configuration before release. MCP means Model Context Protocol, a way for AI tools to connect to external services.

In plain words
What is it for?
Use it to check a named MCP folder, receive a JSON report, and learn whether it is ready to publish.
Why use it?
It finds missing files and configuration problems before you push a version tag and let continuous integration check the project.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is g-digital-by-Garrigues/MCP_Market_Distribution's own configuration. It tells Claude Code how to work on MCP_Market_Distribution 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 MCP_Market_Distribution configures →

Reuse

Borrowing it

Nothing to install: this file belongs to g-digital-by-Garrigues/MCP_Market_Distribution. 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/g-digital-by-Garrigues/MCP_Market_Distribution/main/.claude/commands/setup/preflight-mcp.md
Clone the repo
git clone --depth 1 https://github.com/g-digital-by-Garrigues/MCP_Market_Distribution

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 preflight-mcp

README.md
[![agentmods](https://agentmods.dev/badge/commands/g-digital-by-garrigues/mcp_market_distribution/preflight-mcp/github.svg)](https://agentmods.dev/commands/g-digital-by-garrigues/mcp_market_distribution/preflight-mcp)
Your own site
<a href="https://agentmods.dev/commands/g-digital-by-garrigues/mcp_market_distribution/preflight-mcp"><img src="https://agentmods.dev/badge/commands/g-digital-by-garrigues/mcp_market_distribution/preflight-mcp/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 preflight-mcp

Your own site · 80×15
<a href="https://agentmods.dev/commands/g-digital-by-garrigues/mcp_market_distribution/preflight-mcp"><img src="https://agentmods.dev/badge/commands/g-digital-by-garrigues/mcp_market_distribution/preflight-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 585 The whole file, excluding the scripts and references it only reads on demand.
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.00030 $0.00585
Opus 5 $0.00015 $0.00293
Sonnet 5 $0.00006 $0.00117
Haiku 4.5 $0.00003 $0.00059

Measured 12d ago against content hash 3bae04ccb94c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

preflight-mcp 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 12d 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/commands/setup/preflight-mcp.md · 41 lines

How it starts

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

/preflight-mcp — Pre-commit validator

You are running the same Layer-1 validation the CI Track A gate runs (Story 1.3 today; Stories 2.2 layer-1 helpers plug in next), so engineers know whether pending-to-publish/<mcp-name>/ is publication-ready BEFORE pushing a v* tag.

Inputs

  • $1 (required): MCP name, e.g. ead-factory. Must be a kebab-case key in mcp-pipeline.yaml#mcps AND the folder name under pending-to-publish/.

What the skill runs

pnpm tsx src/setup/run-preflight.ts <mcp-name>

The helper:

  1. Loads mcp-pipeline.yaml and validates it against the zod schema (Story 1.2). If the config itself is malformed, the helper exits with the field paths + reasons.
  2. Resolves mcps[<mcp-name>]. If the entry is missing, the helper lists available keys for the engineer.
  3. Runs the Story 1.3 source-folder validator against pending-to-publish/<mcp-name>/ using the entry's reverse_dns_name as the expected mcpName value.
  4. Emits a JSON report with the source-folder check list (each item present or missing, with remediation text on misses) and a single boolean ready.

Exit semantics (same as the CI gate it mirrors)

  • Exit 0 — every required element is present, ready: true. The engineer can safely push a v* tag.
  • Exit 1 — at least one element is missing OR the config has errors. The structured error follows the FR34 shape; surface the per-item remediation text to the engineer in chat.
  • Exit 2 — usage error (missing argument).

How to surface results

When ready: true, say so in one line. When ready: false:

  • Print the mcp-name and the list of missing items, one per line, each with its remediation text.
  • Print the canonical fix-and-retry hint: "Apply the remediations above, then re-run /preflight-mcp <mcp-name>."

Notes

  • Layer 1 in the CI gate runs the same validateSourceFolder plus future Stories 2.2 helpers. Keep this skill aligned by extending run-preflight.ts whenever a new Layer-1 helper lands.
  • The skill is a soft dependency on nothing; it only needs the repo on disk and pnpm in PATH.

Read the full file on GitHub · 41 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. 12d ago First seen · 41 lines · 30 tokens per session scan A 3bae04ccb94c

Subscribe to this mod's changes

preflight-mcp is a command published in the GitHub repository g-digital-by-Garrigues/MCP_Market_Distribution (0 stars, last pushed 3d ago), licensed MIT. It adds 30 tokens to every session and 585 once invoked, about $0.0002 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.