Stripe

The Stripe connector gives AI agents access to your Stripe account for reading customer and billing data, creating charges, invoices, subscriptions, and products. Authentication uses a Stripe secret API key stored encrypted in MCPGate's vault — your credentials are never exposed to the AI client.

Authentication#

Stripe uses API key authentication. To connect:

  1. Sign in to your Stripe Dashboard
  2. Navigate to Developers → API keys
  3. Copy your Secret key (starts with sk_live_ or sk_test_)
  4. Paste it into the API Key field in MCPGate's connector setup form

Warning

Use a restricted key with only the permissions your AI agent needs. Never use your master secret key in production. Create a restricted key under Developers → API keys → Create restricted key.

Tool reference#

The Stripe connector exposes 15 tools: 8 read, 6 write, and 1 delete. Use the MCP Apps page to enable or disable individual tools per app.

ToolCategoryDescription
stripe_list_customersreadList Stripe customers
stripe_get_customerreadGet a Stripe customer by ID
stripe_list_chargesreadList Stripe charges
stripe_list_invoicesreadList Stripe invoices
stripe_get_invoicereadGet a Stripe invoice by ID
stripe_list_subscriptionsreadList Stripe subscriptions
stripe_list_productsreadList Stripe products
stripe_get_balancereadGet the current Stripe account balance
stripe_create_customerwriteCreate a new Stripe customer
stripe_create_chargewriteCreate a new Stripe charge
stripe_create_invoicewriteCreate a new Stripe invoice for a customer
stripe_create_subscriptionwriteCreate a new Stripe subscription for a customer
stripe_create_refundwriteCreate a refund for a Stripe charge
stripe_create_productwriteCreate a new Stripe product
stripe_cancel_subscriptiondeleteCancel a Stripe subscription immediately

Subscription cancellation is immediate

stripe_cancel_subscriptioncancels the subscription immediately — it does not wait until the end of the billing period. The customer loses access to the product instantly. Always deny this tool in any app that doesn't explicitly require it.

Common guardrail recipes#

Read-only access#

Enable only the eight read tools and deny all write and delete tools. This is the safest configuration for reporting agents that summarise revenue, customer counts, or subscription metrics without initiating any transactions.

Transact preset#

Use the built-in transact preset to allow reads plus creating customers, charges, invoices, subscriptions, and products, while keeping stripe_create_refund and stripe_cancel_subscription denied. This lets agents handle new billing workflows without the ability to reverse or cancel existing commitments.

Cap charge amounts#

Apply the max_value guardrail template to stripe_create_charge, targeting the amount field (Stripe amounts are in the smallest currency unit, e.g. cents). Set a maximum to prevent the AI from creating unexpectedly large charges.

Troubleshooting#

  • 401 Invalid API Key — The API key stored in MCPGate is incorrect or has been rotated. Reconnect the Stripe connector and paste in the current restricted API key.
  • Permission error on specific tools — Stripe restricted API keys have per-resource permissions. If a tool returns a permission error, ensure the restricted key grants read or write access to the relevant resource (e.g. Customers, Charges, Invoices).
  • Charge fails with card errorstripe_create_charge requires a valid payment method token. Ensure the AI is passing a test token (e.g. tok_visa) in test mode, or a real payment method in live mode.