cursorrules

A repository rule file that tells coding agents how to work on agenticpay, an open-source Solana payment system for software tools.

In plain words
What is it for?
Use it when developing or integrating agenticpay packages, command-line tools, payment-protected MCP servers, or related examples.
Why use it?
It keeps agent changes consistent with the project's conventions and helps avoid configuration mistakes such as mixing test and live payment networks.

Cursor rule for Cursor

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 rules/agenticpay-dev/agenticpay/cursorrules
Clone the repo
git clone --depth 1 https://github.com/agenticpay-dev/agenticpay

Made for: Cursor.

Per session 1,280 This file is loaded in full into every session.
When invoked 1,280 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.01280 $0.01280
Opus 5 $0.00640 $0.00640
Sonnet 5 $0.00256 $0.00256
Haiku 4.5 $0.00128 $0.00128

Measured yesterday against content hash fdcad6edc30f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules 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 yesterday.

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.

.cursorrules · 101 lines

How it starts

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

Cursor rules — agenticpay

When working in this repository, follow the conventions below. These rules also apply when an outside developer copies this file into their own project to integrate agenticpay (drop it at their repo root as .cursorrules).

What this project is

agenticpay is an open-source x402 micropayments stack for the MCP ecosystem on Solana. The repo ships:

  • @agenticpay/sdk — USDC + wallet primitives
  • @agenticpay/cliagentpay command (wallet, balance, send)
  • @agenticpay/mcp-server — Express paywall middleware (each tool declares a price)
  • @agenticpay/facilitator — first open-source self-hostable x402 facilitator (verify + settle on Solana, pays SOL fee on the payer's behalf)
  • @agenticpay/eliza-plugin — Eliza plugin wrapping x402 fetch
  • examples/two-agent-demo — Claude Opus paying autonomously

Hosted devnet facilitator (free): https://agentpay-facilitator-e9b20a5fee6a.herokuapp.com

The day-1 footgun

Network, asset, and RPC must be consistent. Mixing devnet network (solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1) with mainnet USDC mint (EPjFW...), or pointing the client at mainnet RPC while the facilitator runs on devnet, produces transaction_simulation_failed: BlockhashNotFound. Always verify all three line up.

Network ID (CAIP-2) USDC mint RPC
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (devnet) 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU https://api.devnet.solana.com
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (mainnet) EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v https://api.mainnet-beta.solana.com

For free experiments use devnet. The hosted facilitator at agentpay-facilitator-e9b20a5fee6a.herokuapp.com supports both.

When suggesting code

  • Default to devnet unless the user explicitly says mainnet.
  • For new MCP servers, always wire the paywall middleware before route handlersapp.use(paymentMiddleware(routes, server)) must come before app.post('/tools/...') definitions.
  • Use the AssetAmount form for price ({ asset, amount } in base units), not the Money string form ("$0.001"). The string form falls through to @x402/svm's default money parser, which selects a devnet asset even when the network is mainnet — see the audit log.
  • Treat @agenticpay/sdk exports (generateKeypair, loadKeypair, saveKeypair, transferUsdc, getUsdcBalance) as the canonical API for wallet handling. Don't reach into @solana/spl-token directly unless you're writing the SDK itself.
  • Never log or echo back the raw 64-byte keypair bytes. They're written to disk with mode: 0o600 for a reason.

Read the full file on GitHub · 101 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. yesterday First seen · 101 lines · 1,280 tokens per session scan A fdcad6edc30f

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository agenticpay-dev/agenticpay (3 stars, last pushed yesterday), licensed MIT. It adds 1,280 tokens to every session, about $0.0064 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.