stripe-mcp-server
Provides tools for managing Stripe payment operations including customers, payments, subscriptions, invoices, checkout sessions, refunds, balance, and webhooks, with built-in PII redaction and strict input validation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stripe-mcp-server Create a payment intent for $50"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Stripe MCP Server
A local Model Context Protocol server for Stripe payment operations. 52 tools across 8 domains, with built-in PII redaction and input validation.
Built for AI-assisted development workflows where Stripe API access needs to be both comprehensive and safe by default.
Why this exists
Stripe's official remote MCP server (mcp.stripe.com) uses OAuth and includes doc search, but exposes a smaller toolset. This server runs locally, covers more of the Stripe API surface, and sanitises every response before it reaches the model context, so sensitive data never leaks into conversation history or logs.
This server | Stripe official | |
Transport | stdio (local) | HTTP (remote) |
Auth |
| OAuth |
Tools | 52 | Smaller subset |
PII redaction | Built-in | Stripe-managed |
Doc search | No | Yes |
Idempotency keys | All mutating tools | Varies |
Input validation | Strict schemas (Zod) | Varies |
The two servers complement each other. Run both if you want operational tools plus doc search.
Related MCP server: Integrations MCP
Tools (52)
Customers (6)
create_customer, retrieve_customer, update_customer, delete_customer, list_customers, search_customers
Payments (11)
create_payment_intent, retrieve_payment_intent, confirm_payment_intent, capture_payment_intent, cancel_payment_intent, list_payment_intents, list_payment_methods, attach_payment_method, detach_payment_method, retrieve_charge, list_charges
Subscriptions (9)
create_subscription, retrieve_subscription, update_subscription, cancel_subscription, list_subscriptions, create_product, list_products, create_price, list_prices
Invoices (8)
create_invoice, retrieve_invoice, finalize_invoice, pay_invoice, void_invoice, list_invoices, retrieve_upcoming_invoice, create_invoice_item
Checkout (5)
create_checkout_session, retrieve_checkout_session, list_checkout_sessions, create_coupon, list_coupons
Refunds (3)
create_refund, retrieve_refund, list_refunds
Balance (5)
retrieve_balance, list_balance_transactions, list_payouts, list_disputes, retrieve_dispute
Webhooks (5)
create_webhook_endpoint, delete_webhook_endpoint, list_webhook_endpoints, list_events, retrieve_event
Resources (4)
Exposed as MCP resources (read-only, sanitised):
stripe://account- current account detailsstripe://balance- balance by currencystripe://webhook-endpoints- registered webhook endpointsstripe://products- active product catalogue with default prices
Prompts (4)
Pre-built prompt templates for common integration tasks:
review_stripe_integration- security, error handling, and best-practice auditsetup_webhooks- end-to-end webhook implementation guide per frameworkdesign_pricing- pricing model design with Stripe Products and Pricestroubleshoot_payment- diagnose failed payments, declines, and disputes
Security posture
Every Stripe API response is sanitised before reaching MCP output:
Secrets redacted: webhook signing secrets, PaymentIntent
client_secretvalues, including inside expanded nested objectsPII masked: email addresses (shows first 2 chars + domain), phone numbers (shows last 4 digits), billing/shipping addresses fully redacted
URLs redacted: hosted invoice URLs and invoice PDF links (bearer-style access tokens)
Metadata redacted: values stripped, keys preserved for operator context
Unknown objects: unrecognised Stripe object types reduced to a minimal envelope (
id,object,status,redacted: true) instead of passed through rawInput validation: Stripe IDs, currency codes, webhook event names, API versions, checkout payment method types, and balance transaction types validated against Zod schemas. Enum validators are derived from the installed Stripe SDK's type declarations at startup; if those files change shape in a future SDK version, validators degrade to allow-all with a stderr warning rather than crashing
Idempotency: all mutating tools accept optional
idempotency_key(except deletions, which Stripe treats as inherently idempotent)Pinned API version:
2026-05-27.dahlia, set insrc/stripe-client.tsBounded runtime: network retries capped at 0-5, timeout capped at 1-120 seconds
Setup
Prerequisites
Node.js 18+ for runtime. Node ^20.19.0 or >=22.12.0 for running tests (Vite/Vitest dev dependency requirement)
A Stripe account with API keys (dashboard.stripe.com/apikeys)
Install and build
git clone <repo-url>
cd stripe-mcp-server
npm install
npm run buildEnvironment
cp .env.example .env
# Edit .env with your Stripe secret keyVariable | Required | Default | Description |
| Yes | - | Secret key ( |
| No |
| Max retries on transient failures (0-5) |
| No |
| Request timeout in milliseconds (1000-120000) |
Using restricted keys
For tighter security, use restricted keys (rk_*) instead of full secret keys. Minimum permissions per tool group:
Tool group | Required permissions |
Customers | Customers: Read/Write |
Payments | PaymentIntents, PaymentMethods, Charges: Read/Write |
Subscriptions | Subscriptions, Products, Prices: Read/Write |
Invoices | Invoices: Read/Write |
Checkout | Checkout Sessions: Read/Write; Coupons: Read/Write |
Refunds | Refunds: Read/Write (also needs Charges or PaymentIntents: Read) |
Balance | Balance: Read; Payouts: Read; Disputes: Read |
Webhooks | Webhook Endpoints: Read/Write; Events: Read |
Grant only the groups you need. Read-only tools (list/retrieve) need only Read permission on their resource.
Wire into your MCP client
Claude Code (.mcp.json)
{
"mcpServers": {
"stripe": {
"command": "node",
"args": ["/absolute/path/to/stripe-mcp-server/dist/index.js"],
"env": {
"STRIPE_SECRET_KEY": "sk_test_..."
}
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"stripe": {
"command": "node",
"args": ["/absolute/path/to/stripe-mcp-server/dist/index.js"],
"env": {
"STRIPE_SECRET_KEY": "sk_test_..."
}
}
}
}Other MCP clients
Any client that supports stdio transport can run this server. Point it at dist/index.js with STRIPE_SECRET_KEY in the environment.
Verification
npm test # 42 tests (sanitisation, config validation, schema checks)
npm run build # TypeScript compilation to dist/Project structure
src/
index.ts # Server entry point, tool/resource/prompt registration
stripe-client.ts # Stripe SDK singleton with pinned version and bounded config
tools/
balance.ts # Balance and payout tools
checkout.ts # Checkout Session and coupon tools
customers.ts # Customer CRUD and search
invoices.ts # Invoice lifecycle tools
payments.ts # PaymentIntent and PaymentMethod tools
refunds.ts # Refund tools
subscriptions.ts # Subscription, Product, and Price tools
webhooks.ts # Webhook endpoint and event tools
resources/index.ts # MCP resources (account, balance, webhooks, products)
prompts/index.ts # MCP prompt templates
utils/stripe-toolkit.ts # Sanitisation, validation schemas, error formatting
tests/
stripe-toolkit.test.ts # Sanitisation and masking tests
stripe-config-and-schemas.test.ts # Config validation and schema testsDesign decisions
Sanitise by default, not by opt-in. Every Stripe object type has an explicit sanitisation path. Unknown object types are reduced rather than passed through. This means new Stripe object types added in future API versions are safe by default (they show id, status, and redacted: true until an explicit handler is added).
Validate from Stripe's own type definitions. Checkout payment method types, webhook event names, and API versions are loaded at startup from the installed Stripe SDK's TypeScript declaration files. When you upgrade the Stripe SDK, the validators update automatically. If the SDK restructures its type files in a future major version, validators degrade to allow-all with a stderr warning rather than crashing. The wildcard * webhook event is always rejected regardless of validator state.
No stored state. The server holds no data between requests beyond the Stripe SDK client singleton. All state lives in Stripe's API.
Licence
MIT
Available Tools
52 toolsattach_payment_methodAttach Payment MethodC
Attach a payment method to a customer.
Inputs: payment_method_id (required), customer (required), idempotency_key.
cancel_payment_intentCancel Payment IntentADestructive
Cancel a PaymentIntent. Can only cancel intents that are not already succeeded.
Inputs: payment_intent_id (required), cancellation_reason, idempotency_key.
cancel_subscriptionCancel SubscriptionADestructive
Cancel a subscription immediately or at the end of the current period.
Inputs: subscription_id (required), cancel_at_period_end, cancellation_details, idempotency_key.
capture_payment_intentCapture Payment IntentADestructive
Capture a previously authorized PaymentIntent (capture_method=manual). Optionally capture a partial amount.
Inputs: payment_intent_id (required), amount_to_capture, idempotency_key.
confirm_payment_intentConfirm Payment IntentADestructive
Confirm a PaymentIntent to initiate the payment. Optionally attach a payment method.
Inputs: payment_intent_id (required), payment_method, return_url, idempotency_key.
create_checkout_sessionCreate Checkout SessionB
Create a Stripe Checkout session. Returns a URL to redirect customers to Stripe-hosted payment page.
Inputs: mode (required), success_url (required), line_items, cancel_url, +8 more.
create_couponCreate CouponB
Create a Stripe coupon for discounts on subscriptions or invoices.
Inputs: duration (required), percent_off, amount_off, currency, +6 more.
create_customerCreate CustomerB
Create a new Stripe customer with optional email, name, phone, description, and metadata.
Inputs: email, name, phone, description, +3 more.
create_invoiceCreate InvoiceA
Create a draft invoice for a customer. Add invoice items before finalizing.
Inputs: customer (required), collection_method, days_until_due, description, +3 more.
create_invoice_itemCreate Invoice ItemB
Add a line item to an invoice (or to the customer's next upcoming invoice).
Inputs: customer (required), invoice, price, amount, +5 more.
create_payment_intentCreate Payment IntentBDestructive
Create a Stripe PaymentIntent. Amount is in the smallest currency unit (e.g. cents for USD).
Inputs: amount (required), currency (required), customer, description, +9 more.
create_priceCreate PriceB
Create a new price for a product.
Inputs: product (required), unit_amount (required), currency (required), recurring, +4 more.
create_productCreate ProductC
Create a new Stripe product.
Inputs: name (required), description, active, metadata, +2 more.
create_refundCreate RefundBDestructive
Refund a charge or payment intent. Specify amount for partial refunds; omit for full refund.
Inputs: payment_intent, charge, amount, reason, +2 more.
create_subscriptionCreate SubscriptionADestructive
Create a new subscription for a customer. Requires at least one price item.
Inputs: customer (required), items (required), default_payment_method, trial_period_days, +7 more.
create_webhook_endpointCreate Webhook EndpointBDestructive
Register a new webhook endpoint with Stripe.
Inputs: url (required), enabled_events (required), description, metadata, +2 more.
delete_customerDelete CustomerADestructive
Permanently delete a Stripe customer. This cannot be undone. Active subscriptions will be canceled.
Inputs: customer_id (required).
delete_webhook_endpointDelete Webhook EndpointADestructive
Delete a webhook endpoint. Cannot be undone.
Inputs: webhook_endpoint_id (required).
detach_payment_methodDetach Payment MethodADestructive
Detach a payment method from its customer.
Inputs: payment_method_id (required), idempotency_key.
finalize_invoiceFinalize InvoiceA
Finalize a draft invoice so it can be paid. This transitions it from draft to open.
Inputs: invoice_id (required), auto_advance, idempotency_key.
list_balance_transactionsList Balance TransactionsARead-only
List balance transactions (charges, refunds, payouts, fees, etc.) with optional filtering.
Inputs: type, payout, source, limit, +3 more.
list_chargesList ChargesBRead-only
List charges with optional filtering.
Inputs: customer, payment_intent, limit, starting_after.
list_checkout_sessionsList Checkout SessionsARead-only
List Checkout sessions with optional filtering.
Inputs: customer, payment_intent, subscription, status, +2 more.
list_couponsList CouponsCRead-only
List all coupons.
Inputs: limit, starting_after.
list_customersList CustomersARead-only
List Stripe customers with optional filtering by email, creation date, and pagination.
Inputs: email, limit, starting_after, created_gte, +1 more.
list_disputesList DisputesBRead-only
List payment disputes (chargebacks).
Inputs: charge, payment_intent, limit, starting_after.
list_eventsList EventsARead-only
List recent Stripe events (webhook deliveries). Useful for debugging integrations.
Inputs: type, limit, starting_after, created_gte, +1 more.
list_invoicesList InvoicesBRead-only
List invoices with optional filtering.
Inputs: customer, subscription, status, limit, +1 more.
list_payment_intentsList Payment IntentsCRead-only
List PaymentIntents with optional filtering.
Inputs: customer, limit, starting_after, created_gte, +1 more.
list_payment_methodsList Payment MethodsBRead-only
List payment methods attached to a customer.
Inputs: customer (required), type, limit.
list_payoutsList PayoutsARead-only
List payouts to your bank account or debit card.
Inputs: status, limit, starting_after, created_gte, +1 more.
list_pricesList PricesBRead-only
List prices with optional product filter.
Inputs: product, active, type, limit, +1 more.
list_productsList ProductsBRead-only
List Stripe products.
Inputs: active, limit, starting_after.
list_refundsList RefundsBRead-only
List refunds with optional filtering.
Inputs: payment_intent, charge, limit, starting_after.
list_subscriptionsList SubscriptionsCRead-only
List subscriptions with optional filtering.
Inputs: customer, price, status, limit, +1 more.
list_webhook_endpointsList Webhook EndpointsARead-only
List all registered webhook endpoints.
Inputs: limit, starting_after.
pay_invoicePay InvoiceADestructive
Attempt to pay an open invoice using the default payment method.
Inputs: invoice_id (required), payment_method, idempotency_key.
retrieve_balanceRetrieve BalanceARead-only
Retrieve the current Stripe account balance, broken down by currency and status (available, pending).
Inputs: no named parameters.
retrieve_chargeRetrieve ChargeARead-only
Retrieve a charge by ID.
Inputs: charge_id (required).
retrieve_checkout_sessionRetrieve Checkout SessionARead-only
Retrieve a Checkout session by ID. Includes payment status and customer details.
Inputs: session_id (required).
retrieve_customerRetrieve CustomerARead-only
Retrieve a Stripe customer by ID.
Inputs: customer_id (required).
retrieve_disputeRetrieve DisputeARead-only
Retrieve a dispute by ID with full details.
Inputs: dispute_id (required).
retrieve_eventRetrieve EventARead-only
Retrieve a single event by ID with full payload.
Inputs: event_id (required).
retrieve_invoiceRetrieve InvoiceARead-only
Retrieve an invoice by ID.
Inputs: invoice_id (required).
retrieve_payment_intentRetrieve Payment IntentARead-only
Retrieve a PaymentIntent by ID.
Inputs: payment_intent_id (required).
retrieve_refundRetrieve RefundARead-only
Retrieve a refund by ID.
Inputs: refund_id (required).
retrieve_subscriptionRetrieve SubscriptionARead-only
Retrieve a subscription by ID.
Inputs: subscription_id (required).
retrieve_upcoming_invoiceRetrieve Upcoming InvoiceARead-only
Preview the next upcoming invoice for a customer. Useful for showing what will be charged.
Inputs: customer (required), subscription.
search_customersSearch CustomersARead-only
Search Stripe customers using the Search API. Query syntax: field~"value" or field:"value". Searchable fields: email, name, phone, metadata.
Inputs: query (required), limit.
update_customerUpdate CustomerC
Update an existing Stripe customer's details.
Inputs: customer_id (required), email, name, phone, +4 more.
update_subscriptionUpdate SubscriptionB
Update a subscription. Can change items, payment method, trial, cancellation behavior, and metadata.
Inputs: subscription_id (required), items, cancel_at_period_end, default_payment_method, +5 more.
void_invoiceVoid InvoiceADestructive
Void a finalized invoice. Cannot be undone.
Inputs: invoice_id (required), idempotency_key.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 52 tools
Each tool targets a distinct Stripe resource or action (e.g., customers, payment intents, subscriptions, invoices). Tool names clearly indicate the operation and entity, making them easy to differentiate.
All tools follow a consistent verb_noun pattern in snake_case (e.g., create_customer, list_invoices, retrieve_balance). No mixing of conventions or ambiguous verbs.
With 52 tools, the set is large but justified by Stripe's extensive API surface. Each tool covers a necessary operation, though some could be consolidated (e.g., search_customers vs. list_customers). Still, the scope is reasonable for a comprehensive integration.
The tool set provides near-complete coverage of Stripe's core operations: CRUD for customers, products, prices, payment intents, subscriptions, invoices, charges, refunds, disputes, coupons, and webhooks. Advanced operations like search, balance retrieval, and checkout sessions are included. Only minor gaps (e.g., no update_invoice) exist.
Maintenance
Related MCP Connectors
Hosted Stripe MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP gateway: one connection for your AI apps, with tool policies, PII redaction and audit logs.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA remote MCP server implementation that integrates with Stripe, enabling AI assistants to interact with the Stripe API for payment processing functionality.-
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server providing over 390 tools across 66 providers, including major SaaS platforms like GitHub, Slack, and Stripe. It enables AI assistants to interact directly with a wide array of public APIs and utility services through a single interface.-
- AlicenseNot gradedqualityDmaintenanceMCP server for the Stripe API with 10 tools covering payments, customers, invoices, and subscriptions. Generated with MCPForge. Destructive and financial operations require human approval.30 npmMIT
- AlicenseAqualityDmaintenanceA production-ready MCP server with 24 tools for Stripe, Twilio, Resend, GitHub, and Slack, plus pre-built workflow prompts and live resources.2411 npm1MIT