Ad space · Your tool here
PluginStack
Setup guide

How to set up the Stripe MCP server in Claude Code, Cursor, VS Code and Codex

Checked against the official docs:

Stripe's official MCP server lets an AI assistant work with the Stripe API and search Stripe's documentation and support articles. The hosted URL is https://mcp.stripe.com. The recommended setup is a Stripe agent plugin, which configures the server, installs Stripe's skills and keeps them up to date. You can also add the URL by hand and sign in with OAuth, or use an agent API key for clients that cannot use OAuth. This guide covers Claude Code, Cursor, VS Code and Codex, how access and sessions work, and the errors people hit most. It is based on Stripe's MCP and agent plugin docs (checked 24 November 2026).

Get new guides by email

New MCP servers and agent tools, checked by hand. Free, unsubscribe anytime.

The newsletter hasn't started sending yet. Join the list now and we'll email you when the first issue goes out. From PluginStack (pluginstackai@gmail.com). Privacy policy.

Quick answer

  • Hosted URL: https://mcp.stripe.com. There is nothing to install for the server itself.
  • Recommended: install the Stripe CLI, then run stripe agent setup. It detects the agents on your machine and configures the plugin, MCP server and skills.
  • Or install the plugin for one client: Claude Code: claude plugin install stripe@anthropic-plugin-directory. Codex: codex plugin add stripe@openai-curated. Cursor: /add-plugin stripe in chat.
  • Or add the URL by hand and sign in with OAuth (examples below for Cursor, Claude Code, VS Code and Codex).
  • OAuth sessions last 14 days from the first authorization. After that, reconnect and authorize again. You can grant access to live-mode accounts or sandboxes and set different permissions for each.
  • If the client cannot use OAuth, use a Stripe agent API key as a Bearer token. From 11 January 2027, Stripe MCP will no longer accept full-access secret keys or non-agent restricted keys.

Free: MCP Starter Checklist

One page: Inspector smoke-test, Claude Code + Cursor connect steps, and the stdout gotcha. Join the list and download it free.

Markdown download + occasional PluginStack updates. No spam. Privacy policy.

Before you start

  • You need a Stripe account. Start in a sandbox while you are testing. An administrator can enable or disable MCP access for the whole team in the Dashboard, separately for live mode and sandboxes.
  • The assistant can read and change Stripe data within the permissions you grant, including creating customers, invoices and subscriptions, and (with confirmation) refunds. Turn on your client's tool-approval setting, and review write calls before they run.
  • Some write actions need an extra confirmation in Stripe, such as creating a refund. Your client will give you a URL to review. After you click Approve, tell the assistant to retry the operation. If you do not approve it within 24 hours, it expires.
  • Do not put API keys in a config file you might commit. If you use an agent API key, store it in an environment variable and reference the variable name in the config.

Option 1: Stripe CLI agent setup (recommended)

Stripe's agent plugins configure the MCP server, install skills and keep them up to date. Automatic plugin support is listed for Claude Code, Codex, Cursor, Grok, Kiro and OpenClaw. The CLI can also install skills for other agents.

Install the Stripe CLI with the official script (script installs enable automatic updates by default). On macOS or Linux:

bash
curl -fsSL https://cli.stripe.com/install.sh | sh
export PATH="$HOME/.stripe/bin:$PATH"

On Windows, in PowerShell:

powershell
irm https://cli.stripe.com/install.ps1 | iex

Open a new terminal so your PATH includes the CLI, then run:

bash
stripe agent setup

The command detects which agents you use and runs the matching setup. To install a plugin yourself instead:

  • Claude Code (in your project directory): claude plugin install stripe@anthropic-plugin-directory
  • Codex (in your project directory): codex plugin add stripe@openai-curated
  • Cursor (in chat): /add-plugin stripe

If there is no plugin for your client, stripe agent setup can still install skills, and you can add the MCP server manually as below. Stripe's plugin docs: Agent plugins for Stripe.

Option 2: add the server manually

Cursor

Stripe's docs include an Install in Cursor button. To configure it by hand, add this to ~/.cursor/mcp.json:

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

Save the file, enable the server in Cursor, and complete Stripe's OAuth sign-in. More Cursor context: how to add an MCP server to Cursor.

Claude Code

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

Start Claude Code and run /mcp to authenticate with OAuth. To use an agent API key instead, add the server to the project .mcp.json and read the key from an environment variable. In this official example, AGENT_API_KEY is a placeholder for your variable name; set that variable in your shell before starting Claude Code, and do not pass the key on the command line:

Project .mcp.json (agent API key)
json
{
  "mcpServers": {
    "stripe": {
      "type": "http",
      "url": "https://mcp.stripe.com",
      "headers": {
        "Authorization": "Bearer ${AGENT_API_KEY}"
      }
    }
  }
}

VS Code

Stripe's docs include an Install in VS Code button. To configure it by hand, add this to .vscode/mcp.json in your workspace:

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

More VS Code context: how to add an MCP server to VS Code.

Codex

bash
codex mcp add stripe --url https://mcp.stripe.com

The ChatGPT desktop app, Codex CLI and Codex IDE extension share this configuration, so after you authenticate you can switch between them without adding the server again. To use an agent API key instead of OAuth, set bearer_token_env_var to the name of an environment variable (not the key itself):

Codex config.toml (agent API key)
text
[mcp_servers.stripe]
url = "https://mcp.stripe.com"
bearer_token_env_var = "AGENT_API_KEY"

More Codex context: how to add an MCP server to Codex.

OAuth, keys and sessions

Use OAuth for interactive clients. When you connect, Stripe opens a consent page. You can grant access to one or more live-mode accounts or sandboxes and set different permissions for each environment.

OAuth refresh tokens expire after 14 days, and refreshing them does not extend the session past 14 days from the original authorization. When it expires, reconnect the client and authorize again. Your authorized clients appear under OAuth sessions in your Stripe user settings; you can revoke one from the overflow menu. Administrators with permission to manage team members can view or revoke another user's sessions in Team and security. Revoking only applies to the account and environment (live mode or a sandbox) you are currently viewing.

Use an agent API key when a client cannot use OAuth, or when an application needs its own persistent access. In the Dashboard, agent API keys have an Agent badge. Give the key only the permissions the client needs. Pass it as Authorization: Bearer <key>. If you are replacing a key, test the new config in a sandbox, then expire the old key.

From 11 January 2027, Stripe MCP will no longer accept full-access secret keys or restricted API keys that are not agent keys. Migrate to an agent API key or to OAuth before that date. Requests with an unsupported key get a 401 response with an OAuth discovery challenge.

What the assistant can do

The server exposes tools to search Stripe API methods, get parameter details, and read or write Stripe data through supported API methods (customers, charges, refunds, PaymentIntents, invoices, subscriptions, products, prices and more). It can also search Stripe documentation, retrieve account info, and help plan an integration. Some actions, including creating a refund, require the human confirmation step described above. The official tool list is in Stripe's MCP docs.

A first prompt to try in a sandbox: "List my most recent customers in the sandbox." Keep approval on, and do not test refunds or payouts on live mode until you are sure the confirmations work the way you expect.

Common errors and fixes

The server will not connect

  • Complete the OAuth sign-in in the browser. If the window was blocked or closed, remove the server and add it again, or reconnect from /mcp in Claude Code.
  • If you are on a managed device or network, your IT team may need to allow mcp.stripe.com.
  • If you are a member of a Claude Team or Enterprise workspace, an owner must add the Stripe connector to the workspace before you can connect.
  • An administrator may have disabled MCP access for your team in that environment (live mode or sandbox).

The assistant was connected, then suddenly cannot call Stripe

OAuth sessions expire 14 days after you first authorized. Reconnect the client and authorize again. Check OAuth sessions in Stripe if a session was revoked.

Authentication fails with an API key

  • Use an agent API key, not a full-access secret key or an ordinary restricted key (those stop working with Stripe MCP on 11 January 2027).
  • Put the key in an environment variable and reference the variable in the config. Restart the client after you set the variable so it can see it.
  • Test a new key in a sandbox before you expire the old one.

A refund or other write seems stuck

Some actions wait for you to open the confirmation URL and click Approve. Then tell the assistant to retry. Approvals expire after 24 hours. Confirmation depends on the action, not only the tool name (for example stripe_api_write covers more than refunds).

FAQ

Should I use the plugin or only add the URL?

Use the plugin (or stripe agent setup) where you can. You get the MCP server plus Stripe's skills, and Stripe keeps them current. Adding only the URL still gives the assistant the API and docs tools; you just miss the bundled skills unless you install them another way.

Is it safe to connect this to a live Stripe account?

It can be, if you grant narrow permissions, keep tool approval on, and use human confirmation for money-moving actions. Prefer a sandbox until the setup is proven. You can revoke a session from OAuth sessions, and administrators can turn MCP off for the team.

Can I use this with connected Stripe accounts?

Yes, as a Connect platform, but not with OAuth for the connected account. Stripe says to authenticate with an agent API key for your platform and pass a Stripe-Account header. See the official MCP docs for that layout if you need it.

Sources

Commands and config above come from these official docs. Tools change often, so check them for the latest steps.

PluginStack is independent and not affiliated with or endorsed by the companies mentioned. Spotted something out of date? Email pluginstackai@gmail.com.

Get new guides by email

New MCP servers and agent tools, checked by hand. Free, unsubscribe anytime.

The newsletter hasn't started sending yet. Join the list now and we'll email you when the first issue goes out. From PluginStack (pluginstackai@gmail.com). Privacy policy.