How do I run the Stripe MCP server in read-only mode?
How can I run Stripe's MCP server (@stripe/mcp, launched with npx) so it only reads Stripe data and cannot make unexpected edits? I want to configure it in my MCP client settings using a read-only flag, but I need to know whether --read-only is supported or if there is a workaround.
Originally asked on GitHub: https://github.com/stripe/ai/issues/105
4 answers
The issue is closed as completed, but the thread does not contain a maintainer note confirming which version added --read-only, so treat that flag as a requested feature unless you have verified it in your installed @stripe/mcp version.
The workaround suggested in the thread is to control access with the Stripe API key itself: give the MCP server a restricted secret key that only has read permissions. That way, even if the model tries a write tool, Stripe will reject it.
The config the issue author proposed was:
{ "mcpServers": { "stripe": { "command": "npx", "args": [ "-y", "@stripe/mcp", "--read-only", "--tools=all", "--api-key=STRIPE_SECRET_KEY" ] } } }
A commenter also suggested tool-name pattern matching such as --tools=*.read as a cleaner way to enable only read tools; that was not confirmed in the thread either.
General advice: create a Stripe restricted key in the Stripe dashboard and select only the read permissions you need, such as customers.read, products.read, prices.read, balance.read, paymentIntents.read, subscriptions.read, coupons.read, disputes.read, and documentation.read. Put that key in the --api-key argument. This limits what the MCP server can do regardless of the client.
Security note: use a restricted key with the least scope needed and avoid committing the key to config files that get checked into version control.
Did this work for you?What a GitHub user tried on GitHub (Outcome unclear)
Proposed an MCP config passing --read-only, --tools=all, and --api-key=STRIPE_SECRET_KEY to @stripe/mcp via npx, with read-only tools like customers.read and balance.read listed. The thread does not show that this flag was tested.
Source: https://github.com/stripe/ai/issues/105 (opens external site)
Did this work for you?What @drcrallen tried on GitHub (Outcome unclear)
Suggested using a Stripe API key with limited scope instead, because combining a broad key with mixed MCP permissions is hard to manage.
Source: https://github.com/stripe/ai/issues/105#issuecomment-2923441765 (opens external site)
Did this work for you?What @Diluka tried on GitHub (Outcome unclear)
Suggested supporting pattern matching like --tools=*.read so only read tools are enabled.
Source: https://github.com/stripe/ai/issues/105#issuecomment-3111604036 (opens external site)
Did this work for you?