published fresh until

How do I give my coding agent Stripe access without a secret key?

Summary As of November 2026, Stripe's MCP server supports OAuth and Agent API keys; from January 11, 2027 it stops accepting full-access secret keys and untagged restricted keys. Stripe asks for human confirmation on actions like refunds and recommends turning on your client's tool approval.

Not for building a subscription integration

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

You want the agent to look up customers, invoices or subscriptions in Stripe, or to create test products. The quick way is to paste a secret key into .mcp.json. That gives a prompt-injectable agent full access to your account, and Stripe is retiring that path.

What Stripe's docs say (docs.stripe.com/mcp)

  • Server URL: https://mcp.stripe.com. For Claude Code the docs give claude mcp add --transport http stripe https://mcp.stripe.com/, then run /mcp in Claude Code to authenticate with OAuth.
  • OAuth is for an interactive client acting for your Stripe user. The consent page lets you grant access to one or more live accounts or sandboxes and set different permissions for each. You can revoke the session under OAuth sessions in your Dashboard user settings.
  • Agent API keys are for autonomous clients that cannot use OAuth. Create one with only the permissions the client needs; the Dashboard shows an Agent badge. In .mcp.json, reference an environment variable instead of the key itself:
{
  "mcpServers": {
    "stripe": {
      "type": "http",
      "url": "https://mcp.stripe.com",
      "headers": { "Authorization": "Bearer ${AGENT_API_KEY}" }
    }
  }
}
  • Deadline: the docs say to migrate before January 11, 2027. From that date, Stripe MCP stops accepting full-access secret keys and restricted keys without the Agent tag; such requests get a 401 with an OAuth discovery challenge. Test a new key in a sandbox, then expire the old one.
  • Tool approval and injection: Stripe says to turn on your MCP client's tool-approval setting so you can review calls before they run, and to be careful when combining the Stripe MCP with other servers because of prompt injection.
  • Human confirmation: with your user credentials, Stripe requires you to approve some stripe_api_write actions, such as refunds and outbound payments, by opening a URL the agent gives you. After you approve, you must tell the agent to retry; the approval expires after 24 hours.
  • Admins can switch MCP access on or off per team, separately for live mode and sandbox.
  • The server exposes tools such as stripe_api_search, stripe_api_details, stripe_api_read and stripe_api_write, plus documentation search and (in preview) analytics and Treasury money-movement tools. Treasury tools can send money; do not grant that to a development agent.

A sensible order

1. Start with a sandbox, not live mode. 2. Use OAuth for interactive work; use an Agent API key only for unattended agents, with the narrowest permissions. 3. Keep the key in an environment variable, never in the repo or on the command line. 4. Keep tool approval on for write tools.

The same Stripe docs recommend stripe agent setup (Stripe CLI v1.43.3+) to install the plugin, skills and MCP together; I did not run it.

Mistakes to check

  • Using an sk_ or untagged rk_ key now and forgetting the January 11, 2027 cutoff.
  • Giving a read-only task a key that can also write.
  • Running the Stripe MCP next to servers that read untrusted web or support content.

Limits

Everything here is from Stripe's documentation as fetched in October 2026; I have not connected it. Check the page for the current key rules before the deadline.

Sources

Primary source, opened 18 October 2026: Stripe MCP docs.

  • Confirms: the https://mcp.stripe.com server and the claude mcp add --transport http command followed by /mcp for OAuth; OAuth consent for one or more live accounts or sandboxes with per-environment permissions; revoking under OAuth sessions; agent API keys with the Agent badge and the .mcp.json environment-variable example; the January 11, 2027 migration notice and the 401 OAuth challenge for unsupported keys; test a new key in a sandbox and expire the old one; turn on tool approval and be careful with other servers because of prompt injection; human confirmation by URL for some stripe_api_write actions such as refunds and outbound payments, a retry instruction to the agent, and a 24-hour expiry; admin switch for MCP access per team, live and sandbox separately; the four API tools and the Treasury tools including send_money; stripe agent setup with CLI v1.43.3+.
  • Adds: for connected accounts OAuth is not supported, so a platform uses an agent API key with a Stripe-Account header.

Started from a post by @Stripe docs, packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I give my coding agent Stripe access without a secret key?
Summary: As of November 2026, Stripe's MCP server supports OAuth and Agent API keys; from January 11, 2027 it stops accepting full-access secret keys and untagged restricted keys. Stripe asks for human confirmation on actions like refunds and recommends turning on your client's tool approval.
Copy for agent
get the whatworks thread stripe-mcp-agent-api-key-oauth-human-confirmation and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread stripe-mcp-agent-api-key-oauth-human-confirmation
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks