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.
npx agentmods add instructions/forgesworn/402-mcp/claude-mdgit clone --depth 1 https://github.com/forgesworn/402-mcpWrote 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.
[](https://agentmods.dev/instructions/forgesworn/402-mcp/claude-md)<a href="https://agentmods.dev/instructions/forgesworn/402-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/forgesworn/402-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01229 | $0.01229 |
| Opus 5 | $0.00615 | $0.00615 |
| Sonnet 5 | $0.00246 | $0.00246 |
| Haiku 4.5 | $0.00123 | $0.00123 |
Grade A, and why
402-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 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.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md - 402-mcp
L402 + x402 client MCP - AI agents discover, pay for, and consume any payment-gated API autonomously.
Commands
npm run build # tsc → build/
npm test # vitest run
npm run typecheck # tsc --noEmit
Running
# Stdio transport (default — used by MCP clients like Claude Desktop)
node build/index.js
# HTTP transport (for network access, e.g. behind a reverse proxy)
TRANSPORT=http PORT=3402 node build/index.js
Key environment variables:
| Variable | Default | Purpose |
|---|---|---|
NWC_URI_FILE |
— | Absolute path to a private 0600 file containing the NWC bearer URI |
CASHU_TOKENS |
— | Path to Cashu token store file |
MAX_AUTO_PAY_SATS |
1000 |
Auto-pay threshold per request |
MAX_SPEND_PER_MINUTE_SATS |
10000 |
Rolling 60s spend cap |
CREDENTIAL_STORE |
~/.402-mcp/credentials.json |
Path to credential store (must be within home dir) |
TRANSPORT |
stdio |
stdio or http |
PORT |
3402 |
HTTP transport listen port |
BIND_ADDRESS |
127.0.0.1 |
HTTP transport bind address |
CORS_ORIGIN |
false |
CORS origin for HTTP transport (* or specific origin) |
HUMAN_PAY_TIMEOUT_S |
600 |
Timeout for human wallet QR payment (seconds) |
HUMAN_PAY_POLL_S |
3 |
Poll interval for human wallet payment (seconds) |
FETCH_TIMEOUT_MS |
30000 |
Outbound HTTP request timeout |
FETCH_MAX_RETRIES |
2 |
Max retries for non-mutating requests |
FETCH_MAX_RESPONSE_BYTES |
10485760 |
Max response body size (10 MiB) |
SSRF_ALLOW_PRIVATE |
false |
Allow requests to private IPs (local dev only) |
ALLOW_INSECURE_TLS |
false |
Acknowledge risk when NODE_TLS_REJECT_UNAUTHORIZED=0 |
Structure
src/
index.ts # Entry point: transport setup, tool registration
config.ts # Environment variable parsing, defaults
fetch/ # Resilient fetch: SSRF guard, timeout, retry
tools/ # One file per MCP tool (handler + registration)
wallet/ # Payment implementations (NWC, Cashu melt, human)
store/ # Persistent JSON stores (credentials, Cashu tokens)
l402/ # L402 protocol utilities (parse, detect, cache, bolt11)
x402/ # x402 protocol utilities (parse, payment deeplinks)
tests/ # Tests mirror src/ structure (tests/tools/, tests/wallet/, etc.)
e2e/ # Integration tests against in-process toll-booth
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.
- 5d ago First seen · 92 lines · 1,229 tokens per session scan A 4fb60a07b650
402-mcp CLAUDE.md is an instructions file published in the GitHub repository forgesworn/402-mcp (0 stars, last pushed 2d ago), licensed MIT. It adds 1,229 tokens to every session, about $0.0061 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.
Other instructions, from other repositories
ln-agent-poc-v2 CLAUDE.md
Claude Code instructions for cachet-jp/ln-agent-poc-v2, covering claude.md, project, layout, common commands and architecture notes.
cashu.me AGENTS.md
AGENTS.md instructions for cashubtc/cashu.me, covering cashu.me developer guide for agents, 1. tech stack, core frameworks, mobile & desktop and cashu & cryptography.
sparkbtcbot CLAUDE.md
Claude Code instructions for echennells/sparkbtcbot, covering sparkbtcbot, what this skill does, structure, trigger phrases and dependencies.
SaturnZap copilot-instructions.md
Instructions for lqwdtech/SaturnZap, covering saturnzap — copilot instructions, build & test, architecture, conventions and test patterns.
SaturnZap tests.instructions.md
Use when writing, editing, or debugging SaturnZap tests. Covers fixtures, mocking patterns, CLI runner usage, and live test markers.
lightning-enable-mcp CLAUDE.md
Claude Code instructions for refined-element/lightning-enable-mcp, covering claude.md — lightning enable mcp, project overview, bug fix workflow and engineering standards.