# Model Context Protocol (MCP) Let your AI agents interact with the Stripe API by using our MCP server. The Stripe Model Context Protocol (MCP) server provides a set of tools that AI agents can use to interact with the Stripe API and search our knowledge base (including documentation and support articles). ## Connect to Stripe’s MCP server #### Cursor [Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=stripe&config=eyJ1cmwiOiJodHRwczovL21jcC5zdHJpcGUuY29tIn0%3D) To open Cursor and automatically add the Stripe MCP, click install. Alternatively, add the following to your `~/.cursor/mcp.json` file. To learn more, see the Cursor [documentation](https://docs.cursor.com/context/model-context-protocol). ```json { "mcpServers": {"stripe": { "url": "https://mcp.stripe.com" } } } ``` #### Claude Code To add MCP to Claude code, run the following command. To learn more, see the Claude Code [documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#configure-mcp-servers). ```bash claude mcp add --transport http stripe https://mcp.stripe.com/ ``` After adding the server to Claude, you must authenticate with Stripe. ```bash claude /mcp ``` #### ChatGPT You can enable MCP servers on ChatGPT if you have a Pro, Plus, Business, Enterprise or Education account. Follow the [OpenAI documentation](https://platform.openai.com/docs/guides/developer-mode) for instructions. Use the following parameters when setting up your custom connector: - The server url is `https://mcp.stripe.com`. - Use “OAuth” as the connection mechanism. Stripe’s MCP server also works with OpenAI’s response API, when building [autonomous agents](https://docs.stripe.com/mcp.md#agents). #### Other ### VS Code [Install in VS Code](https://vscode.dev/redirect/mcp/install?name=stripe&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.stripe.com%22%7D) To open VS Code and automatically add the Stripe MCP, click install. Alternatively, add the following to your `.vscode/mcp.json` file in your workspace. To learn more, see the VS Code [documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers). ```json { "servers": {"stripe": { "type": "http", "url": "https://mcp.stripe.com" } } } ``` ### Custom MCP is an open protocol supported by many clients. Your specific client documentation can advise you how to connect. Use the server url `https://mcp.stripe.com` and “OAuth” as the connection mechanism if possible. If your MCP client doesn’t support OAuth, you can pass in a [restricted API key](https://docs.stripe.com/keys.md#create-restricted-api-key) in the `Authorization` header as a Bearer token. For example, a client might accept the following header property: ```json { "stripe": { "url": "https://mcp.stripe.com", "headers": { "Authorization": "Bearer <>" } } } ``` After installing, you can manage MCP client sessions in your Dashboard settings. ### Manage MCP client sessions The Stripe MCP server uses OAuth to connect MCP clients according to the [MCP spec](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#2-1-1-oauth-grant-types). OAuth is more secure than using your secret key because it allows more granular permissions and user based authorization. When you add the Stripe MCP to a client, the MCP client opens an OAuth consent form which allows you to authorize the client to access your Stripe data. #### Manage your own sessions To view authorized OAuth client sessions navigate to your [user settings](https://dashboard.stripe.com/settings/user) in the Stripe Dashboard. If you’ve authorized an MCP client, it’ll show under **OAuth sessions**. To revoke OAuth access for a specific MCP client session: 1. Scroll to the OAuth sessions section in your [user settings](https://dashboard.stripe.com/settings/user). 2. Find the client sessions in the list, and click the overflow menu. 3. Select **Revoke access**. #### Manage sessions as an admin If you’re an administrator, you can view and revoke the MCP OAuth sessions of other users in your organization or account. This requires a role with permission to manage team members and OAuth sessions (for example, the **Administrator** role). To manage another user’s sessions: 1. Go to the **[Team and security](https://dashboard.stripe.com/settings/team)** settings page and select the team member you want to manage. 2. On the team member details page, find the **OAuth sessions** table. 3. To revoke a single session, click the overflow menu on its row and select **Revoke access**. To revoke every session in the table, select **Revoke all**. Session management is scoped to the account or organization you’re currently viewing, and to the current environment (live mode or a sandbox). Revoking a session only removes access for the accounts within your current scope. If the same session also has access to accounts outside your scope, it stays active for those accounts. When viewing an organization, the table includes an **Accounts** column because a session can be tied to more than one account in the organization. ### Manage MCP access Administrators can [enable MCP access](https://dashboard.stripe.com/settings/mcp) in the Dashboard. Access is managed separately between sandbox and live mode environments. ### Building autonomous agents If you’re building agentic software, you can pass a Stripe API key as a bearer token to the MCP remote server. We strongly recommend using [restricted API keys](https://docs.stripe.com/keys/restricted-api-keys.md) to limit your agent’s access to exactly the functionality it requires. For example, you can use this authorization method with [OpenAI’s Responses API](https://platform.openai.com/docs/guides/tools-remote-mcp#authentication). Don’t embed restricted or secret API keys in code. Instead, provide API keys to your agent through a secrets vault or environment variable. To learn how to manage keys safely, see [best practices for managing secret API keys](https://docs.stripe.com/keys-best-practices.md). ```bash curl https://mcp.stripe.com/ \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <>" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "create_customer", "arguments": {"name": "Jenny Rosen", "email": "jenny.rosen@example.com" } }, "id": 1 }' ``` ## Tools The server exposes the following [MCP tools](https://modelcontextprotocol.io/docs/concepts/tools). We recommend enabling human confirmation of tools and exercising caution when using the Stripe MCP with other servers to avoid prompt injection attacks. If you have feedback or want to see more tools, email us at [mcp@stripe.com](mailto:mcp@stripe.com). | Resource | Tool | Description | | --- | --- | --- | | **API tools** | `stripe_api_search` | Search for Stripe API methods by keyword | | `stripe_api_details` | Get detailed parameter information for a specific Stripe API method. | | `stripe_api_read` | Read data with any Stripe API `GET` method | | `stripe_api_write` | Write data with any Stripe API `POST`, `PATCH`, `PUT` and `DELETE` method | | **Account** | `get_stripe_account_info` | [Retrieve account](https://docs.stripe.com/api/accounts/retrieve.md) | | **Refund** | `create_refund` | [Create refund](https://docs.stripe.com/api/refunds/create.md) | | **Treasury** (Public preview) | `get_balance_summary` | Displays an interactive balance summary across the Stripe balance and Treasury accounts | | **Others** | `search_stripe_resources` | [Search Stripe resources](https://docs.stripe.com/search.md) | | `fetch_stripe_resources` | Fetch Stripe object | | `search_stripe_documentation` | Search the Stripe documentation for the given question and language | | `stripe_implementation_planner` | Guides the user through Stripe products to help users accept payments, sell products online, set up billing, or build any Stripe integration | | `send_stripe_mcp_feedback` | Submit feedback from user or agent about Stripe’s MCP server tools | | `stripe_report` | Search, retrieve and create reports and report runs | The Stripe MCP server exposes multiple APIs that you can call with the `stripe_api_read` and `stripe_api_write` tools. This access makes much of the API available through MCP without increasing the context window unnecessarily. ### Supported API methods - [List all customers](https://docs.stripe.com/api/customers/list.md) - [Retrieve a customer](https://docs.stripe.com/api/customers/retrieve.md) - [Create a customer](https://docs.stripe.com/api/customers/create.md) - [List all charges](https://docs.stripe.com/api/charges/list.md) - [Retrieve a charge](https://docs.stripe.com/api/charges/retrieve.md) - [List all refunds](https://docs.stripe.com/api/refunds/list.md) - [Create refund](https://docs.stripe.com/api/refunds/create.md) - [List all PaymentIntents](https://docs.stripe.com/api/payment_intents/list.md) - [Retrieve a PaymentIntent](https://docs.stripe.com/api/payment_intents/retrieve.md) - [List all Checkout Sessions](https://docs.stripe.com/api/checkout/sessions/list.md) - [Retrieve a Checkout Session](https://docs.stripe.com/api/checkout/sessions/retrieve.md) - [List all invoices](https://docs.stripe.com/api/invoices/list.md) - [Retrieve an invoice](https://docs.stripe.com/api/invoices/retrieve.md) - [Create an invoice](https://docs.stripe.com/api/invoices/create.md) - [Finalize an invoice](https://docs.stripe.com/api/invoices/finalize.md) - [Create an invoice item](https://docs.stripe.com/api/invoiceitems/create.md) - [List subscriptions](https://docs.stripe.com/api/subscriptions/list.md) - [Retrieve a subscription](https://docs.stripe.com/api/subscriptions/retrieve.md) - [Update a subscription](https://docs.stripe.com/api/subscriptions/update.md) - [Cancel a subscription](https://docs.stripe.com/api/subscriptions/cancel.md) - [List all coupons](https://docs.stripe.com/api/coupons/list.md) - [Retrieve a coupon](https://docs.stripe.com/api/coupons/retrieve.md) - [Create a coupon](https://docs.stripe.com/api/coupons/create.md) - [Update a coupon](https://docs.stripe.com/api/coupons/update.md) - [Delete a coupon](https://docs.stripe.com/api/coupons/delete.md) - [List all promotion codes](https://docs.stripe.com/api/promotion_codes/list.md) - [Create a promotion code](https://docs.stripe.com/api/promotion_codes/create.md) - [List all products](https://docs.stripe.com/api/products/list.md) - [Create a product](https://docs.stripe.com/api/products/create.md) - [Update a product](https://docs.stripe.com/api/products/update.md) - [List all prices](https://docs.stripe.com/api/prices/list.md) - [Retrieve a price](https://docs.stripe.com/api/prices/retrieve.md) - [Create a price](https://docs.stripe.com/api/prices/create.md) - [Update a price](https://docs.stripe.com/api/prices/update.md) - [List all payment links](https://docs.stripe.com/api/payment_links/list.md) - [Retrieve payment link](https://docs.stripe.com/api/payment_links/retrieve.md) - [Retrieve a payment link’s line items](https://docs.stripe.com/api/payment_links/line_items.md) - [Create a payment link](https://docs.stripe.com/api/payment_links/create.md) - [Update a payment link](https://docs.stripe.com/api/payment_links/update.md) - [List all disputes](https://docs.stripe.com/api/disputes/list.md) - [Update a dispute](https://docs.stripe.com/api/disputes/update.md) - [List portal configurations](https://docs.stripe.com/api/billing_portal/configurations/list.md) - [Retrieve balance](https://docs.stripe.com/api/balance/retrieve.md) - [Retrieve tax settings](https://docs.stripe.com/api/tax/settings/retrieve.md) - [Update tax settings](https://docs.stripe.com/api/tax/settings/update.md) - [List all tax codes](https://docs.stripe.com/api/tax_codes/list.md) - [Retrieve a tax code](https://docs.stripe.com/api/tax_codes/retrieve.md) - [List all balance transactions](https://docs.stripe.com/api/balance_transactions/list.md) - [Retrieve a balance transaction](https://docs.stripe.com/api/balance_transactions/retrieve.md) - [List all payouts](https://docs.stripe.com/api/payouts/list.md) - [Retrieve a payout](https://docs.stripe.com/api/payouts/retrieve.md) - [List all authorizations](https://docs.stripe.com/api/issuing/authorizations/list.md) - [Retrieve an authorization](https://docs.stripe.com/api/issuing/authorizations/retrieve.md) - [List all cardholders](https://docs.stripe.com/api/issuing/cardholders/list.md) - [Retrieve a cardholder](https://docs.stripe.com/api/issuing/cardholders/retrieve.md) - [List all cards](https://docs.stripe.com/api/issuing/cards/list.md) - [Retrieve a card](https://docs.stripe.com/api/issuing/cards/retrieve.md) - [List all disputes](https://docs.stripe.com/api/issuing/disputes/list.md) - [Retrieve a dispute](https://docs.stripe.com/api/issuing/disputes/retrieve.md) - [List all transactions](https://docs.stripe.com/api/issuing/transactions/list.md) - [Retrieve a transaction](https://docs.stripe.com/api/issuing/transactions/retrieve.md) - [List accounts](https://docs.stripe.com/api/v2/core/accounts/list.md) - [Retrieve an account](https://docs.stripe.com/api/v2/core/accounts/retrieve.md) - [List Adjustments](https://docs.stripe.com/api/v2/money-management/adjustments/list.md?api-version=2026-05-27.preview) - [Retrieve an Adjustment](https://docs.stripe.com/api/v2/money-management/adjustments/retrieve.md?api-version=2026-05-27.preview) - [List Financial Accounts](https://docs.stripe.com/api/v2/money-management/financial-accounts/list.md?api-version=2026-05-27.preview) - [Retrieve a Financial Account](https://docs.stripe.com/api/v2/money-management/financial-accounts/retrieve.md?api-version=2026-05-27.preview) - [List Financial Addresses](https://docs.stripe.com/api/v2/money-management/financial-addresses/list.md?api-version=2026-05-27.preview) - [Retrieve a Financial Address](https://docs.stripe.com/api/v2/money-management/financial-addresses/retrieve.md?api-version=2026-05-27.preview) - [List Inbound Transfers](https://docs.stripe.com/api/v2/money-management/inbound-transfers/list.md?api-version=2026-05-27.preview) - [Retrieve an Inbound Transfer](https://docs.stripe.com/api/v2/money-management/inbound-transfers/retrieve.md?api-version=2026-05-27.preview) - [Retrieve an Outbound Payment Quote](https://docs.stripe.com/api/v2/money-management/outbound-payment-quotes/retrieve.md?api-version=2026-05-27.preview) - [List Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments/list.md?api-version=2026-05-27.preview) - [Retrieve an Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/retrieve.md?api-version=2026-05-27.preview) - [List Outbound Setup Intents](https://docs.stripe.com/api/v2/money-management/outbound-setup-intents/list.md?api-version=2026-05-27.preview) - [Retrieve an Outbound Setup Intent](https://docs.stripe.com/api/v2/money-management/outbound-setup-intents/retrieve.md?api-version=2026-05-27.preview) - [List Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers/list.md?api-version=2026-05-27.preview) - [Retrieve an Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/retrieve.md?api-version=2026-05-27.preview) - [List Payout Methods](https://docs.stripe.com/api/v2/money-management/payout-methods/list.md?api-version=2026-05-27.preview) - [Retrieve a Payout Method](https://docs.stripe.com/api/v2/money-management/payout-methods/retrieve.md?api-version=2026-05-27.preview) - [Retrieve Bank Account Specification](https://docs.stripe.com/api/v2/money-management/payout-methods-bank-account-specs/retrieve.md?api-version=2026-05-27.preview) - [List Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits/list.md?api-version=2026-05-27.preview) - [Retrieve a Received Credit](https://docs.stripe.com/api/v2/money-management/received-credits/retrieve.md?api-version=2026-05-27.preview) - [List Received Debits](https://docs.stripe.com/api/v2/money-management/received-debits/list.md?api-version=2026-05-27.preview) - [Retrieve a Received Debit](https://docs.stripe.com/api/v2/money-management/received-debits/retrieve.md?api-version=2026-05-27.preview) - [List Transaction Entries](https://docs.stripe.com/api/v2/money-management/transaction-entries/list.md?api-version=2026-05-27.preview) - [Retrieve a Transaction Entry](https://docs.stripe.com/api/v2/money-management/transaction-entries/retrieve.md?api-version=2026-05-27.preview) - [List Transactions](https://docs.stripe.com/api/v2/money-management/transactions/list.md?api-version=2026-05-27.preview) - [Retrieve a Transaction](https://docs.stripe.com/api/v2/money-management/transactions/retrieve.md?api-version=2026-05-27.preview) ## Support for connected accounts Connect platforms can make MCP calls as their connected accounts. However, you can’t use OAuth. Instead, use [restricted access keys](https://docs.stripe.com/keys/restricted-api-keys.md#create-a-restricted-api-key) with the appropriate Connect permissions. To make an MCP call as a connected account, pass the `Stripe-Account` header. This is useful when you provide an agent that allows your connected accounts to make MCP calls through your platform. ```json { "mcpServers": { "stripe": { "url": "https://mcp.stripe.com", "headers": { "Authorization": "Bearer rk_.....", "Stripe-Account": "acct_xxxxxxxxx" } } } } ``` ## Agentic finance with Treasury You can extend the Stripe MCP server with Treasury tools that let your AI agent move money, pay bills, and create and manage cards. ### Interested in agentic finance with Treasury? Enter your email to request access. ```bash curl https://docs.stripe.com/preview/register \ -X POST \ -H "Content-Type: application/json" \ -H "Referer: https://docs.stripe.com/mcp" \ -d '{"email": "EMAIL", "preview": "agentic_treasury_preview"}' ``` ## See also - [Build on Stripe with AI](https://docs.stripe.com/agents.md) - [Stripe skills](https://docs.stripe.com/skills.md)