shipsafe
shipsafe-mcp-pay · public beta

Charge per
MCP tool call.

Five lines of code. Your Stripe account, your money. Multi-tenant customer wallets, Stripe Connect onboarding, and AP2 + x402-compatible 402 responses out of the box. We handle the plumbing — you ship the tool.

npm install shipsafe-mcp-pay · v0.1.0
your-mcp-server.ts
import { createPaywall } from 'shipsafe-mcp-pay';

const pay = createPaywall({
  apiKey: process.env.MCP_PAY_API_KEY!,
});

server.tool(
  'weather',
  pay.tool({ name: 'weather' })(async (args) => {
    return { forecast: await getForecast(args.zip) };
  })
);
The flow

How it works.

01
Onboard in 5 minutes.
Create a merchant, link your Stripe account via Connect Express. Your money lands in your Stripe — we never touch it.
02
Declare prices, issue a key.
Set a price-in-cents per MCP tool. Issue an API key (shown once). Drop it in your MCP server. Five lines of middleware.
03
Get paid on every call.
Agents top up customer wallets via Stripe Checkout. We debit on each tool call. 402 with top-up URL when they run dry.
Drop-in middleware

One install. One wrapper.

No bespoke billing code. No webhook ceremony. The middleware sits in front of your tool handlers and returns a 402 + AP2 + x402 envelope when a customer’s wallet is empty. Agents that speak either protocol know what to do.

terminal
$ npm install shipsafe-mcp-pay

# Get your key from /merchants/[id]
$ export MCP_PAY_API_KEY=mp_live_...

$ node your-mcp-server.js
✓ paywall active · 2 tools registered
Pricing

Simple. Aligned with your success.

On top-ups
10%
Platform fee on each customer wallet top-up. Taken via Stripe Connect application_fee — your customer sees one charge from you.
On tool calls
0%
We don't charge per call. Once a customer has funds, every tool call is debited at the price you set.
Stripe fees
2.9% + 30¢
Stripe’s standard processing fee on the top-up payment. Charged by Stripedirectly to the merchant’s Connect account.

Example: a customer tops up $25. Stripe takes $1.03. We take $2.40 (10% of $24 net). You net $21.57. Customer can now make 250+ tool calls at 8¢ each before the next top-up.

Ship the tool. We’ll handle the money.