NativeAIHub
Stripe MCP Server

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.

MCP Serverยท3 sectionsยท1 min read
codingdevops
Install Prompt

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

Your revenue operations, conversational

Instead of navigating through Stripe's dashboard to find a customer record or check your MRR, you ask the agent and get the answer in seconds. For recurring tasks like creating invoices, updating prices, or checking disputed charges, the agent handles it through natural conversation.
๐Ÿ‘ค
Customers and SubscriptionsCreate and search customers, list active subscriptions, track churned accounts, and manage plan changes.
๐Ÿ“„
Invoices and ProductsCreate invoices, add line items, finalize for sending, manage your product catalog and pricing tiers.
๐Ÿ’ฐ
Payments and RefundsView payment statuses, issue full or partial refunds, manage disputes, and check your balance across currencies.

02Real Scenarios

1

"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.

2

"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.

3

"Which customers churned this month?"

The agent lists canceled subscriptions, identifies customers, and summarizes lost revenue. Can create follow-up tasks in Todoist.

4

"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

Always use restricted API keys. A restricted key with read only access cannot accidentally issue refunds or modify subscriptions.
Test with sk_test_ keys first. Verify behavior without touching real money before connecting your live account.
Minimal permissions. If you only need revenue data, do not grant write access. You can always expand permissions later.
Never use your main secret key (sk_live_). Restricted keys limit what the agent can access, reducing risk.
# Add to ~/.claude.json under mcpServers
"stripe": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "@anthropic/stripe-mcp"],
  "env": { "STRIPE_SECRET_KEY": "rk_live_your-restricted-key" }
}