---
title: How to connect Stripe MCP to Claude Code
description: Add Stripe’s hosted server with claude mcp add and https://mcp.stripe.com/, then sign in with /mcp. Tools, refund approvals, agent keys and sharing.
canonical: https://mcp1.com/blog/stripe-mcp-claude-code
last-updated: 2026-11-19
---

# How to connect Stripe MCP to Claude Code

Add Stripe’s hosted server with claude mcp add and https://mcp.stripe.com/, then sign in with /mcp. Tools, refund approvals, agent keys and sharing.

![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite

 Terminal

$ claude mcp add --transport http stripe mcp.stripe.com

stripeSandboxConnected

 Terminal

$ claude mcp add --transport http stripe mcp.stripe.com

stripeSandboxConnected

To connect Stripe to Claude Code, add Stripe’s hosted MCP server with `claude mcp add --transport http stripe https://mcp.stripe.com/`, start Claude Code, run `/mcp` and authenticate. Stripe’s consent page lets you pick which accounts and sandboxes Claude Code can reach, with separate permissions for each. Claude Code can then read customers, payments and subscriptions, write through the API, and search Stripe’s docs.

## How do I add the Stripe MCP server to Claude Code?

Stripe hosts the server, so there is nothing to install:

1. 1Add the server:  
Terminal  
```  
claude mcp add --transport http stripe https://mcp.stripe.com/  
```
2. 2Start `claude`, run `/mcp`, select `stripe` and choose Authenticate.
3. 3In the browser, sign in to Stripe and choose the live accounts and sandboxes to grant, with permissions for each. Start with a sandbox only.

Stripe also offers a one-step route through its CLI. It configures the MCP server for each agent it finds on your machine, installs Stripe’s agent skills and keeps them updated:

Terminal

```
stripe agent setup
```

Either way, try a question you would otherwise answer in the Dashboard: “Which subscriptions moved to past\_due this week, and what did their last invoice fail with?”

## Which Stripe tools does Claude Code get?

A handful of generic API tools instead of one tool per endpoint. Claude Code looks up the method it needs, then calls it through `stripe_api_read` or `stripe_api_write`, which keeps the tool list small while covering much of the API:

ToolWhat it does

`stripe_api_search`

Read. Finds Stripe API methods by keyword.

`stripe_api_details`

Read. The parameters of one API method.

`stripe_api_read`

Read. Calls any supported GET method: customers, charges, invoices, subscriptions, disputes, payouts and more.

`stripe_api_write`

Write. Calls any supported POST, PATCH, PUT or DELETE method, from creating a customer to refunding a charge.

`get_stripe_account_info`

Read. The connected account’s details.

`search_stripe_documentation`

Read. Searches Stripe’s docs and support articles.

`stripe_analytics`

Read, in preview. Finds metrics and reports and builds SQL from a question.

Stripe’s docs list the exact methods the two API tools support. Treasury tools such as `send_money` also appear for accounts in that preview.

## Can Claude Code refund a payment on its own?

No. Refunds, and other actions Stripe marks as needing human confirmation, stop at an approval link. You open it, review the request in the Dashboard and click Approve, then tell Claude Code to retry. An unapproved request expires after 24 hours. This check is Stripe’s, separate from Claude Code’s own prompts, and it depends on the action, not the tool name: `stripe_api_write` creates a customer without it and a refund with it.

## How do I let Claude Code read Stripe without asking every time?

Allow the read tools by their full names and put the write tool on ask. Claude Code names MCP tools `mcp__<server>__<tool>`, so in `.claude/settings.json`:

.claude/settings.json

```
{
  "permissions": {
    "allow": [
      "mcp__stripe__stripe_api_search",
      "mcp__stripe__stripe_api_details",
      "mcp__stripe__stripe_api_read",
      "mcp__stripe__search_stripe_documentation"
    ],
    "ask": ["mcp__stripe__stripe_api_write"]
  }
}
```

For a session that should never write, move `mcp__stripe__stripe_api_write` to `deny` instead. A rule in the client only covers that client, so for anything that must hold, also limit the grant on Stripe’s side. More in [how to make an MCP server read-only](https://mcp1.com/blog/read-only-mcp-server).

## How do I share the Stripe server with my team?

Add it at project scope and commit the `.mcp.json` it writes. The file holds only the URL, and each person authenticates with their own Stripe login:

Terminal

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

Each person’s agent acts on their behalf, under their own session, which they or an admin can revoke without touching anyone else’s. An admin can turn MCP access on or off for the whole team in the Dashboard, under Settings, MCP and CLI access, with separate switches for live mode and sandboxes.

## How do I use an API key instead of OAuth?

Use an agent API key: a restricted key tagged for agent access when you create it in the Dashboard. Give it only the permissions the job needs. Agent keys fall under Stripe’s approval rules, which by default send payouts, refunds and account changes to a reviewer. Keep the key in an environment variable and reference it from `.mcp.json`:

.mcp.json

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

Old keys stop working in December

Stripe’s MCP server stops accepting full-access secret keys, and restricted keys without the agent tag, after 30 November 2026\. Those requests get a 401\. If a CI job or script uses `sk_` or an untagged `rk_` key with the MCP server, replace it with an agent key or switch to OAuth now.

An agent key acts as itself, not as a person, so use it for unattended agents rather than for a team of people. Setting up the job is covered in [how to use MCP servers in CI and headless agents](https://mcp1.com/blog/mcp-in-ci-and-headless-agents).

## What if the Stripe server stops working?

Terminal

```
claude mcp list
claude mcp get stripe
```

- It worked for two weeks and then failed: Stripe’s OAuth sessions last 14 days from the first authorization, and refreshing doesn’t extend them. Run `/mcp` and authenticate again.
- A 401 with an OAuth challenge while using a key: the key isn’t an agent key. Create one, or remove the header and use OAuth.
- It never connects on a work laptop: a managed network may block external MCP servers. Ask IT to allow mcp.stripe.com.
- Sandbox calls work but live ones don’t: an admin has turned MCP access off for live mode under Settings, MCP and CLI access.

To cut off a client, open your user settings in the Dashboard and revoke it under OAuth sessions. Admins can revoke anyone’s sessions from Team and security. When someone leaves, see [how to revoke MCP access when someone leaves](https://mcp1.com/blog/mcp-offboarding).

## Stripe for the whole team, in every client

Everything above is configured per person and per client, and Stripe’s logs show the Stripe user, not which agent or client made the call. MCP1 is a gateway that does the setup once. An admin installs [Stripe](https://mcp1.com/servers/stripe) in the workspace with OAuth or an agent key, puts it in a gateway next to the team’s other servers, and grants that gateway to groups with full or read-only access. Each person connects once:

Terminal

```
claude mcp add --transport http mcp1 https://mcp1.com/mcp/<workspace>/<gateway>
```

Stripe’s tools appear as `stripe__<tool>`, a rule can hold `stripe__stripe_api_write` to a minimum role or make it ask first, and every call is recorded with the person, client and arguments. The [docs](https://mcp1.com/docs) cover gateways and rules, and the Individual plan is free to [start with](https://mcp1.com/signup).

## Common questions

### Can I use the Stripe MCP server with a sandbox?

Yes. Stripe’s consent page lets you grant sandboxes as well as live accounts, with separate permissions for each. Granting only a sandbox is the safest way to start.

### Can I still use a restricted key with the Stripe MCP server?

Only if it is tagged as an agent key. After 30 November 2026 Stripe’s MCP server rejects full-access secret keys and restricted keys without the agent tag with a 401.

### Why does Claude Code send me a Stripe link to approve a refund?

Stripe requires human confirmation for some actions, refunds included. Approve the request in the Dashboard within 24 hours, then ask Claude Code to retry.

### How do I connect Stripe MCP to Codex instead?

Run codex mcp add stripe --url https://mcp.stripe.com, then codex mcp login stripe to sign in. For an agent key, set bearer\_token\_env\_var in the server’s entry in Codex’s config.toml.

Give your team one URL

Create a workspace, install your servers and share a gateway with a group. Free for individuals.

[Start with MCP1](https://mcp1.com/signup)[Read the docs](https://mcp1.com/docs)

## More from the blog

[ Terminal$ claude mcp add --transport http github api.githubcopilot.com/mcp/githubConnectedHow to connect GitHub MCP to Claude CodeRun claude mcp add with https://api.githubcopilot.com/mcp/ and a fine-grained token. Read-only mode, toolsets, permission rules and team setup.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/github-mcp-claude-code)[ SupportIntercomRead-onlyLinearRead-onlyNotionRead-onlyStripeRead-onlyMCP servers for support teams: what to connect firstStart with your helpdesk, Linear, Notion and Stripe, read-only first. What they answer together, which writes to hold back and a shared setup.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/mcp-servers-for-support-teams)

---

This is the markdown copy of https://mcp1.com/blog/stripe-mcp-claude-code. Site index for agents: https://mcp1.com/llms.txt
