Full Byte Developer.

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.

Published here , updated · 3 sources

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.

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].

Auth to mcp.stripe.com OAuth session interactive clients Agent API key Bearer header Stripe MCP tools + API allowed after migrate sk_ / non-agent 401 after deadline

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 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. Browse the MCP topic.

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

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.
Retire a full-access secret in the agent path. Use a narrower key or an authorization flow.

Keep this guide

By Full Byte Developer

Filed under MCP, Security

Questions about this guide

Who is affected?

Any MCP config that authenticates to Stripe MCP with a full-access secret key, or with a restricted key that is not tagged as an agent key.

What is the recommended setup?

Run stripe agent setup after installing the Stripe CLI, or connect the MCP URL with OAuth. For unattended agents, use an agent API key as the Bearer token.

When do old keys stop working?

Per Stripe's MCP docs, starting January 11, 2027, unsupported keys receive a 401 with an OAuth discovery challenge.

Sources

Next in this stack