Stripe MCP server

Stripe MCP server

Stripe
GitHubnpm

About

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

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.

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

VS Code

Install in VS Code

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.

{
  "servers": {"stripe": {
      "type": "http",
      "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.

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

After adding the server to Claude, you must authenticate with Stripe.

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 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 Open AI’s response API, when building autonomous agents.

Other

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 in the Authorization header as a Bearer token. For example, a client might accept the following header property:

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

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. 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.

To view authorized OAuth client sessions navigate to your user settings 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.
  2. Find the client sessions in the list, and click the overflow menu.
  3. Select Revoke access.

Manage MCP access

Administrators can enable MCP access 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 to limit access to the functionality your agent requires. For example, you can use this authorization method with OpenAI’s Responses API.

curl https://mcp.stripe.com/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <<YOUR_SECRET_KEY>>" \
  -d '{
      "jsonrpc": "2.0",
      "method": "tools/call",
      "params": {
        "name": "create_customer",
        "arguments": {"name": "Jenny Rosen", "email": "jenny.rosen@example.com" }
      },
      "id": 1
  }'

Run a local MCP server

If you prefer or require a local setup, run the local Stripe MCP server.

Cursor

Install in Cursor

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.

{
  "mcpServers": {"stripe": {
      "command": "npx",
      "args": ["-y", "@stripe/mcp@latest"],
      "env": {
        "STRIPE_SECRET_KEY": "<<YOUR_SECRET_KEY>>"
      }
    }
  }
}

The code editor agent automatically detects all the available tools, calling the relevant tool when you post a related question in the chat.

VS Code

Install in VS Code

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.

{
  "servers": {"stripe": {
      "command": "npx",
      "args": ["-y", "@stripe/mcp@latest"],
      "env": {
        "STRIPE_SECRET_KEY": "<<YOUR_SECRET_KEY>>"
      }
    }
  }
}

Windsurf

Add the following to your ~/.codeium/windsurf/mcp_config.json file. To learn more, see the Windsurf documentation.

{
  "mcpServers": {"stripe": {
      "command": "npx",
      "args": ["-y", "@stripe/mcp@latest"],
      "env": {
        "STRIPE_SECRET_KEY": "<<YOUR_SECRET_KEY>>"
      }
    }
  }
}

Claude

Add the following to your claude_desktop_config.json file. To learn more, see the Claude Desktop documentation.

{
  "mcpServers": {"stripe": {
      "command": "npx",
      "args": ["-y", "@stripe/mcp@latest"],
      "env": {
        "STRIPE_SECRET_KEY": "<<YOUR_SECRET_KEY>>"
      }
    }
  }
}

CLI

Start the MCP server locally with this command:

npx -y @stripe/mcp@latest --api-key=<<YOUR_SECRET_KEY>>

The MCP server uses either the passed in --api-key or the STRIPE_SECRET_KEY environment variable.

Tools

The server exposes the following MCP 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.

ResourceToolAPI
Accountget_stripe_account_infoRetrieve account
Balanceretrieve_balanceRetrieve balance
Couponcreate_couponCreate coupon
list_couponsList coupons
Customercreate_customerCreate customer
list_customersList customers
Disputelist_disputesList disputes
update_disputeUpdate dispute
Invoicecreate_invoiceCreate invoice
create_invoice_itemCreate invoice item
finalize_invoiceFinalize invoice
list_invoicesList invoices
Payment Linkcreate_payment_linkCreate payment link
PaymentIntentlist_payment_intentsList PaymentIntents
Pricecreate_priceCreate price
list_pricesList prices
Productcreate_productCreate product
list_productsList products
Refundcreate_refundCreate refund
Subscriptioncancel_subscriptionCancel subscription
list_subscriptionsList subscriptions
update_subscriptionUpdate subscription
Otherssearch_stripe_resourcesSearch Stripe resources
fetch_stripe_resourcesFetch Stripe object
search_stripe_documentationSearch Stripe knowledge

See also

This server runs through your single 1Server connection. No extra config required.

0Installs
25Tools

Categories

Payment

Links

Tags

official