@ktmcp-cli/stripe-api
v1.0.0
Published
Production-ready CLI for Stripe API - payments, customers, subscriptions
Maintainers
Readme
"Six months ago, everyone was talking about MCPs. And I was like, screw MCPs. Every MCP would be better as a CLI."
— Peter Steinberger, Founder of OpenClaw Watch on YouTube (~2:39:00) | Lex Fridman Podcast #491
Stripe API CLI
A production-ready command-line interface for the Stripe API. Manage payments, customers, subscriptions, invoices, and more — directly from your terminal.
Unofficial: This project is not affiliated with or endorsed by Stripe, Inc.
Features
- Full coverage of core Stripe resources: customers, charges, payment intents, subscriptions, invoices, refunds, products, prices
- Secure API key storage via OS keychain-backed config file
- Supports both
sk_live_andsk_test_keys - Spinner feedback for all API operations
- Clean tabular output for list commands
- Environment variable support (
STRIPE_SECRET_KEY) - Works with Node.js 18+
Why CLI > MCP
| | CLI | MCP | |---|---|---| | Works everywhere | Yes | Requires MCP-compatible client | | Shell scriptable | Yes | No | | Pipeable output | Yes | No | | Zero setup | Yes | Complex configuration | | CI/CD friendly | Yes | No | | Debuggable | Yes | Hard |
MCPs are wrappers. A CLI is a first-class tool.
Installation
npm install -g @ktmcp-cli/stripe-apiOr use without installing:
npx @ktmcp-cli/stripe-api --helpAuthentication
Set your Stripe secret key once:
stripe-api config set --secret-key sk_test_your_key_hereOr use an environment variable:
export STRIPE_SECRET_KEY=sk_test_your_key_here
stripe-api customers listGet your API keys at: https://dashboard.stripe.com/apikeys
Commands
Config
stripe-api config set --secret-key <key> # Save API key
stripe-api config show # Show current config
stripe-api config clear # Clear configCustomers
stripe-api customers list [--limit 10] [--email <email>]
stripe-api customers get <customer-id>
stripe-api customers create --email <email> --name <name>
stripe-api customers delete <customer-id>Charges
stripe-api charges list [--limit 10] [--customer <id>]
stripe-api charges get <charge-id>Payment Intents
stripe-api payment-intents list [--limit 10] [--customer <id>]
stripe-api payment-intents get <payment-intent-id>
stripe-api payment-intents create --amount <cents> --currency usd [--customer <id>]
stripe-api payment-intents cancel <payment-intent-id>Subscriptions
stripe-api subscriptions list [--customer <id>] [--status active]
stripe-api subscriptions get <subscription-id>
stripe-api subscriptions create --customer <id> --price <price-id>
stripe-api subscriptions cancel <subscription-id> [--at-period-end]Invoices
stripe-api invoices list [--customer <id>] [--status paid]
stripe-api invoices get <invoice-id>
stripe-api invoices pay <invoice-id>Refunds
stripe-api refunds list [--charge <id>]
stripe-api refunds get <refund-id>
stripe-api refunds create --charge <charge-id> [--amount <cents>]Products
stripe-api products list [--active]
stripe-api products get <product-id>
stripe-api products create --name <name>Prices
stripe-api prices list [--product <id>] [--active]
stripe-api prices get <price-id>
stripe-api prices create --product <id> --amount <cents> [--recurring-interval month]Examples
# List your 5 most recent customers
stripe-api customers list --limit 5
# Create a customer
stripe-api customers create --email [email protected] --name "Alice Smith"
# Create a $29.99 payment intent
stripe-api payment-intents create --amount 2999 --currency usd
# List active subscriptions for a customer
stripe-api subscriptions list --customer cus_xxx --status active
# Issue a full refund
stripe-api refunds create --charge ch_xxx
# Issue a partial refund of $5.00
stripe-api refunds create --charge ch_xxx --amount 500
# List invoices for a customer
stripe-api invoices list --customer cus_xxx
# Create a recurring price ($19/month)
stripe-api prices create --product prod_xxx --amount 1900 --recurring-interval month
# Use with jq for scripting
stripe-api customers list --limit 100 | grep -E 'cus_|email'Environment Variables
| Variable | Description |
|----------|-------------|
| STRIPE_SECRET_KEY | Your Stripe secret key (sk_live_... or sk_test_...) |
Resources
License
MIT — see LICENSE
Part of the KTMCP project — building CLIs as first-class alternatives to MCPs.
