# Your agent's Stripe connection changes by January 2027

> MCP configs that pass a full-access secret key get a 401 after January 11, 2027. Switch to OAuth or an agent-tagged key.

Source: https://fullbytedeveloper.com/blog/stripekey
Published here: 2026-11-17, updated 2026-12-03

Stripe MCP rejects full-access secret keys and non-agent restricted keys after January 11, 2027 with a 401 [1]. Interactive clients should reconnect with OAuth. Unattended agents should pass an agent-tagged restricted key as a Bearer token. Migrate in a sandbox first, then expire the old key once its logs go quiet.

## Quick start: Stripe's recommended setup

Stripe's MCP page recommends agent plugins that configure the server and skills for you [1][3]. Install the CLI, then run the agent setup command:

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

Per the docs, that command detects which agents you use and runs the applicable setup [1]. For Cursor without the plugin flow, the manual MCP entry is a URL only; OAuth happens when the client connects:

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

After connect, Stripe's consent page lets you grant live or sandbox access with scoped permissions [1]. OAuth refresh tokens expire after 14 days from the initial authorization, so a laptop that sits idle for two weeks needs a fresh consent [1].

## Who still breaks after the cut-over

Anyone whose MCP config still sends `Authorization: Bearer sk_live_...` (or a restricted key without the agent tag) hits the January 11, 2027 rule [1]. Stripe documents two supported auth methods for MCP: OAuth for clients acting as your user, and agent API keys for AI apps that need independent, persistent access [1][2].

Agent keys are restricted keys tagged for autonomous agent use. In the Dashboard they show an Agent badge [1][2]. During creation, Stripe prompts for intended use; choose the option that authorizes agent access to your account [2]. Those keys follow the same permission model as other restricted keys, with extra governance for agent actions [2].

## Unattended agents: Bearer with an agent key

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

Keep the value in the environment or a secrets vault, never committed next to the JSON [1][2]. Stripe's docs say to test a replacement key in a sandbox, then expire the old key [1]. If the same secret also powers your web app, move the app to a new key first so expiring the MCP key does not take checkout down.

For Connect platforms that need MCP on connected accounts, pass `Stripe-Account` beside the agent key. MCP does not support OAuth when acting on behalf of connected accounts [1].

<figure>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 270" role="img" aria-label="Stripe MCP accepts OAuth or agent keys; secret and non-agent restricted keys get 401 after the deadline">
  <defs>
    <marker id="stripeKeyArrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
      <path d="M0,0 L8,3 L0,6 Z" fill="#14b8a6"/>
    </marker>
  </defs>
  <rect x="0" y="0" width="720" height="270" rx="12" fill="#0b1f3a"/>
  <text x="24" y="36" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="16" font-weight="700">Auth to mcp.stripe.com</text>
  <rect x="24" y="56" width="200" height="80" rx="8" fill="#123052" stroke="#14b8a6" stroke-width="2"/>
  <text x="36" y="88" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">OAuth session</text>
  <text x="36" y="112" fill="#14b8a6" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">interactive clients</text>
  <rect x="24" y="156" width="200" height="80" rx="8" fill="#123052" stroke="#14b8a6" stroke-width="2"/>
  <text x="36" y="188" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Agent API key</text>
  <text x="36" y="212" fill="#14b8a6" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Bearer header</text>
  <path d="M224 96 H280" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#stripeKeyArrow)"/>
  <path d="M224 196 H280" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#stripeKeyArrow)"/>
  <rect x="288" y="96" width="168" height="100" rx="8" fill="#123052" stroke="#f59e0b" stroke-width="2"/>
  <text x="300" y="136" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Stripe MCP</text>
  <text x="300" y="160" fill="#f59e0b" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">tools + API</text>
  <path d="M456 146 H512" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#stripeKeyArrow)"/>
  <rect x="520" y="56" width="176" height="80" rx="8" fill="#123052" stroke="#14b8a6" stroke-width="2"/>
  <text x="532" y="88" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">allowed</text>
  <text x="532" y="112" fill="#cbd5e1" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">after migrate</text>
  <rect x="520" y="156" width="176" height="80" rx="8" fill="#123052" stroke="#64748b" stroke-width="2"/>
  <text x="532" y="188" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">sk_ / non-agent</text>
  <text x="532" y="212" fill="#f59e0b" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">401 after deadline</text>
</svg>
</figure>

*OAuth and agent-tagged keys stay valid; full-access secrets and non-agent restricted keys fail closed after January 11, 2027.*

## Prove the config shape locally

You cannot mint a real agent key in this article, but you can prove the JSON your client will load and that the secret stays out of the file:

```bash
mkdir -p /tmp/stripe-mcp-demo
cat > /tmp/stripe-mcp-demo/mcp.json <<'EOF'
{
  "mcpServers": {
    "stripe": {
      "url": "https://mcp.stripe.com",
      "headers": {
        "Authorization": "Bearer ${AGENT_API_KEY}"
      }
    }
  }
}
EOF
python3 - <<'PY'
import json
from pathlib import Path
cfg=json.loads(Path('/tmp/stripe-mcp-demo/mcp.json').read_text())
auth=cfg['mcpServers']['stripe']['headers']['Authorization']
print('url', cfg['mcpServers']['stripe']['url'])
print('auth_template', auth)
print('literal_sk_in_file', 'sk_' in Path('/tmp/stripe-mcp-demo/mcp.json').read_text())
PY
```

Captured output:

```text
url https://mcp.stripe.com
auth_template Bearer ${AGENT_API_KEY}
literal_sk_in_file False
```

If `literal_sk_in_file` is True in your real config, move the value to the environment before the deadline [1].

## After you switch

Remove the old key from every MCP config that still embeds it. Exercise a read-only tool in a sandbox. Watch key request logs; expire the old key only when traffic is gone [1][2]. Admins can enable or disable MCP access for the team in Dashboard settings, separately for live and sandbox [1].

Turn on your MCP client's tool-approval setting. Stripe also flags some write actions for human confirmation in the Dashboard before the agent may retry [1]. That is separate from client-side approval.

Webhook endpoints are a different surface from MCP. Signing secrets for [Stripe webhook checks](/blog/webhook-checklist) stay on your server; do not reuse an agent MCP key as a webhook secret.

## Mistakes that still 401 in January

Leaving a full-access `sk_live_` in `mcp.json` because OAuth felt slow on a headless box. Use an agent-tagged restricted key instead [1][2].

Creating a restricted key without the agent intended-use tag, then assuming any `rk_` works forever. The cut-over rejects non-agent restricted keys [1].

Expiring the old key before the app that still uses it has moved, taking payments down with the MCP cleanup.

Vague "we'll rotate later" plans that skip the sandbox test. The 401 includes an OAuth discovery challenge; treat that as the signal to finish migration, not to paste a new secret key into the same slot [1].

## Permissions to grant an agent key

Create the restricted key with only the API scopes the agent needs. A support bot that looks up customers and invoices does not need payout or account-configuration permission [2]. Stripe applies extra approval rules to agent-tagged keys for high-risk actions such as payouts, refunds, and account changes [2]. Read those defaults when you create the first agent key so you know which calls will pause for a human in the Dashboard [1][2].

If the agent must write, prefer sandbox until the tool-approval prompts look right. Turn on the MCP client's own approval toggle as a second gate; Stripe's human-confirmation flow is separate and action-specific [1].

Log every MCP tool call you can. Stripe points at Workbench for MCP tool call logs so you can see what the agent actually invoked after a surprise refund draft [1].

## Team and session hygiene

Administrators can enable or disable MCP access for the whole team in Dashboard settings, with separate controls for live mode and sandboxes [1]. Revoke a stolen laptop's OAuth session from user settings without rotating every API key in the company [1]. For another user's sessions, open Team and security with a role that can manage members, then revoke one session or all of them in the current account scope [1].

Managed corporate networks sometimes block outbound MCP hosts. When the Stripe MCP server never connects, ask IT to allow `mcp.stripe.com` before you conclude the API key is wrong [1].

## Inventory before the deadline

Search every developer laptop and CI secret store for `mcp.stripe.com` and for `sk_` values next to MCP configs. Replace each hit with OAuth (interactive) or an agent key (unattended). Record which sandbox you tested in and who owns the Dashboard revoke step. A spreadsheet with three columns (machine, auth method, verified date) beats discovering a forgotten Codex config on January 12.

npm or home-dir MCP JSON files are easy to miss because they never appear in the application repo. Check Cursor, Claude Code, Codex, and VS Code MCP locations your team actually uses [1].

## When you are done

Interactive machines show an OAuth session under user settings you can revoke. Unattended machines use an agent-badged key with least privilege. Neither path depends on a full-access secret living in a chat client's config file [1][2][3].

For login redirects that must resist stolen codes, see [OAuth decision sheet: code plus PKCE](/blog/oauth-pkce). Browse the [MCP topic](https://fullbytedeveloper.com/blog/topic/mcp).

Send this to the friend who still sends a full access Stripe secret to MCP.

Image: A dark vault cube cracked open along one face, with a glowing amber key bar spilling from the crack onto a flat public tray in the open, shown on a navy field with no currency marks, logos, numerals, or typography.
https://fullbytedeveloper.com/media/stripekey/stripekey-venice.webp
Retire a full-access secret in the agent path. Use a narrower key or an authorization flow.

## Sources

1. [Stripe docs: Model Context Protocol (MCP)](https://docs.stripe.com/mcp)
2. [Stripe docs: API keys (agent keys)](https://docs.stripe.com/keys#agent-keys)
3. [Stripe docs: agent plugins](https://docs.stripe.com/agents/plugin)
