Glossary security/

What is least privilege for AI agents?

Least privilege for AI agents is the practice of giving an agent only the tools, OAuth scopes and runtime access its current task needs, and granting more only when a task requires it.

Published
Read
1 min
Source
Markdown

Also called: least-privilege agents, principle of least privilege

HTTP/1.1 403 Forbidden
WWW-Authenticate: Bearer error="insufficient_scope",
                         scope="files:write",
                         resource_metadata="https://mcp.example.com/.well-known/oauth-protected-resource",
                         error_description="File write permission required for this operation"

That 403 is least privilege on the wire. Under MCP spec version 2026-07-28, a server can hand a client a narrow token and challenge for files:write only when a write is attempted. The client then re-authorizes with the union of its old and new scopes. MCP’s security guidance warns against advertising every scope in scopes_supported, catch-all scopes such as * or full-access, and folding unrelated privileges into one grant so the user is never asked again.

The principle predates agents. NIST’s glossary, citing CNSSI 4009-2022, applies it to users “or processes acting on behalf of users,” which is what an agent is.

Apply it at every layer: expose fewer tools, request narrow scopes, act with the user’s own permissions, and run local servers in a sandbox with restricted file system and network access. OWASP’s LLM06:2025 Excessive Agency entry names three root causes: excessive functionality, permissions and autonomy. Least privilege handles the first two; human approval handles the third.

See also: Tool allow-list · Human-in-the-loop · Security checklist for shipping an MCP server · How coding agents ask permission

Human-in-the-loop (HITL), Non-human identity (NHI), Per-user OAuth, Tool allow-list

Sources

  1. Security Best Practices (version 2026-07-28)Model Context Protocol modelcontextprotocol.io
  2. Authorization (MCP specification version 2026-07-28)Model Context Protocol modelcontextprotocol.io
  3. least privilege (Glossary)NIST Computer Security Resource Center csrc.nist.gov
  4. LLM06:2025 Excessive AgencyOWASP Gen AI Security Project genai.owasp.org

Changelog

  • First published.

Cite this page

Agents for Devs. "What is least privilege for AI agents?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/least-privilege-agents
Cite one section