Stripe MCP in Cursor still has sk_live in the config: what to do
Short answer: Delete the npx @stripe/mcp entry and its --api-key argument from your Cursor mcp.json, then reconnect Cursor to Stripe's hosted MCP server at https://mcp.stripe.com with OAuth. The Cursor example in Stripe's docs is the URL on its own, with no key in the file. Migrate by November 30, 2026: starting in December, Stripe MCP stops accepting full-access secret keys and restricted keys without the Agent tag. Deleting the key from the file does not revoke it, so expire the old key in the Stripe Dashboard too. Do that right away, with expiration Now, if it was ever committed, pasted, or shared; otherwise after you have tested the new setup in a sandbox. A SniffPup site scan cannot see ~/.cursor/mcp.json on your machine, so this local fix is yours to do. Run a free SniffPup scan of your own site to check the same key did not also ship in your published app.
Passive checks only, for a live URL you own or are authorized to test. A clean scan is not proof of security.
Home › Guides › Stripe MCP in Cursor · Last updated · By Ember, SniffPup
Which keys are which
- Secret keys (
sk_live_,sk_test_): full-access, never public, and no longer accepted by Stripe MCP starting in December 2026. A live one in an MCP config is a live credential in a plain text file. - Restricted keys (
rk_) without the Agent tag: also stop being accepted by Stripe MCP starting in December 2026. - Agent API keys: restricted keys created for agent use, with only the permissions the client needs. You can spot them in the Dashboard by the Agent badge. This is Stripe's key-based option for clients that cannot use OAuth.
- Publishable keys (
pk_live_,pk_test_): made to be public in Stripe.js and mobile SDKs. They are not an MCP login. Do not swap one into the MCP config.
1. Open the Cursor MCP config and find the old Stripe entry
Open ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in a project, and find the Stripe entry that runs npx @stripe/mcp with an --api-key argument. The local @stripe/mcp and @stripe/agent-toolkit packages are deprecated and will receive no further updates, including security fixes.
2. Remove the entry and the key value
Remove that whole entry: the command, the --api-key argument, and the key value. Keep a note of the key's last characters only, so you can identify it in the Dashboard. Never copy the full value anywhere new.
3. Decide whether the old key was exposed
If that mcp.json was committed to a repo, pasted into chat, screen-shared, or sent to anyone, treat the key as leaked. Rotate it now in the Dashboard with expiration Now, and check its request logs, following Leaked Stripe secret key: what to do. Removing the file does not un-leak a key.
4. Reconnect with the hosted server and OAuth
Replace the entry with the URL only, then sign in with OAuth when Cursor prompts you and grant only the account or sandbox and permissions you need. Stripe's Cursor example is that URL on its own, in ~/.cursor/mcp.json, with no key in the file.
{
"mcpServers": {
"stripe": {
"url": "https://mcp.stripe.com"
}
}
}5. If the client cannot use OAuth, pass an agent API key from the environment
If the client cannot use OAuth, create an agent API key in the Dashboard with only the permissions it needs. You can spot these keys by the Agent badge. Pass it as the bearer token in the Authorization header, referenced from an environment variable. Never paste the full key into mcp.json.
Cursor resolves ${env:NAME} in command, args, env, url, and headers. For this header, that is Bearer ${env:AGENT_API_KEY} when the variable is named AGENT_API_KEY. Set that variable in your shell or system environment. Cursor does not load an envFile for a remote HTTP server. Stripe's Claude Code example uses Bearer ${AGENT_API_KEY}, and Stripe's example for other clients uses {{AGENT_API_KEY}}. Those are not Cursor's interpolation. Do not paste them into Cursor's mcp.json.
{
"mcpServers": {
"stripe": {
"url": "https://mcp.stripe.com",
"headers": {
"Authorization": "Bearer ${env:AGENT_API_KEY}"
}
}
}
}6. Test the new configuration in a sandbox
Confirm the Stripe tools connect and read test data before you touch the live key.
7. Expire the old key
Once the sandbox test passes, expire the sk_ or untagged rk_ key the local package was using. Do it immediately if you already rotated it because the file was exposed. Unsupported keys get a 401 response with an OAuth discovery challenge once the December change lands.
8. Check the same key did not leak a second way
Search the project copy of .cursor/mcp.json, any committed copies, and your live site. Run a free SniffPup scan of the site you own. If the same secret shipped in your JavaScript or a public .env file, rotate it as leaked.
What SniffPup checks, and what it doesn't
SniffPup's passive scan of a live URL you own looks for leaked secrets in the page and its JavaScript (Stripe secret keys included, always masked in the report), public .env / .git and other exposed files, public source maps, security headers, cookie flags, and HTTPS. Existing Stripe finding types continue to link to Leaked Stripe secret key: what to do. It cannot open or read ~/.cursor/mcp.json, your project files on your machine, your Stripe Dashboard, or your MCP sessions, and it cannot rotate or expire a key for you. A score of 100 means no issues were found in our checks, not proof of security.
Next: Leaked Stripe secret key: what to do, Cursor .cursorignore for API keys and .env files, Use SniffPup inside Cursor, and Find exposed API keys on your website.
FAQ
Will my npx @stripe/mcp --api-key=sk_live_… config keep working?
No. The local package is deprecated with no further updates, including security fixes, and starting in December 2026 Stripe MCP stops accepting full-access secret keys. Requests with an unsupported key receive a 401 with an OAuth discovery challenge. Migrate by November 30, 2026.
The key was only ever on my own laptop. Do I still have to expire it?
Yes. It stops working for MCP in December anyway, and deleting it from mcp.json does not revoke it. Stripe's order for a replacement is: test the new configuration in a sandbox, then expire the old key. If it was ever committed, pasted, or shared, skip the wait and rotate it with expiration Now instead.
Can SniffPup check my mcp.json for me?
No. The site scan only sees what your published URL serves to a visitor. It can tell you whether a Stripe secret also leaked into your live site's JavaScript or public files, but your local Cursor config, Dashboard keys, and OAuth sessions are only visible to you.
Sources: Stripe Docs: Model Context Protocol (hosted server, OAuth and agent API keys, November 30, 2026 migration), Stripe stripe/ai on GitHub (deprecated packages), and Cursor MCP documentation, checked November 6, 2026.