spreedly-mcp: Instructions file for Codex

AGENTS.md

spreedly-mcp AGENTS.md is an instructions file for Codex, OpenCode from spreedly/spreedly-mcp. It costs 2,225 tokens per session, scanned A, original, Apache-2.0.

Developer instructions for an MCP server that exposes Spreedly’s payments API to AI agents. MCP is a standard way for an AI agent to call external tools.

In plain words
What is it for?
Use it to develop or maintain the server, including its command-line startup, tool registration, payment domains, and agent-facing instructions.
Why use it?
It explains the server’s structure and separates guidance for maintaining the code from instructions delivered to agents that use the payment tools.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/spreedly/spreedly-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/spreedly/spreedly-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,225 This file is loaded in full into every session.
When invoked 2,225 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.02225 $0.02225
Opus 5.5 $0.00890 $0.00890
Sonnet 5.5 $0.00445 $0.00445
Haiku 4.5 $0.00222 $0.00222

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

Security

Grade A, and why

spreedly-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 2mo 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 · 112 lines

How it starts

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

Spreedly MCP -- Developer Agent Reference

This document is for AI coding agents that work on the Spreedly MCP codebase itself. If you are an agent using the MCP tools to process payments, your guidance comes from the server's instructions field delivered during the MCP initialize handshake (source: src/instructions.ts).

Project Overview

This is an MCP (Model Context Protocol) server that exposes the Spreedly payments API as tools for AI agents. It runs over stdio and is distributed as an npm package.

Architecture

Source Layout

src/
├── bin.ts                 # CLI entry point (reads env vars, starts stdio server)
├── server.ts              # MCP server creation, tool registration, passes instructions
├── instructions.ts        # SERVER_INSTRUCTIONS constant -- agent-facing guidance delivered via MCP
├── domains/               # One folder per Spreedly API domain
│   ├── index.ts           # Aggregates allTools from every domain
│   ├── gateways/          # tools.ts, schemas.ts
│   ├── transactions/
│   ├── paymentMethods/
│   ├── certificates/
│   ├── environments/
│   ├── merchantProfiles/
│   ├── subMerchants/
│   ├── events/
│   ├── protection/
│   ├── sca/
│   ├── cardRefresher/
│   └── networkTokenization/
├── security/
│   ├── descriptions.ts    # Per-tool description strings (behavioral guidance lives here)
│   ├── toolPolicy.ts      # Tool categories, access control, CATEGORY_GUIDANCE tags
│   ├── middleware.ts       # wrapHandler -- validation, error formatting, audit logging
│   ├── sanitizer.ts       # Input sanitization
│   └── audit-logger.ts    # Audit logging
├── transport/             # HTTP transport abstraction for the Spreedly API
│   ├── SpreedlyHttpTransport.ts
│   ├── types.ts
│   └── errors.ts
└── types/
    └── shared.ts          # ToolDefinition interface (name, description, schema, annotations, handler, parseError)

Key Patterns

ToolDefinition (src/types/shared.ts): Every tool is a plain object with name, description, schema (Zod), annotations (MCP ToolAnnotations), a handler function, and an optional parseError hook. Tools are collected in src/domains/index.ts as allTools. The parseError hook lets a tool override how SpreedlyError responses are extracted into structured agent-facing output; when omitted, the default parser extracts fieldErrors, transactionToken, and retryAfterMs from typed error subclass properties.

Read the full file on GitHub · 112 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. 2mo ago First seen · 112 lines · 2,225 tokens per session scan A 14bfc7b88ee8

Subscribe to this mod's changes

spreedly-mcp AGENTS.md is an instructions file published in the GitHub repository spreedly/spreedly-mcp (10 stars, last pushed 2d ago), licensed Apache-2.0. It adds 2,225 tokens to every session, about $0.0089 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

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

spreedly-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
spreedly-mcp AGENTS.mdspreedly/spreedly-mcpInstructions file102d agoApache-2.0A2,225Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,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