Least privilege
Least privilege is the security rule of giving every person, tool or AI assistant only the access its job needs, and nothing more. If that access is misused or stolen, the damage stays small.
Why it matters
AI assistants now connect to stores, email and payments through MCP, so the rule applies to them too. Stripe asks clients that can't use OAuth to create an agent API key with only the permissions the client needs.1 From December 2026 its MCP server stops accepting full-access secret keys.1
The MCP specification itself forbids servers from accepting tokens that weren't issued to them, which closes one way around these limits.2
In practice
- Create a separate user or key for each AI tool.
- Start read-only and add write access one action at a time.
- Remove access that hasn't been used for a month.
- Keep refunds and deletes with people.
- Review who has access to what every month.
What the sources say
Create an agent API key with only the permissions the client needs.
Stripe Docs, Model Context Protocol (MCP)
What to do about least privilege, depending on who you are
If you're connecting AI to a store
Every connected server adds things the assistant can read and do. Stripe now requires OAuth or limited agent keys for exactly this reason.
- Connect only the servers one job needs.
- Use read-only modes where they exist.
- Give AI its own user with the lowest role that works.
If you look after a team's accounts
Old access piles up. People leave, tools change, and keys stay valid long after anyone remembers them.
- List every user, app and key with access to your systems.
- Remove what nobody has used in a month.
- Review the list on a fixed day each month.
Go deeper
My guide to which MCP servers a store should connect shows the read-only and scoped options in Klaviyo, Stripe and Google Analytics.