Real consequences.
The agent can charge cards, text real people, burn credits and hit rate limits. One loop away from a bill.
Mission: test anything, spend nothing
On your machine, in one command. Your app and your agents use it like the real thing. No keys, no sandbox sign-up, no bill.
$ npx mockanything stripe
01 The problem
Payments, SMS, email, auth. Every integration an agent writes needs something to talk to, and every option today costs you something.
The agent can charge cards, text real people, burn credits and hit rate limits. One loop away from a bill.
Sign-up and keys per provider, each set up differently. Many regional providers barely offer one.
Canned JSON that breaks the moment the code does something new, or passes against an API that behaves nothing like the real one.
02 The twin
A small working backend that acts like the provider: it remembers, it follows the rules, it sends the webhooks. Watch an agent build a checkout against one.
None of it was real. No keys. $0.
Customers, payments, messages and issues persist. Refunds change what's left to refund. Deleted things are gone.
Provider-style IDs, pagination and errors. Flows like queued → sent → delivered. Webhooks signed the way the provider signs them, so your verification code runs unchanged.
Declined cards, 3-D Secure, bounced email, unreachable phones. Force any of them from the dashboard or your agent.
03 Any API
Mock Anything reads an API's description and builds the twin itself: resources, IDs, state changes, pagination, errors and webhooks. Paths the spec misses still work.
npx mockanything paystackHand-tuned, with documented test values.
npx mockanything slack2,500+ APIs from the public APIs.guru directory.
npx mockanything api.yamlOpenAPI 3 or Swagger 2, file or URL. Inspect and override every guess.
twin_from_docs(url)Your agent reads the page and writes the twin, checked before it runs.
04 Packs
Each pack covers the flow people actually build, checked against the provider's official SDK.
Customers, PaymentIntents, manual capture, refunds, Checkout Sessions, webhook endpoints, events.
pm_card_chargeDeclinedInitialize, local test checkout, verify, charge saved cards, customers, refunds.
charge.successSend SMS with status callbacks from queued to delivered; fetch, list, delete.
+15005550001Send, schedule and cancel email; delivered, bounced and complained events.
bounced@resend.devIssues, comments and pull requests per repository, with signed webhooks.
issues.openedRegional payment, messaging and identity providers. Packs are plain YAML, and contributions are welcome.
05 Agents
Mock Anything ships as an MCP server. Claude Code, Cursor and other agents start a twin mid-task, force a decline, turn on chaos and read back exactly what happened.
$ claude mcp add mockanything -- npx -y mockanything mcp{ "mcpServers": { "mockanything": { "command": "npx", "args": ["-y", "mockanything", "mcp"] } } }
mockanything <api> start a twin
mockanything inspect <api> see and edit what was inferred
mockanything env <api> snippets for your SDK
mockanything list built-in packs
“Start a Stripe twin, build the checkout, then force a declined card and make sure we handle it.”
06 Chaos
Turn on chaos and the twin misbehaves like a real provider on a bad day. Seeded, so the failure your agent found can be replayed exactly.
$ npx mockanything stripe --chaos --seed 4207 Safe by default
A twin is only as good as its facts. Packs cover each API's main flow, not every endpoint, and inferred twins make guesses you can see and override. Build fast against a twin; run final checks against the provider's sandbox. A fidelity report comparing a twin with the real sandbox is on the way.
08 Questions
No. Mock Anything is an independent, free, non-commercial project. Provider names are used only to say which API a twin is compatible with. Twins are built from public API facts, not from any provider's code or documentation text.
No. Any placeholder key works, for example sk_test_mockanything. Live keys are refused.
No. The twin runs locally and answers from memory. The only outbound traffic is the webhooks you point at your own app, and fetching an API description when you ask for one by name or URL.
Anything with an OpenAPI or Swagger description, more than 2,500 APIs by name from the public APIs.guru directory, the built-in packs, and APIs your agent describes from their documentation.
Yes. Start a twin before your tests and point your SDK's base URL at it. Use --seed to make chaos runs repeatable.
Packs are plain YAML. The contributing guide in the repository explains the rules: facts only, no branding, and a test with the official SDK.
Launching Sunday, 1 November · midnight
$ npx mockanything stripeOpen source under Apache-2.0. The package and source go live at launch.