# Stripe MCP Server > **Stripe MCP Server** is a hosted, multitenant Model Context Protocol (MCP) server run by **MewCP** (https://mewcp.com), giving AI agents managed access to Stripe. > > MewCP takes care of all MCP infrastructure for you — credential storage, OAuth flows, > token refresh, and production-grade auto-scaling — so your AI agents can connect to > third-party services and run freely without you managing any MCP server yourself. > > To connect your agent to this server you need a MewCP account and your API key: > - MEWCP_KEY — your personal API key (dashboard → Developer) > > Server page: https://mewcp.com/mcp/stripe > MewCP docs: https://docs.mewcp.com > Full catalog: https://mewcp.com/llms.txt ## About Manage customers, payments, subscriptions, invoices and financial workflows through Stripe. Build commerce, billing and payment automation into applications. ## How to connect Server Page URL: https://mewcp.com/mcp/stripe Gateway URL: https://gateway.mewcp.com/personal/mcp Every request to this server requires one header: Authorization: Bearer — your MewCP API key (dashboard → Developer) All connection snippets and ready-to-use code examples are available on the server page and in this document below. --- ## Server documentation **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:** ```json { "success": true, "customer_id": "cus_xxx", "email": "user@example.com", "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:** ```json { "success": true, "customer_id": "cus_xxx", "email": "user@example.com", "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:** ```json { "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:"user@example.com"' or 'name:"Jane"') - `limit` (integer, optional) — Number of results, 1–100 (default: 10) ``` **Output:** ```json { "success": true, "has_more": false, "count": 1, "customers": [{ "id": "cus_xxx", "email": "user@example.com", "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:** ```json { "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:** ```json { "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:** ```json { "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:** ```json { "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:** ```json { "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:** ```json { "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:** ```json { "success": true, "available": [{ "amount": 50000, "currency": "usd" }], "pending": [{ "amount": 12000, "currency": "usd" }], "livemode": true } ```
## Getting Your Stripe API Key
Steps 1. Go to [Stripe Dashboard](https://dashboard.stripe.com) 2. Click **Developers** in the top navigation 3. Select **API keys** from the left sidebar 4. Copy your **Secret key** (starts with `sk_live_` for production or `sk_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:** 1. Verify `Authorization: Bearer YOUR_API_KEY` and `X-Mewcp-Credential-Id: CREDENTIAL-ID` headers are present 2. Check API key is active in your MewCP account
Insufficient Credits - **Cause:** API calls have exceeded your request limits - **Solution:** 1. Check credit usage in your Curious Layer dashboard 2. Upgrade to a paid plan or add credits for higher limits 3. Contact support for credit adjustments
Credential Not Connected - **Cause:** No Stripe credential linked to your account - **Solution:** 1. Go to **Credentials** in your MewCP dashboard 2. Add your Stripe API key (static auth) 3. Retry the request with the correct `X-Mewcp-Credential-Id` header
Malformed Request Payload - **Cause:** JSON payload is invalid or missing required fields - **Solution:** 1. Validate JSON syntax before sending 2. Ensure all required tool parameters are included 3. Check parameter types match expected values
Server Not Found - **Cause:** Incorrect server name in the API endpoint - **Solution:** 1. Verify endpoint format: `{server-name}/mcp/{tool-name}` 2. Use correct server name from documentation 3. Check available servers in your Curious Layer account
Stripe API Error - **Cause:** Upstream Stripe API returned an error - **Solution:** 1. Check Stripe service status at [Stripe Status Page](https://status.stripe.com) 2. Verify your API key has the required permissions (live vs. test mode) 3. Review the error message for specific details — Stripe errors are descriptive
---
Resources - **[Stripe API Documentation](https://stripe.com/docs/api)** — Official API reference - **[Stripe API Reference](https://stripe.com/docs/api/authentication)** — Complete endpoint reference - **[FastMCP Docs](https://gofastmcp.com/v2/getting-started/welcome)** — FastMCP specification - **[FastMCP Credentials](https://pypi.org/project/fastmcp-credentials/)** — FastMCP Credentials package for credential handling
--- ## Connection snippets ### Python (fastmcp) ```python import asyncio from fastmcp import Client from fastmcp.client.transports import StreamableHttpTransport SERVER_URL = "https://gateway.mewcp.com/personal/mcp" MEWCP_KEY = "YOUR_MEWCP_KEY" transport = StreamableHttpTransport( url=SERVER_URL, headers={ "Authorization": f"Bearer {MEWCP_KEY}", } ) async def main(): client = Client(transport) async with client: await client.ping() tools = await client.list_tools() resources = await client.list_resources() prompts = await client.list_prompts() # Change the tool name and arguments with actual tool and arguments available in server result = await client.call_tool("example_tool", {"param": "value"}) print(result) asyncio.run(main()) ``` ### TypeScript (MCP SDK) ```typescript import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; const SERVER_URL = "https://gateway.mewcp.com/personal/mcp"; const MEWCP_KEY = "YOUR_MEWCP_KEY"; const transport = new StreamableHTTPClientTransport(new URL(SERVER_URL), { requestInit: { headers: { Authorization: `Bearer ${MEWCP_KEY}`, }, }, }); const client = new Client({ name: "mewcp-client", version: "1.0.0", }); await client.connect(transport); const tools = await client.listTools(); console.log("Available tools:", tools.tools.map(t => t.name)); // Change the tool name and arguments to a tool available on your server const result = await client.callTool({ name: "example_tool", arguments: { param: "value" }, }); console.log("Tool result:", result); ``` ### VS Code (settings.json) ```json { "servers": { "mewcp": { "type": "http", "url": "https://gateway.mewcp.com/personal/mcp", "headers": { "Authorization": "Bearer YOUR_MEWCP_KEY" } } } } ``` ### Cursor (mcp.json) ```json { "mcpServers": { "mewcp": { "url": "https://gateway.mewcp.com/personal/mcp", "headers": { "Authorization": "Bearer YOUR_MEWCP_KEY" } } } } ``` ### Claude Desktop (claude_desktop_config.json) ```json "mcpServers": { "mewcp": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://gateway.mewcp.com/personal/mcp", "--transport", "http-only", "--header", "Authorization: Bearer YOUR_MEWCP_KEY" ] } } ```