Blog

Stripe MCP: connect Stripe to Claude and agents

T. Krause · · updated

Stripe MCP is Stripe's own MCP server. Stripe hosts it at https://mcp.stripe.com. It gives an AI agent tools to read and write data through the Stripe API and to search Stripe's documentation and support articles. To connect it, add that URL to an MCP client such as Claude Code, Cursor, VS Code or Codex. The client opens Stripe's OAuth consent page, where you choose which accounts and sandboxes it may use. A client that can't sign in with OAuth sends an agent API key instead. For your own account in a coding agent, that is the whole setup.

There is nothing to run on your machine. Older guides start the server locally with npx @stripe/mcp and a secret key, but Stripe has deprecated that package. From January 11, 2027, the hosted server also stops accepting secret keys and restricted keys that don't carry the Agent tag.

An agent you build and run for other people is a different job. Each user has to connect their own Stripe account, the keys have to be stored somewhere other than the agent's config, and you may want a refund to wait for a person. This guide sets up Stripe's server first. Then it covers when a tool layer fits better, and connects Stripe to Prompt TM for that case. The Stripe details below come from docs.stripe.com and Stripe's GitHub, checked on December 2, 2026.

What Stripe's MCP server does

Per Stripe's MCP docs, the server "provides tools that AI agents can use to interact with the Stripe API and search the Stripe knowledge base, including documentation and support articles". It runs on Stripe's side over HTTP.

Most of the API sits behind four tools. stripe_api_search and stripe_api_details find an API method and its parameters, stripe_api_read calls "any Stripe API GET method", and stripe_api_write calls any POST, PATCH, PUT and DELETE method. Stripe's docs list the supported methods: customers, payments, invoices, subscriptions, products and prices, payment links, disputes, refunds, payouts, tax and more. The other tools on Stripe's list:

ToolWhat it does, per Stripe
get_stripe_account_infoRetrieves the account
search_stripe_documentationSearches the Stripe documentation
stripe_implementation_plannerGuides you through Stripe products for payments, billing or an integration
send_stripe_feedbackShares feedback about Stripe's products
atlas_company_formationPrepares or resumes an Atlas application for a Delaware C corporation or LLC
stripe_analyticsPublic preview. Queries metrics and reports, and builds SQL queries from plain language
get_balance_summary, setup_recipient, send_money, transfer_money, convert_currencyPublic preview. Shows Treasury balances, sets up recipients and moves money. Sending, transferring and converting need Human confirmation
stripe_directory_searchPrivate preview. Searches businesses and service providers on the Stripe Network

Some actions need a person even when the agent calls them. Stripe marks them "Human confirmation", for example creating a refund. The agent gets a link, you approve the request in the Dashboard, and then you tell the agent to retry. An approval you don't give within 24 hours expires. Stripe also asks you to turn on your client's own tool-approval setting and to take care when Stripe MCP runs next to other servers, because of prompt injection.

The server takes two kinds of sign-in. OAuth is for when "a client accesses Stripe on behalf of your Stripe user account". On Stripe's consent page you can grant access to one or more live mode accounts or sandboxes, with different permissions for each. OAuth refresh tokens expire after 14 days. Refreshing doesn't extend the session past 14 days from the first sign-in, so after that you reconnect the client. An agent API key is for when "an AI application needs independent, persistent access to Stripe", and the client sends it as a bearer token.

Your authorized clients appear under OAuth sessions in your Stripe user settings, where you can revoke each one. An administrator can turn MCP access on or off for the whole team in the Dashboard, separately for live mode and sandboxes.

Set up Stripe MCP in Claude Code, Cursor and other clients

With Stripe's plugin. Stripe recommends its agent plugins, which set up the MCP server and Stripe's skills and keep them updated. First install the Stripe CLI. On macOS or Linux, Stripe's install script does it:

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

Then open a new terminal and run:

stripe agent setup

The command detects which agents you use and runs the matching setup for each. If your client has no Stripe plugin, or you'd rather configure it yourself, add the server by hand as below.

Claude Code. One command adds the server:

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

Then start Claude Code and run /mcp to sign in to Stripe with OAuth. Scopes and common errors are covered in Claude Code MCP server setup. To use an agent API key instead, Stripe's docs put the server in the project's .mcp.json and read the key from an environment variable, so the key never goes on the command line:

{
  "mcpServers": {
    "stripe": {
      "type": "http",
      "url": "https://mcp.stripe.com",
      "headers": { "Authorization": "Bearer ${AGENT_API_KEY}" }
    }
  }
}

AGENT_API_KEY stands for the name of the environment variable that holds your key.

Cursor. Use the Install in Cursor button in Stripe's docs, or put this in ~/.cursor/mcp.json:

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

VS Code. Use the Install in VS Code button, or put this in .vscode/mcp.json in your workspace:

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

Codex. Run codex mcp add stripe --url https://mcp.stripe.com. The ChatGPT desktop app, the Codex CLI and the Codex IDE extension share that configuration, so you sign in once. For an agent API key, add bearer_token_env_var = "AGENT_API_KEY" to the [mcp_servers.stripe] table in the config, with the name of your environment variable as the value.

Claude Desktop and claude.ai. Install the official Stripe connector from Claude's directory. Select Connect to Claude, sign in to Stripe and grant permissions in the OAuth window. Then, in a conversation, open the plus menu, choose Connectors and turn on Stripe. On Team and Enterprise plans, an owner has to add the connector to the workspace before members can connect their Stripe accounts.

ChatGPT. Install the official Stripe plugin and connect your Stripe account in the OAuth window.

Other clients. Follow the client's MCP setup with https://mcp.stripe.com as the URL. Use OAuth if the client supports it. If not, send an agent API key as a bearer token in the Authorization header.

If it doesn't connect. On a device or network your company manages, IT may block external MCP servers, and Stripe's advice is to ask them to allow mcp.stripe.com. If it connected before and now fails, the 14-day OAuth session may have run out, so sign in again.

Agent API keys and the January 11, 2027 change

An agent API key is a restricted key that you tag for agent use. When you create it, select Authorizing agent access to your account. The Dashboard marks these keys with an Agent badge. Per Stripe's key docs, agent-tagged keys "work the same as other restricted API keys for authentication and permissions". What changes is that Stripe's approval rules apply to them automatically, with default rules for payouts, refunds and account configuration changes. Give the key only the permissions the client needs.

Stripe MCP is dropping the other keys. Per the MCP docs, "Starting January 11, 2027, Stripe MCP will no longer accept full-access secret keys or non-agent restricted API keys." A request with one of them gets a 401 with an OAuth discovery challenge. If your client still sends an sk_live_ key or an untagged rk_live_ key to mcp.stripe.com, replace it with an agent key or reconnect with OAuth before that date. Stripe suggests testing the new key in a sandbox first, then expiring the old one.

The old @stripe/mcp package

Older guides run Stripe's MCP server locally with npx @stripe/mcp and a secret key. The README of Stripe's AI repository now lists @stripe/mcp and @stripe/agent-toolkit as deprecated packages that "will receive no further updates, including security fixes". It points to the hosted server instead. For a new setup, use mcp.stripe.com.

When an agent should reach Stripe through a tool layer

Stripe's server suits a person working in their own account through a client that already speaks MCP and OAuth. A few cases call for something between the agent and Stripe.

The agent serves your users. A support agent, a billing assistant or an internal tool that several people use may each need a different Stripe account. Someone has to collect each account's key, store it and pick the right one per call. With Stripe's server and a key, the key sits in the client's environment on the machine that runs the agent.

If your users are connected accounts on your Stripe Connect platform, Stripe's server can act for them. You authenticate with your platform's agent API key, grant it only the connected-account permissions the agent needs, and pass the account ID in a Stripe-Account header. Stripe's docs note that MCP "doesn't support OAuth when acting on behalf of connected accounts". Users with their own, separate Stripe accounts still need a key each.

You want fewer tools. stripe_api_write covers every write the API allows, from updating a customer to cancelling a subscription. Stripe notes that a client "displays tool names that can group multiple actions", so the tool name alone doesn't say which write it is. To give the agent five operations and nothing else, you need tools that each do one thing.

You want your own approvals. Stripe's Human confirmation covers the actions Stripe picks, on Stripe's side. A tool layer can hold every write, or only the ones that move money, and send the approval to your app.

Stripe is one app of several. An agent that also works in GitHub, Slack or Notion needs a credential store and a connect flow for each of them.

You wantUse
Your own Stripe account in Claude Code, Cursor, Codex or ClaudeStripe's hosted server, one command and a sign-in
A headless agent on your own accountStripe's hosted server with an agent API key
An agent for the connected accounts of your Connect platformStripe's hosted server with your platform's agent API key and the Stripe-Account header
An agent that acts in your users' own Stripe accounts, with a fixed tool list and approvals, next to other appsStripe's REST API behind a server that keeps the keys (below)

Connect Stripe to Prompt TM

Prompt TM serves Stripe tools at one MCP URL, alongside any other toolkits you add. It calls Stripe's REST API, not Stripe MCP, with a key it stores encrypted. The agent calls a tool such as STRIPE_LIST_INVOICES, Prompt TM adds the key to the request, and the agent gets the result without ever seeing the key.

The Stripe toolkit takes an API key: a secret key (sk_…) or a restricted key (rk_…). There is no Stripe OAuth sign-in. Use a restricted key and give it only the permissions the agent needs. Per Stripe's restricted key guide, each resource gets None, Read or Write, and write includes read. Start with a sandbox key (rk_test_… or sk_test_…) so nothing real is charged or refunded. An agent-tagged restricted key works too, and then Stripe's own approval rules apply on top of Prompt TM's.

1. Add an auth config for Stripe. In the dashboard, open Auth configs → New, choose Stripe and API key. Or with the API:

curl -X POST https://www.prompt-tm.com/api/v3/auth_configs \
  -H "x-api-key: $PROMPT_TM_KEY" -H "content-type: application/json" \
  -d '{ "toolkit": { "slug": "stripe" }, "auth_config": { "auth_scheme": "API_KEY" } }'

2. Connect an account. With a key you already hold:

curl -X POST https://www.prompt-tm.com/api/v3/connected_accounts \
  -H "x-api-key: $PROMPT_TM_KEY" -H "content-type: application/json" \
  -d '{ "auth_config": { "id": "ac_..." }, "user_id": "me",
        "connection": { "data": { "api_key": "rk_test_..." } } }'

Prompt TM checks the key with Stripe before saving it, by asking Stripe which account the key belongs to. A rejected key answers 400 and the account is FAILED. For your users' accounts, POST /api/v3/connected_accounts/link returns a connect link on prompt-tm.com with a form for the key. Each user pastes their own key there, and it never passes through your app or the agent. The link expires after one hour. More in the authentication docs.

3. Create an MCP server. In MCP servers → New, choose Custom, tick Stripe, and under Only some tools pick the tools the agent should see. Copy the server URL.

4. Add it to Claude Code.

claude mcp add --transport http prompt-tm-stripe \
  "https://www.prompt-tm.com/mcp/mcp_...?user_id=me" \
  --header "x-api-key: $PROMPT_TM_KEY"

The name prompt-tm-stripe keeps this server apart from Stripe's own stripe server if you added that earlier. The user_id in the URL picks whose Stripe account the calls use.

Claude Desktop, claude.ai, Cursor, VS Code and the agent SDKs are in the MCP client docs. claude.ai signs in with OAuth on prompt-tm.com, so no key goes into the URL. Then ask something the tools can answer, such as "Which invoices for this customer are still open?"

What the agent can do once it's connected

The Stripe toolkit has 18 tools. Nine only read:

ToolWhat it does
STRIPE_LIST_CUSTOMERSLists customers, newest first, optionally filtered by exact email
STRIPE_GET_CUSTOMERReturns one customer: contact details, default payment method, balance and metadata
STRIPE_SEARCH_CUSTOMERSSearches customers with Stripe's query language, such as email:'a@b.com'
STRIPE_LIST_PAYMENT_INTENTSLists payments, newest first, optionally for one customer
STRIPE_GET_PAYMENT_INTENTReturns one payment: amount, currency, status, latest charge and customer
STRIPE_LIST_INVOICESLists invoices, filtered by customer, subscription or status
STRIPE_LIST_PRODUCTSLists products in the catalogue, optionally only active ones
STRIPE_LIST_SUBSCRIPTIONSLists subscriptions, filtered by customer, price or status
STRIPE_RETRIEVE_BALANCEReturns the available and pending balance per currency

Nine change the account:

ToolWhat it does
STRIPE_CREATE_CUSTOMERCreates a customer record
STRIPE_UPDATE_CUSTOMERChanges a customer's email, name, phone, description, address or metadata
STRIPE_CREATE_PAYMENT_LINKCreates a hosted checkout URL for existing prices
STRIPE_CREATE_INVOICECreates a draft invoice for a customer
STRIPE_FINALIZE_INVOICEMoves a draft invoice to open so it can be paid
STRIPE_CREATE_PRODUCTCreates a product, optionally with its default price
STRIPE_CREATE_PRICECreates a one-time or recurring price for a product
STRIPE_CANCEL_SUBSCRIPTIONCancels a subscription immediately, which can't be undone
STRIPE_CREATE_REFUNDRefunds a payment in full or in part, which moves money and can't be reversed

That is a smaller set than Stripe's server reaches through stripe_api_read and stripe_api_write. Disputes, payouts, coupons and tax have no tool here. The Stripe toolkit page lists every input. For a call these tools don't cover, the REST proxy, POST /api/v3/tools/execute/proxy, sends the request to Stripe with the same key. It form-encodes the body of a POST, the way Stripe requires, so metadata and line_items can nest. Stripe rejects a restricted key that lacks the permission for that endpoint.

Limit what the agent can touch

The key. A restricted key can do only what its permissions allow. Stripe answers any other request with an error. Give read-only permissions if the agent only answers questions.

The tool list. A custom MCP server shows only the tools you ticked. To block the rest everywhere, set restrict_to_following_tools on the auth config. Accounts connected through it can then call only those tools, and the proxy answers 403 for them.

Approvals. Set the MCP server's approvals to Ask a person before destructive calls to hold STRIPE_CANCEL_SUBSCRIPTION and STRIPE_CREATE_REFUND, or to Ask a person before any call that changes something to hold all nine writes. A held call returns approval_required: true and does nothing yet. The approval link goes to your webhook and to the server's page in the dashboard, never to the agent, so the agent can't approve its own call. Details are in the router docs.

The log. Each call appears under Logs with the tool, the user and the outcome.

To put Stripe in a router with the rest of the catalogue instead of a fixed tool list, see tool router vs fixed tools. Prompt TM is free during early access, with 20,000 tool calls per project per month. To try it, create a free project and connect a Stripe sandbox with a restricted test key.

Cookies and analytics

Prompt TM's own cookies only keep you signed in and remember the project you last opened. Accepting turns on Google Analytics on the public pages, so we can count visits and see which pages get read. It never runs in the dashboard, and it does not load until you choose.

Read the privacy notice