# 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 tools that AI agents can use to interact with the Stripe API and search Stripe’s knowledge base, including documentation and support articles.

## Set up Stripe MCP with a plugin  (Recommended)

[Agent plugins](https://docs.stripe.com/agents/plugin.md) for Stripe automatically configure the Stripe MCP server, install our [skills](https://docs.stripe.com/skills.md), and make sure they’re up-to-date. You get our latest capabilities without configuration or maintenance.

To install, run:

```bash
npm install -g @stripe/cli@latest
stripe agent setup
```

This command automatically detects which agents you use, and runs the applicable commands.

## Manually set up Stripe MCP 

If your MCP client doesn’t support [agent plugins](https://docs.stripe.com/agents/plugin.md) for Stripe, or you prefer to configure the Stripe MCP server and install the skills manually, follow these instructions:

#### Cursor

[Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=stripe&config=eyJ1cmwiOiJodHRwczovL21jcC5zdHJpcGUuY29tIn0%3D)

Select **Install in Cursor** to open Cursor and add the Stripe MCP server. To configure it manually, add the following configuration to `~/.cursor/mcp.json`.

For more information, see [Cursor’s MCP documentation](https://docs.cursor.com/context/model-context-protocol).

```json
{
 "mcpServers": {
   "stripe": {
     "url": "https://mcp.stripe.com"
   }
 }
}
```

#### Claude Code

Run the following command to add the Stripe MCP server to Claude Code:

```bash
claude mcp add --transport http stripe https://mcp.stripe.com/
```

After you add the server, authenticate Stripe with OAuth.

```bash
claude /mcp
```

To authenticate with a restricted API key instead of OAuth, use the `--header` option:

```bash
claude mcp add --transport http stripe https://mcp.stripe.com/ --header 'Authorization: Bearer <<YOUR_SECRET_KEY>>'
```

For more information, see [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#configure-mcp-servers).

#### ChatGPT and Codex

### ChatGPT

With a ChatGPT Plus, Pro, Business, Enterprise, or Education account, you can [install the Stripe plugin in ChatGPT](https://chatgpt.com/plugins/plugin_connector_690ab09fa43c8191bca40280e4563238).

### Codex CLI

To use the Stripe MCP server with the Codex CLI, add it to your `~/.codex/config.toml` file. To learn more, see the OpenAI [Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp).

```toml
[mcp_servers.stripe]
url = "https://mcp.stripe.com"
```

After you add the server, authenticate Stripe with OAuth.

```bash
codex mcp login stripe
```

To authenticate with a restricted API key instead of OAuth, set `bearer_token_env_var` to the name of an environment variable that holds your key. In this example, `STRIPE_API_KEY` is a placeholder, replace it with the actual name of your environment variable.

```toml
[mcp_servers.stripe]
url = "https://mcp.stripe.com"
bearer_token_env_var = "STRIPE_API_KEY" # Replace with the name of your environment variable
```

#### Other

### Install in 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)

Select **Install in VS Code** to open VS Code and add the Stripe MCP server. To configure it manually, add the following configuration to `.vscode/mcp.json` in your workspace.

See the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more information.

```json
{
 "servers": {
   "stripe": {
     "type": "http",
     "url": "https://mcp.stripe.com"
   }
 }
}
```

### Install from another MCP client

MCP is an open protocol supported by many clients. Follow your client’s MCP setup instructions and use `https://mcp.stripe.com` as the server URL.

Use OAuth when your client supports it. If your client doesn’t support OAuth, use a [restricted API key](https://docs.stripe.com/keys/restricted-api-keys.md) as a bearer token in the `Authorization` header. For example, if your client accepts a `headers` property, use the following configuration:

```json
{
 "stripe": {
   "url": "https://mcp.stripe.com",
   "headers": {
     "Authorization": "Bearer <restricted_api_key>"
   }
 }
}
```

## Manage MCP access and sessions 

Stripe’s MCP server uses OAuth to authorize clients according to the [MCP specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#2-1-1-oauth-grant-types). OAuth lets you grant and revoke access without sharing an API key with the client.

When you connect an MCP client, it opens Stripe’s OAuth consent page. Use this page to authorize the client to access your Stripe data. After you authorize an MCP client with OAuth, you can manage its session in the Stripe Dashboard.

If your organization manages your device or network, your IT administrator might block connections to external MCP servers. When the Stripe MCP server doesn’t connect in a managed environment, ask your IT department to allow `mcp.stripe.com`.

### Manage your sessions 

Your authorized MCP clients appear under **OAuth sessions** in your [user settings](https://dashboard.stripe.com/settings/user). To revoke a session:

1. Find the client in the **OAuth sessions** list.
2. Click the overflow menu (⋯).
3. Select **Revoke access**.

### Manage sessions as an administrator 

To view or revoke another user’s sessions, your role must include permissions to manage team members and OAuth sessions. The **Administrator** role includes these permissions.

1. Open [Team and security](https://dashboard.stripe.com/settings/team) in the Dashboard.
2. Select the team member you want to manage.
3. Find the **OAuth sessions** table.
4. To revoke one session, click its overflow menu and select **Revoke access**. To revoke every listed session, select **Revoke all**.

Session management applies only to the account or organization and environment—live mode or a sandbox—that you’re currently viewing. Revoking a session removes access only within that scope. The session remains active for accounts outside your current scope.

When you view an organization, the **Accounts** column shows the accounts associated with each session.

### Manage MCP access 

Administrators can [manage MCP access](https://dashboard.stripe.com/settings/mcp) in the Dashboard. Configure access separately for live mode and sandbox environments.

## Tools

The server exposes the following [MCP tools](https://modelcontextprotocol.io/docs/concepts/tools).

Enable human confirmation of tools and exercise 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) |
| **Analytics** (Private preview) | `stripe_analytics` | Query metrics, run SQL against reporting tables, or run pre-built templates |
| `show_metric_app` | Visually displays a Stripe analytics metric in a time-series line chart |
| `list_metrics` | List all available metrics that you can use with `stripe_analytics`, `explain_metric`, `show_metric_app`, and related tools |
| `explain_metric` | Fetch the Sigma query used to calculate a metric |
| `metric_drilldown` | View row-level data for a metric with a specific time range filter |
| **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_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 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)
- [Update a customer](https://docs.stripe.com/api/customers/update.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 for a charge](https://docs.stripe.com/api/refunds/list.md)
- [List all refunds](https://docs.stripe.com/api/refunds/list.md)
- [Retrieve a refund](https://docs.stripe.com/api/refunds/retrieve.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 PaymentMethods](https://docs.stripe.com/api/payment_methods/list.md)
- [Retrieve a PaymentMethod](https://docs.stripe.com/api/payment_methods/retrieve.md)
- [List a customer’s PaymentMethods](https://docs.stripe.com/api/payment_methods/list.md)
- [Retrieve a customer’s PaymentMethod](https://docs.stripe.com/api/payment_methods/retrieve.md)
- [List payment method configurations](https://docs.stripe.com/api/payment_method_configurations/list.md)
- [Retrieve a payment method configuration](https://docs.stripe.com/api/payment_method_configurations/retrieve.md)
- [List payment method domains](https://docs.stripe.com/api/payment_method_domains/list.md)
- [Create a payment method domain](https://docs.stripe.com/api/payment_method_domains/create.md)
- [List all SetupIntents](https://docs.stripe.com/api/setup_intents/list.md)
- [Retrieve a SetupIntent](https://docs.stripe.com/api/setup_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)
- [Retrieve a Checkout Session’s line items](https://docs.stripe.com/api/checkout/sessions/line_items.md)
- [Create a Checkout Session](https://docs.stripe.com/api/checkout/sessions/create.md)
- [List all invoices](https://docs.stripe.com/api/invoices/list.md)
- [Retrieve an invoice](https://docs.stripe.com/api/invoices/retrieve.md)
- [Retrieve an invoice’s line items](https://docs.stripe.com/api/invoice-line-item/retrieve.md)
- [Create an invoice](https://docs.stripe.com/api/invoices/create.md)
- [Update an invoice](https://docs.stripe.com/api/invoices/update.md)
- [Finalize an invoice](https://docs.stripe.com/api/invoices/finalize.md)
- [Mark an invoice as uncollectible](https://docs.stripe.com/api/invoices/mark_uncollectible.md)
- [Void an invoice](https://docs.stripe.com/api/invoices/void.md)
- [List all invoice items](https://docs.stripe.com/api/invoiceitems/list.md)
- [Retrieve an invoice item](https://docs.stripe.com/api/invoiceitems/retrieve.md)
- [Create an invoice item](https://docs.stripe.com/api/invoiceitems/create.md)
- [Update an invoice item](https://docs.stripe.com/api/invoiceitems/update.md)
- [List all payments for an invoice](https://docs.stripe.com/api/invoice-payment/list.md)
- [Create a preview invoice](https://docs.stripe.com/api/invoices/create_preview.md)
- [List all credit notes](https://docs.stripe.com/api/credit_notes/list.md)
- [List subscriptions](https://docs.stripe.com/api/subscriptions/list.md)
- [Retrieve a subscription](https://docs.stripe.com/api/subscriptions/retrieve.md)
- [Create a subscription](https://docs.stripe.com/api/subscriptions/create.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 schedules](https://docs.stripe.com/api/subscription_schedules/list.md)
- [Retrieve a schedule](https://docs.stripe.com/api/subscription_schedules/retrieve.md)
- [List all subscription items](https://docs.stripe.com/api/subscription_items/list.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)
- [Retrieve a promotion code](https://docs.stripe.com/api/promotion_codes/retrieve.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)
- [Retrieve a product](https://docs.stripe.com/api/products/retrieve.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)
- [Retrieve a dispute](https://docs.stripe.com/api/disputes/retrieve.md)
- [Update a dispute](https://docs.stripe.com/api/disputes/update.md)
- [List all webhook endpoints](https://docs.stripe.com/api/webhook_endpoints/list.md)
- [Retrieve a webhook endpoint](https://docs.stripe.com/api/webhook_endpoints/retrieve.md)
- [Create a webhook endpoint](https://docs.stripe.com/api/webhook_endpoints/create.md)
- [List portal configurations](https://docs.stripe.com/api/customer_portal/configurations/list.md)
- [Retrieve a portal configuration](https://docs.stripe.com/api/customer_portal/configurations/retrieve.md)
- [Create a portal configuration](https://docs.stripe.com/api/customer_portal/configurations/create.md)
- [Update a portal configuration](https://docs.stripe.com/api/customer_portal/configurations/update.md)
- [Create a portal session](https://docs.stripe.com/api/customer_portal/sessions/create.md)
- [List all application fees](https://docs.stripe.com/api/application_fees/list.md)
- [List all transfers](https://docs.stripe.com/api/transfers/list.md)
- [Retrieve a transfer](https://docs.stripe.com/api/transfers/retrieve.md)
- [List customer balance transactions](https://docs.stripe.com/api/customer_balance_transactions/list.md)
- [Retrieve a cash balance](https://docs.stripe.com/api/cash_balances/retrieve.md)
- [List cash balance transactions](https://docs.stripe.com/api/customer_cash_balance_transactions/list.md)
- [Create a test clock](https://docs.stripe.com/api/test_helpers/test_clocks/create.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 tax registrations](https://docs.stripe.com/api/tax/registrations/list.md)
- [Retrieve a tax registration](https://docs.stripe.com/api/tax/registrations/retrieve.md)
- [Create a tax registration](https://docs.stripe.com/api/tax/registrations/create.md)
- [Create a Metric Query Result](https://docs.stripe.com/api/v2/data/analytics/metric-query-results/create.md?api-version=2026-07-29.preview) (Private preview)
- [Create a Query Run](https://docs.stripe.com/api/v2/data/reporting/query-runs/create.md?api-version=2026-07-29.preview) (Public preview)
- [Create a tax calculation](https://docs.stripe.com/api/tax/calculations/create.md)
- [Retrieve a tax calculation](https://docs.stripe.com/api/tax/calculations/retrieve.md)
- [Retrieve a tax calculation’s line items](https://docs.stripe.com/api/tax/calculations/line_items.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)

## Use MCP with connected accounts 

By default, Stripe MCP tools operate on the Stripe account associated with your OAuth session or API key. If you only need your agent to work with your platform account, use the standard setup above.

If you’re a [Connect platform](https://docs.stripe.com/connect.md), you can also use MCP to retrieve or update resources for your connected accounts. For example, a support agent could retrieve a customer or investigate a payment for a specific connected account.

MCP doesn’t support OAuth when acting on behalf of connected accounts. Instead, authenticate with a [restricted API key](https://docs.stripe.com/keys/restricted-api-keys.md#create-a-restricted-api-key) for your platform and grant only the connected-account permissions that your agent needs.

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"
      }
    }
  }
}
```

## See also

- [Plugin for agents](https://docs.stripe.com/agents/plugin.md)
- [Agent skills](https://docs.stripe.com/skills.md)
