mcp-stripe — Claude Code MCP server: what it does, how to install
Connects Stripe's core payments API to your coding agent. Lets you handle PaymentIntents, invoices, subscriptions, and refunds directly from the assistant.
claude mcp add --env STRIPE_SECRET_KEY=<STRIPE_SECRET_KEY> --env STRIPE_API_VERSION=<STRIPE_API_VERSION> --transport stdio stripe -- npx -y @codespar/mcp-stripeWhat mcp-stripe does
The server exposes 30 tools for interacting with Stripe payments. Your assistant can create and confirm PaymentIntent records, issue refunds, inspect account balances, and configure hosted Checkout Session or shareable Payment Link URLs. It also supports catalog management through Product, Price, and customer Subscription items.
Authentication relies on a single STRIPE_SECRET_KEY environment variable. The key prefix handles routing on Stripe's side: keys starting with sk_test_ hit the test sandbox, while sk_live_ keys trigger live charges. An optional STRIPE_API_VERSION variable pins the Stripe-Version request header to a specific calendar release. Without a valid API key, all endpoint calls fail immediately.
This package covers standard billing workflows. It differs from @codespar/mcp-stripe-acp, which focuses strictly on the experimental Agentic Commerce Protocol.
What it helps with
- issue refunds for specific charges or PaymentIntents
- generate shareable payment links and hosted checkout sessions
- set up recurring subscriptions for existing customers
- draft, finalize, and email invoices directly to clients
- inspect current Stripe balance across available and pending funds
Example prompts for the agent
- Create a test payment link for product
prod_123with a 20 dollar price - Look up PaymentIntent
pi_test_456and issue a full refund - Draft and finalize an invoice for customer
cus_789
How to install mcp-stripe
Platform CLI
claude mcp add --env STRIPE_SECRET_KEY=<STRIPE_SECRET_KEY> --env STRIPE_API_VERSION=<STRIPE_API_VERSION> --transport stdio stripe -- npx -y @codespar/mcp-stripeReplace <…> with your own values
Platform CLI
codex mcp add stripe --env STRIPE_SECRET_KEY=<STRIPE_SECRET_KEY> --env STRIPE_API_VERSION=<STRIPE_API_VERSION> -- npx -y @codespar/mcp-stripeReplace <…> with your own values
Config file
{
"mcpServers": {
"stripe": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-stripe"
],
"env": {
"STRIPE_SECRET_KEY": "<STRIPE_SECRET_KEY>",
"STRIPE_API_VERSION": "<STRIPE_API_VERSION>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"stripe": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-stripe"
],
"env": {
"STRIPE_SECRET_KEY": "<STRIPE_SECRET_KEY>",
"STRIPE_API_VERSION": "<STRIPE_API_VERSION>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e STRIPE_SECRET_KEY=<STRIPE_SECRET_KEY> -e STRIPE_API_VERSION=<STRIPE_API_VERSION> stripe npx -y @codespar/mcp-stripeReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-stripe
How to install mcp-stripe in Claude Code?
Run claude mcp add mcp-stripe -e STRIPE_SECRET_KEY=<STRIPE_SECRET_KEY> -- npx -y @codespar/mcp-stripe in your terminal, providing your test or live secret key.
What is the difference between mcp-stripe and mcp-stripe-acp?
The mcp-stripe package interacts with regular Stripe APIs for payments, subscriptions, and invoices. The mcp-stripe-acp package targets the newer Agentic Commerce Protocol specification.
How do you enable test mode in mcp-stripe?
Set STRIPE_SECRET_KEY to a secret key that starts with sk_test_.... Stripe routes all requests with this key into its test sandbox where no actual money moves.