The only payment processor AI agents can use natively.
No browser. No forms. Just an API call and a Lightning invoice string.
The SatsRail MCP server gives any AI agent with Model Context Protocol support the ability to create orders, generate invoices, and check payment status.
npx satsrail-mcp
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"satsrail": {
"command": "npx",
"args": ["-y", "satsrail-mcp"],
"env": {
"SATSRAIL_API_KEY": "sk_test_your_key_here"
}
}
}
}
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"satsrail": {
"command": "npx",
"args": ["-y", "satsrail-mcp"],
"env": {
"SATSRAIL_API_KEY": "sk_test_your_key_here"
}
}
}
}
The MCP server exposes 12 tools covering the full payment lifecycle:
| Tool | Description |
|---|---|
create_order | Create a payment order with optional auto-generated Lightning invoice |
get_order | Get order details by ID (expandable: invoice, payment, merchant) |
list_orders | List orders with optional status filter |
cancel_order | Cancel a pending order |
get_invoice | Get invoice details including bolt11 Lightning string |
check_invoice_status | Real-time payment status check against the Lightning node |
generate_invoice | Generate a new invoice for an existing order |
list_payments | List confirmed payments with optional date range filter |
get_payment | Get payment details |
create_checkout_session | Create a hosted checkout session with redirect URL |
get_merchant | Get the current merchant's profile and settings |
list_wallets | List connected wallets |
A complete payment takes 3 steps — no browser involved at any point.
Agent calls create_order with amount and description. SatsRail returns an order with a bolt11 Lightning invoice string.
Agent presents the bolt11 string or a QR code to the customer. Customer pays with any Lightning wallet.
Agent calls check_invoice_status to verify payment, or listens for a webhook. Done.
User "Charge me $25 for the monthly subscription"
Agent → calls create_order(amount_cents: 2500, generate_invoice: true)
Agent "Here's your Lightning invoice. Scan this QR code or copy the payment string:"
lnbc250u1pj...kqq5yxmetu
User "Paid!"
Agent → calls check_invoice_status(invoice_id: "...")
Agent "Payment confirmed! Your subscription is active. ⚡"
Don't need MCP? Any agent that can make HTTP requests can use SatsRail directly. The entire flow is JSON in, JSON out — no redirects, no HTML.
curl -X POST https://satsrail.com/api/v1/orders \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"order": {
"total_amount_cents": 2500,
"currency": "usd"
},
"generate_invoice": true,
"payment_method": "lightning"
}'
curl https://satsrail.com/api/v1/invoices/{invoice_id}/status \
-H "Authorization: Bearer sk_test_..."
Agents that sell access to services and collect payment in the conversation. Per-call, per-session, or per-task billing with no checkout page.
Agents that create fresh invoices when payment is due — milestone billing, on-demand charges, or periodic collections.
Build agent-powered marketplaces where AI handles the checkout flow across multiple merchants.
Agents that send invoices, track payments, and follow up — from Slack, Discord, Telegram, or any chat platform.
| Variable | Required | Description |
|---|---|---|
SATSRAIL_API_KEY |
Yes | Your API key. Use sk_test_* for testing, sk_live_* for production. |
SATSRAIL_BASE_URL |
No | API base URL. Defaults to https://satsrail.com |
Get your API key and let your agents start accepting Bitcoin in minutes.