agentpay-mcp: Instructions file for Codex

AGENTS.md

agentpay-mcp AGENTS.md is an instructions file for Codex, OpenCode from up2itnow0822/agentpay-mcp. It costs 1,216 tokens per session, scanned A, original, MIT.

Repository instructions for AgentPay MCP, a server that lets AI agents make policy-controlled payments through a standard tool interface.

In plain words
What is it for?
Use them when changing, testing, documenting, or releasing this payment server and its npm package.
Why use it?
They keep payment handling safe and consistent by requiring explicit checks, local signing, duplicate-payment protection, and safe failure behavior.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex.

This is up2itnow0822/agentpay-mcp's own configuration. It tells Codex and OpenCode how to work on agentpay-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 agentpay-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to up2itnow0822/agentpay-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/up2itnow0822/agentpay-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/up2itnow0822/agentpay-mcp

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/up2itnow0822/agentpay-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/up2itnow0822/agentpay-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/up2itnow0822/agentpay-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/up2itnow0822/agentpay-mcp/agents-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 agentpay-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/up2itnow0822/agentpay-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/up2itnow0822/agentpay-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,216 This file is loaded in full into every session.
When invoked 1,216 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.01216 $0.01216
Opus 5.5 $0.00486 $0.00486
Sonnet 5.5 $0.00243 $0.00243
Haiku 4.5 $0.00122 $0.00122

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

Security

Grade A, and why

agentpay-mcp 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 10d 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 · 96 lines

How it starts

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

AGENTS.md -- AgentPay MCP

Purpose

  • This repository provides the canonical MCP server for policy-aware x402 payment tools in the AI Agent Economy payment trial.

Ownership

  • AI Agent Economy owns the server, npm package, documentation, and release evidence.

Local Contracts

  • Preserve local signing, explicit policy checks, idempotency, and fail-closed handling of malformed or untrusted payment responses.
  • Never use live funds or production credentials in default tests.
  • Keep npm metadata, README commands, GitHub releases, and runtime behavior consistent.
  • Treat dist/, coverage, dependency folders, and generated repair artifacts as outputs unless a closer contract says otherwise.
  • Merge policy: a PR merges only with 100% green checks and every review comment resolved. The main ruleset enforces the build check and thread resolution; no direct pushes, force-pushes, or branch deletion.
  • Every outbound HTTP request to a caller-influenced destination goes through src/utils/safe-fetch.ts (https, no private destinations, pinned DNS, no automatic redirects, capped bodies). Never call global fetch for it — this includes the value-pack examples, which import it directly.
  • Every value-moving handler runs inside withSpendIntent and wraps wallet writes in runClassifiedSpend; failures after a possible broadcast lock the intent. Unresolved locks are never evicted; only the operator CLI clears them.
  • x402 payment entry points require max_payment_eth and pay_to; the signed requirement must match the caller-approved terms. x402 intents carry a lockScope (canonical host + payee): a paid-but-undelivered payment, including a paid non-2xx response, blocks new x402 payments to that host and that payee until the operator CLI resolves it. Intents sharing a scope key run one at a time. Settled idempotency keys are never evicted; the spend journal is compacted only to live state (temp + fsync + rename).
  • Operator reconciliation states the on-chain outcome: resolve <id> settled retires a keyed intent's key (tombstone), unsettled clears the lock. One process owns an AGENTPAY_STATE_DIR (spend-intents.lock: inode + nonce re-verified before every journal write; heartbeat through the owner's own descriptor; pid liveness trusted only within one host, boot and PID namespace; takeovers serialised). Never write the journal from a second process. Operator commands select intents by the id: handle (spendIntentHandle) or a shell-plain key, never by printed key text; keys are printed only through displaySpendIntentKey. idempotencyKey input rejects control, invisible-formatting and line-separator characters.
  • Spend policy: the operator policy comes only from the environment; MCP callers may only tighten. No MCP tool may loosen policy or clear spend locks.
  • Remote free text (HTTP bodies, registry metadata, error strings) reaches tool results only through formatUntrustedBody or sanitizers.
  • Third-party GitHub Actions are pinned to full commit SHAs. Model-driven jobs (daily-review analyze, daily-repair plan) hold only read-only tokens and no persisted credential; deterministic jobs validate their artifacts and own every write. No workflow merges automatically. Every workflow declares permissions; CI that runs PR code is contents: read.
  • server.json declares every environment variable the server reads.
  • Codex review: the Codex review a PR gets in CI is the only Codex check; every Codex comment must be resolved (repaired or disposed of in writing). review-gate enforces a non-dismissed Codex review of the PR's current head SHA plus zero unresolved Codex threads. A review of an older commit does not count.
  • The finding-to-fix map in docs/security-remediation-2026-10.md must stay accurate when any of these controls change.

Read the full file on GitHub · 96 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. 10d ago Changed · +55 lines · +909 tokens per session a368cbbcaafb
  2. 1mo ago Changed · +3 lines · +49 tokens per session f73108d26cce
  3. 2mo ago First seen · 38 lines · 258 tokens per session scan A 56398b25cdce

Subscribe to this mod's changes

agentpay-mcp AGENTS.md is an instructions file published in the GitHub repository up2itnow0822/agentpay-mcp (8 stars, last pushed yesterday), licensed MIT. It adds 1,216 tokens to every session, about $0.0049 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

agentpay-mcp AGENTS.md compared with instructions from other repositories

agentpay-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentpay-mcp AGENTS.mdup2itnow0822/agentpay-mcpInstructions file8yesterdayMITA1,216Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode