MewCP Stripe MCP Server
托管的、无状态且多租户的Stripe MCP服务器,使AI助手能够通过Stripe管理支付、客户、订阅、发票和财务操作。
文档
Accept payments, manage subscriptions, and automate billing workflows all through natural language.
A Model Context Protocol (MCP) server that exposes Stripe's API for payment processing, customer management, subscriptions, and financial operations.
Overview
The Stripe MCP Server provides a complete interface to Stripe's payment infrastructure:
- Full customer lifecycle management — create, search, update, and delete customers
- Payment processing via charges and payment intents
- Product & pricing catalog management
- Subscription billing with trial support
- Real-time account balance visibility
Perfect for:
- Automating billing workflows and subscription management without writing code
- Looking up customer payment history and account status through AI assistants
- Setting up products and pricing plans for new features or services
Tools
stripe_create_customer — Create a new Stripe customer
Creates a customer record in Stripe that can hold payment methods, subscriptions, and invoices.
Inputs:
- `api_key` (string, required) — Stripe API key (starts with sk_)
- `email` (string, optional) — Customer's email address
- `name` (string, optional) — Customer's full name
- `description` (string, optional) — Internal description for the customer
- `metadata` (string, optional) — JSON string of metadata key-value pairs (e.g. '{"plan": "enterprise"}')
Output:
{
"success": true,
"customer_id": "cus_xxx",
"email": "[email protected]",
"name": "Jane Doe",
"description": "Enterprise customer",
"created": 1716720000,
"metadata": {}
}
stripe_get_customer — Retrieve a customer by ID
Returns full customer details including balance, delinquency status, and metadata.
Inputs:
- `api_key` (string, required) — Stripe API key
- `customer_id` (string, required) — Customer ID (e.g. cus_xxx)
Output:
{
"success": true,
"customer_id": "cus_xxx",
"email": "[email protected]",
"name": "Jane Doe",
"balance": 0,
"delinquent": false,
"created": 1716720000,
"metadata": {}
}
stripe_list_customers — List customers with pagination
Returns up to 100 customers per page with cursor-based pagination.
Inputs:
- `api_key` (string, required) — Stripe API key
- `limit` (integer, optional) — Number of customers to return, 1–100 (default: 10)
- `starting_after` (string, optional) — Customer ID to paginate from
Output:
{
"success": true,
"has_more": true,
"count": 10,
"customers": [{ "id": "cus_xxx", "email": "...", "name": "...", "created": 1716720000 }]
}
stripe_search_customers — Search customers by email or name
Uses Stripe's search query language to find customers matching specific criteria.
Inputs:
- `api_key` (string, required) — Stripe API key
- `query` (string, required) — Search query (e.g. 'email:"[email protected]"' or 'name:"Jane"')
- `limit` (integer, optional) — Number of results, 1–100 (default: 10)
Output:
{
"success": true,
"has_more": false,
"count": 1,
"customers": [{ "id": "cus_xxx", "email": "[email protected]", "name": "Jane Doe" }]
}
stripe_create_charge — Charge a customer's payment method
Creates a direct charge on a customer. Amount is in the smallest currency unit (cents for USD).
Inputs:
- `api_key` (string, required) — Stripe API key
- `amount` (integer, required) — Amount in cents (e.g. 1000 = $10.00)
- `currency` (string, optional) — Currency code: usd, eur, gbp, etc. (default: usd)
- `customer_id` (string, optional) — Customer ID to charge
- `description` (string, optional) — Description of the charge
- `metadata` (string, optional) — JSON string of metadata
Output:
{
"success": true,
"charge_id": "ch_xxx",
"amount": 1000,
"currency": "usd",
"status": "succeeded",
"paid": true
}
stripe_create_payment_intent — Create a payment intent
Creates a payment intent and returns a client_secret for frontend confirmation via Stripe.js.
Inputs:
- `api_key` (string, required) — Stripe API key
- `amount` (integer, required) — Amount in cents
- `currency` (string, optional) — Currency code (default: usd)
- `customer_id` (string, optional) — Customer ID
- `description` (string, optional) — Description
- `metadata` (string, optional) — JSON string of metadata
- `confirm` (boolean, optional) — Confirm immediately (default: false)
Output:
{
"success": true,
"payment_intent_id": "pi_xxx",
"client_secret": "pi_xxx_secret_xxx",
"amount": 2000,
"currency": "usd",
"status": "requires_payment_method"
}
stripe_create_product — Create a product
Creates a product in your Stripe catalog. Products require a price before they can be sold.
Inputs:
- `api_key` (string, required) — Stripe API key
- `name` (string, required) — Product name
- `description` (string, optional) — Product description
- `metadata` (string, optional) — JSON string of metadata
Output:
{
"success": true,
"product_id": "prod_xxx",
"name": "Pro Plan",
"description": "Access to all pro features",
"active": true
}
stripe_create_price — Create a price for a product
Defines the billing amount and interval for a product. Supports one-time and recurring (subscription) pricing.
Inputs:
- `api_key` (string, required) — Stripe API key
- `product_id` (string, required) — Product ID to attach the price to
- `unit_amount` (integer, required) — Amount in cents
- `currency` (string, optional) — Currency code (default: usd)
- `recurring_interval` (string, optional) — 'month' or 'year' for subscription pricing
Output:
{
"success": true,
"price_id": "price_xxx",
"product": "prod_xxx",
"unit_amount": 999,
"currency": "usd",
"recurring": { "interval": "month" }
}
stripe_create_subscription — Subscribe a customer to a plan
Creates a recurring subscription for a customer using a price ID. Supports trial periods.
Inputs:
- `api_key` (string, required) — Stripe API key
- `customer_id` (string, required) — Customer ID
- `price_id` (string, required) — Price ID for the subscription plan
- `trial_period_days` (integer, optional) — Number of free trial days
- `metadata` (string, optional) — JSON string of metadata
Output:
{
"success": true,
"subscription_id": "sub_xxx",
"customer": "cus_xxx",
"status": "active",
"current_period_start": 1716720000,
"current_period_end": 1719312000
}
stripe_cancel_subscription — Cancel a subscription
Cancels a subscription either at the end of the current billing period or immediately.
Inputs:
- `api_key` (string, required) — Stripe API key
- `subscription_id` (string, required) — Subscription ID to cancel
- `cancel_at_period_end` (boolean, optional) — true = cancel at period end, false = cancel immediately (default: true)
Output:
{
"success": true,
"subscription_id": "sub_xxx",
"status": "active",
"cancel_at_period_end": true
}
stripe_get_balance — Get account balance
Returns available and pending balances across all currencies for the Stripe account.
Inputs:
- `api_key` (string, required) — Stripe API key
Output:
{
"success": true,
"available": [{ "amount": 50000, "currency": "usd" }],
"pending": [{ "amount": 12000, "currency": "usd" }],
"livemode": true
}
Getting Your Stripe API Key
Steps
- Go to Stripe Dashboard
- Click Developers in the top navigation
- Select API keys from the left sidebar
- Copy your Secret key (starts with
sk_live_for production orsk_test_for testing)
Use
sk_test_keys during development — they work with test card numbers and won't charge real cards.
Troubleshooting
Missing or Invalid Headers
- Cause: API key not provided in request headers or incorrect format
- Solution:
- Verify
Authorization: Bearer YOUR_API_KEYandX-Mewcp-Credential-Id: CREDENTIAL-IDheaders are present - Check API key is active in your MewCP account
- Verify
Insufficient Credits
- Cause: API calls have exceeded your request limits
- Solution:
- Check credit usage in your Curious Layer dashboard
- Upgrade to a paid plan or add credits for higher limits
- Contact support for credit adjustments
Credential Not Connected
- Cause: No Stripe credential linked to your account
- Solution:
- Go to Credentials in your MewCP dashboard
- Add your Stripe API key (static auth)
- Retry the request with the correct
X-Mewcp-Credential-Idheader
Malformed Request Payload
- Cause: JSON payload is invalid or missing required fields
- Solution:
- Validate JSON syntax before sending
- Ensure all required tool parameters are included
- Check parameter types match expected values
Server Not Found
- Cause: Incorrect server name in the API endpoint
- Solution:
- Verify endpoint format:
{server-name}/mcp/{tool-name} - Use correct server name from documentation
- Check available servers in your Curious Layer account
- Verify endpoint format:
Stripe API Error
- Cause: Upstream Stripe API returned an error
- Solution:
- Check Stripe service status at Stripe Status Page
- Verify your API key has the required permissions (live vs. test mode)
- Review the error message for specific details — Stripe errors are descriptive
Resources
- Stripe API Documentation — Official API reference
- Stripe API Reference — Complete endpoint reference
- FastMCP Docs — FastMCP specification
- FastMCP Credentials — FastMCP Credentials package for credential handling