Stripe MCP Server
Connect your AI agent to your payment infrastructure. Look up customers, check subscriptions, create invoices, manage products, issue refunds, and monitor revenue without opening the Stripe dashboard.
Paste this into Claude Code to set it up:
I want to add the Stripe MCP Server to my Claude Code setup.
IMPORTANT: Never use Read/Edit tools on ~/.claude.json. Use jq via Bash instead.
Prerequisites: You need a Stripe API key. For safety, always use a restricted API key (starts with rk_) rather than your main secret key. Create one at dashboard.stripe.com/apikeys. Start with a test mode key (sk_test_) to verify everything works before connecting your live account.
Run this command to add the MCP server (replace the key with your actual restricted key):
```bash
jq '.mcpServers["stripe"] = {"type": "stdio", "command": "npx", "args": ["-y", "@anthropic/stripe-mcp"], "env": {"STRIPE_SECRET_KEY": "rk_live_your-restricted-key"}}' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json
```
After adding, restart Claude Code. Grant only the permissions your workflow actually needs. If you only need revenue data, use a read-only restricted key.01What It Does
02Real Scenarios
"How much MRR do we have?"
The agent lists all active subscriptions, sums plan amounts, and breaks it down by pricing tier. Your key revenue metric in seconds.
"Create an invoice for Acme Corp for $5,000"
The agent finds the customer, creates the invoice with line items, and optionally finalizes it for sending. One sentence; invoice ready.
"Which customers churned this month?"
The agent lists canceled subscriptions, identifies customers, and summarizes lost revenue. Can create follow-up tasks in Todoist.
"Refund the last charge for customer@example.com"
The agent looks up the customer, finds the most recent payment, and issues a refund after confirming the amount with you.
03Security Best Practices
"stripe": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@anthropic/stripe-mcp"],
"env": { "STRIPE_SECRET_KEY": "rk_live_your-restricted-key" }
}