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

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.

  1. Connect only the servers one job needs.
  2. Use read-only modes where they exist.
  3. Give AI its own user with the lowest role that works.

MCP servers for ecommerce

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.

  1. List every user, app and key with access to your systems.
  2. Remove what nobody has used in a month.
  3. 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.

MCP servers for ecommerceAll 106 terms

Sources

  1. "Model Context Protocol (MCP)," Stripe Docs. docs.stripe.com
  2. "Security Best Practices," Model Context Protocol specification. modelcontextprotocol.io

Related terms

Prompt injection

Prompt injection is an attack where text that an AI model reads contains instructions that change what it does. The text can come from a user, or hide in content the AI fetches, such as a web page, an email, a support ticket or a product review.

Learn the term

Hardcoded secret

A hardcoded secret is a password, API key or access token written directly into a site's code or files. If that code reaches a browser or a public repository, anyone can copy the secret and use your account.

Learn the term

Model Context Protocol (MCP)

The Model Context Protocol, or MCP, is an open standard for connecting AI assistants to the tools and data where work happens. An MCP server exposes a system, such as a store, a CRM or a document folder, so an assistant like Claude can read it and act in it.

Learn the term

Want this done for you?

Setting up AI access for your team? Book a call and I'll help you decide who gets what.

Twenty minutes and nothing to sign. The three changes are yours to keep either way.

Book a 20-minute call