S

Stripe Integrated

Comprehensive mcp designed for your, agents, interact, stripe. Includes structured workflows, validation checks, and reusable patterns for devtools.

MCPClipticsdevtoolsv1.0.0MIT
0 views0 copies

Stripe Integrated

Stripe Integrated is an MCP server that allows AI assistants to interact with the Stripe payment processing API, providing tools for managing customers, subscriptions, invoices, payment intents, and financial data. This MCP bridge enables language models to query transaction history, create payment links, manage subscription lifecycles, and analyze revenue data through natural language commands, bringing conversational payment management to your financial workflows.

When to Use This MCP Server

Connect this server when...

  • You need AI assistance managing Stripe customers, subscriptions, and invoices through natural language commands
  • Your business uses Stripe for payments and you want conversational access to transaction data and revenue metrics
  • You are building automated workflows that create payment links, issue refunds, or update subscription plans
  • You need to investigate payment failures, disputed charges, or billing discrepancies with AI-guided analysis
  • You want to generate financial reports summarizing revenue, churn, and subscription metrics from Stripe data

Consider alternatives when...

  • Your payment processing uses PayPal, Square, or Adyen exclusively without Stripe integration
  • You only need to display a payment form without backend Stripe management
  • You require complex financial reporting that exceeds Stripe API capabilities

Quick Start

# .mcp.json configuration { "mcpServers": { "stripe": { "command": "npx", "args": ["-y", "@stripe/mcp", "--tools=all"], "env": { "STRIPE_SECRET_KEY": "sk_test_your_stripe_secret_key_here" } } } }

Connection setup:

  1. Log in to your Stripe Dashboard at dashboard.stripe.com
  2. Navigate to Developers > API Keys and copy your secret key (use test mode key for development)
  3. Add the configuration above to your .mcp.json file with your Stripe secret key
  4. Restart your MCP client to connect to Stripe

Example tool usage:

# Query customer data
> Show me the subscription details for customer cus_ABC123

# Analyze revenue
> What was the total revenue from subscriptions last month?

# Manage subscriptions
> Cancel the subscription sub_XYZ789 at the end of the current billing period

Core Concepts

ConceptPurposeDetails
CustomersAccount managementStripe customer objects that hold payment methods, subscriptions, and billing information
SubscriptionsRecurring billingAutomated recurring payment schedules with plan details, billing cycles, and lifecycle management
Payment IntentsTransaction processingObjects representing a payment attempt with status tracking through the payment lifecycle
InvoicesBilling documentsGenerated billing records for subscriptions and one-time charges with line items and payment status
Secret KeyAPI authenticationServer-side API key that authenticates all requests and determines account access scope
Architecture:

+------------------+       +------------------+       +------------------+
|  Stripe          |       |  Stripe MCP      |       |  AI Assistant    |
|  API             |<----->|  Server (npx)    |<----->|  (Claude, etc.)  |
|  api.stripe.com  | HTTPS |  stdio transport  | stdio |                  |
+------------------+       +------------------+       +------------------+
        |
        v
+------------------------------------------------------+
|  Customers > Subscriptions > Invoices > Payments      |
+------------------------------------------------------+

Configuration

ParameterTypeDefaultDescription
STRIPE_SECRET_KEYstring(required)Stripe API secret key (use sk_test_ prefix for test mode, sk_live_ for production)
--toolsstringallComma-separated list of tool categories to enable (all, customers, subscriptions, invoices)
--read-onlyflagfalseRestrict the server to read-only operations, preventing any modifications to Stripe data
--api-versionstringlatestStripe API version to use for requests (e.g., 2024-12-18)
--max-resultsinteger100Maximum number of objects returned per list operation

Best Practices

  1. Always use test mode keys during development. Stripe test mode keys (prefixed with sk_test_) operate against test data and never process real payments. Configure the MCP server with test keys for development, experimentation, and AI training. Only switch to live keys for production workflows with explicit confirmation.

  2. Enable read-only mode for analytics workflows. When using the MCP server primarily for querying transaction data and generating reports, enable the --read-only flag. This prevents the AI from accidentally creating charges, modifying subscriptions, or issuing refunds during data exploration.

  3. Restrict tool categories to your use case. Rather than enabling all tools, specify only the categories you need with the --tools parameter. If you only need customer and subscription management, disable invoice and payment intent tools to reduce the surface area of possible operations.

  4. Handle sensitive financial data carefully. Stripe API responses can contain payment method details, billing addresses, and financial information. Be mindful of what data you request through the AI and ensure your environment meets PCI compliance requirements if handling card data.

  5. Use idempotency keys for write operations. When the AI creates charges, customers, or subscriptions, ensure the operations use idempotency keys. This prevents duplicate charges if a request is retried due to network issues. The MCP server should handle this automatically, but verify for critical financial operations.

Common Issues

"Invalid API key provided" on connection. Verify your Stripe secret key starts with sk_test_ (test mode) or sk_live_ (live mode) and was copied completely. Keys are revoked immediately when regenerated in the dashboard. Check Developers > API Keys in your Stripe Dashboard to confirm the key is active.

Subscription operations return "resource not found". Ensure you are using the correct Stripe account mode. Test mode and live mode have completely separate data. A subscription created in live mode will not be found when querying with a test mode API key, and vice versa.

Rate limiting errors on bulk queries. Stripe enforces rate limits of 100 requests per second for live mode and 25 per second for test mode. When performing bulk queries across many customers or subscriptions, the MCP server should handle rate limiting automatically. If errors persist, reduce the concurrency of your requests or add pagination with smaller page sizes.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates