How to Set Up the Stripe MCP Server (2026)
Connect Stripe to Claude, Cursor, and VS Code with MCP. Query customers, payments, and subscriptions, create payment links, and manage your billing data from your AI assistant — full setup with API key config and troubleshooting.
Stripe is where most software businesses keep their revenue truth: customers, subscriptions, invoices, disputes, and payment history. The official Stripe MCP server lets Claude, Cursor, or VS Code query and act on that data directly — so you can ask "how many active subscriptions do we have?" or "create a payment link for the Pro plan" without leaving your AI assistant. This guide covers the complete setup, including the API key safety practices that matter when money is involved.
What This Integration Enables
With the Stripe MCP server connected, your AI assistant can:
- Look up customers and their payment and subscription history
- Create customers, products, prices, and payment links
- List and inspect invoices, charges, and refunds
- Query subscription status and recent failed payments
- Search Stripe's documentation to answer integration questions while you code
Prerequisites
- Node.js 18+ installed and on your PATH
- A Stripe account (free to create)
- A Stripe secret API key — ideally a restricted test-mode key (created in step 1)
- An MCP client: Claude Desktop, Cursor, or VS Code
Step 1: Create a Restricted API Key
- Open the Stripe Dashboard → Developers → API keys and make sure Test mode is toggled on.
- Click Create restricted key. Restricted keys let you grant only the permissions you need.
- Grant Read on Customers, Charges, Invoices, Subscriptions, and Products to start. Add Write only on the resources you actually want the AI to create (e.g. Payment Links).
- Copy the key — it starts with
rk_test_(restricted) orsk_test_(standard secret). Store it somewhere private.
Money safety: Always begin in test mode. A test key cannot touch real money — it operates entirely on Stripe's sandbox data. Only switch to a live sk_live_ key once you fully trust your workflow, and keep it restricted.
Step 2: Test the Server Locally
Confirm the server runs and authenticates before wiring it into a client. The official package is @stripe/mcp:
npx -y @stripe/mcp --tools=all --api-key=rk_test_your_key_hereIf it starts without an authentication error, your key works. Stop it with Ctrl+C and move on to configuring your client. You can scope the available tools with --tools=customers.read,paymentLinks.create instead of all.
Step 3: Add the Server to Your Client
Claude Desktop
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/):
{
"mcpServers": {
"stripe": {
"command": "npx",
"args": ["-y", "@stripe/mcp", "--tools=all"],
"env": {
"STRIPE_SECRET_KEY": "rk_test_your_key_here"
}
}
}
}Cursor & VS Code
Use the identical block in ~/.cursor/mcp.json or your VS Code MCP settings. The command, args, and STRIPE_SECRET_KEY env var are the same. See our filesystem MCP setup guide for an example of the same pattern with a different server.
Remote (Hosted) Option
For clients that support remote MCP servers, Stripe hosts an endpoint at https://mcp.stripe.com, which you authenticate with the same secret key as a bearer token. This avoids running anything locally.
Step 4: Restart and Verify
Fully quit and reopen your client, then test it in test mode:
List my 5 most recent Stripe customers and their subscription statusGetting real (sandbox) results back confirms the integration is live.
Real-World Use Cases
- "Create a payment link for the $49/mo Pro plan and give me the URL"
- "Which customers had a failed payment in the last week?"
- "Summarize this customer's billing history before I reply to their email"
- "Draft a Stripe integration snippet using the latest API while reading the docs tool"
Troubleshooting
401 / authentication_required
The key is missing, malformed, or revoked. Confirm it starts with rk_test_, sk_test_, or the live equivalents, has no trailing spaces, and is still active in the Dashboard.
permission_denied on a specific tool
Your restricted key lacks the permission for that resource. Edit the key in the Stripe Dashboard and grant the missing Read or Write scope, then restart your client.
Tools don't appear after setup
Confirm Node 18+ is installed, that the JSON in your config is valid (a missing comma breaks the whole file), and that you fully restarted the client rather than just closing the window.
Security
- Use a restricted test-mode key while developing and never commit it to git
- Grant only the Read/Write permissions the AI actually needs — avoid refunds and payouts unless required
- Switch to a
sk_live_key only after you fully trust the workflow, and keep it restricted - Rotate the key from the Stripe Dashboard if it is ever exposed
Frequently Asked Questions
Is there an official Stripe MCP server?
Yes. Stripe maintains an official MCP server published as @stripe/mcp. It exposes tools for working with customers, payments, invoices, subscriptions, products, prices, payment links, and more, authenticated with your Stripe secret API key. Stripe also offers a hosted remote MCP endpoint at https://mcp.stripe.com for clients that support remote servers.
Should I use a test key or a live key with the Stripe MCP server?
Always start with a restricted test-mode key (sk_test_...). Test mode lets your AI assistant create customers, payment links, and invoices against fake data with zero financial risk. Only move to a live key once you fully trust your setup, and even then use a restricted key scoped to the minimum permissions you need.
Can the Stripe MCP server move real money?
It can perform write actions like creating customers, invoices, and payment links, which in live mode have real billing consequences. This is exactly why you should run a restricted key with only the permissions you need, prefer test mode while developing, and never grant refund or payout permissions unless a specific workflow requires them.
Can I use the Stripe MCP server with Cursor and VS Code?
Yes. The same @stripe/mcp server works with any MCP-compatible client. In Cursor you add it to ~/.cursor/mcp.json, in VS Code you add it to your MCP settings, and in Claude Desktop you add it to claude_desktop_config.json. The command and API key environment variable are identical across clients.
Why am I getting an authentication error from Stripe?
A 401 authentication error almost always means the STRIPE_SECRET_KEY is missing, malformed, or revoked. Confirm the key starts with sk_test_ or sk_live_, has no trailing whitespace, and is still active in your Stripe Dashboard under Developers → API keys. If you used a restricted key, make sure it includes permissions for the tools you are calling.
More MCP Integrations
Browse the full MCP server directory to connect Slack, Notion, the Google Drive server, and 50+ more tools to your AI workflow.