Blank white background with no objects or features visible.

Découvrez TrueForge : l'infrastructure d'agents open-source et indépendante des fournisseurs. Réduisez vos coûts de 50%. Explorer maintenant→

AI Agent Access Control: Least-Privilege for Every Agent

Par Ashish Dubey

Published: August 26, 202616

⚡ TL;DR

AI agent access control decides whether a call is allowed to happen at all: which agents, users, and teams can reach which models, MCP servers, and individual tools. It is a separate job from guardrails, which inspect what a call contains. On TrueFoundry, access is enforced at the gateway through role-based collaborators at the resource level and roles at the tenant level, so you can scope every agent to least privilege without writing authorization logic into agent code.

Agents make access control harder for one simple reason. A single person can drive dozens of agents, and each agent can call many tools, so the old model of "this user can use this app" no longer describes what is actually happening. A support copilot that only needs to read tickets should never be able to run a refund, even when the person behind it could. Getting that right means scoping the agent, not just the human.

This guide covers what AI agent access control is, how it differs from guardrails, and how TrueFoundry enforces least-privilege across models and MCP tools from one control plane. It pairs closely with AI agent identity, which establishes who is calling in the first place.

What Is AI Agent Access Control?

AI agent access control is the set of policies that decide whether a given caller may reach a given resource. It answers "is this allowed," while guardrails answer "what is in it."

That distinction is worth holding onto, because the two controls fail in different ways and you need both.

  • Access control is the bouncer at the door. It checks whether this agent, user, or team is permitted to call this model or this MCP tool at all.
  • Guardrails are the metal detector. Once a call is allowed through, they inspect the prompt, the output, and the tool arguments for injections, PII, secrets, or unsafe operations.

An agent can be fully authorized to call your database MCP server and still be tricked into sending a destructive query. Access control said yes to the server, and only a guardrail on the arguments catches what the query actually does. Scope the access too broadly, though, and you are relying entirely on the metal detector. Least privilege is what keeps the number of allowed calls small in the first place.

The Two Levels of Access Control in TrueFoundry

TrueFoundry enforces access at two levels, and understanding the split is most of the work.

Resource-level roles (collaborators)

You add a user, team, or virtual account as a collaborator directly on a resource, and pick a role that scopes their access to that resource only. The roles are specific to the resource type:

Resource Roles
Model Account / Provider Account Manager, User
MCP Server MCP Server Manager, MCP Server User, MCP Server Approver
Agent Agent Manager, Agent Access
Workspace Workspace Admin, Member, Viewer
Secret Group Admin, Editor, Viewer, Access

This is where least privilege lives. Grant an agent Agent Access to only the MCP servers its job needs, make one team a User on the model account it is allowed to call, and add an MCP Server Approver when a tool should require sign-off before it runs. No custom role creation is needed for any of it.

Tenant-level roles

Tenant-level roles apply across the whole tenant and are configured under Access, then Roles. They govern tenant-wide actions such as creating resources, managing users, and listing every resource of a type. TrueFoundry ships with two: Admin, which is full control and should stay limited to a handful of people, and Member, which by default has access to nothing and must be granted resource access explicitly. When those two are too broad or too narrow, you create a custom role.

Permissions available when creating a custom tenant-level role in TrueFoundry
Product screenshot, TrueFoundry docs: custom role permissions.

Roles can attach to teams as well as individual users, and a user's effective permissions are the union of their own role and every role inherited from their teams. For organizations that sync identity groups over SCIM, those groups come in as TrueFoundry teams and can be granted roles directly, so access follows the same source of truth your IdP already manages.

How Access Control Works for MCP Tools

The MCP Gateway separates three concerns that teams usually tangle together, and keeping them apart is what makes tool-level least privilege practical.

Layer What it controls
Inbound authentication How a caller (agent, developer, app) authenticates to the gateway, via a gateway token
Access control Which users, teams, or agents can use which MCP servers and specific tools
Outbound authentication How the gateway authenticates to the downstream MCP server

Layer

What it controls

Inbound authentication

How a caller (agent, developer, app) authenticates to the gateway, via a gateway token

Access control

Which users, teams, or agents can use which MCP servers and specific tools

Outbound authentication

How the gateway authenticates to the downstream MCP server

MCP Gateway authentication and authorization flow in TrueFoundry

Product screenshot, TrueFoundry docs: MCP Gateway auth and authz.

The important part for agents is the middle layer. Access rules can narrow all the way down to individual tools within a server, so you can grant an agent the read-only ask_question tool of a database server while withholding the tool that writes to it. Because the gateway sits in front of every call, the same rule covers every caller of that tool, agents included, with nothing to reimplement per agent.

Enforcing Least-Privilege in Practice

Least privilege is less a feature and more a habit that the gateway makes easy to keep. A few patterns carry most of the value.

  • One identity per workload, scoped tight. Give each application its own virtual account and each agent its own agent identity, then grant each only the model accounts and MCP tools it actually uses. Shared, broadly scoped credentials are what make blast radius large.
  • Scope agents to their function, not their driver's. A customer-support agent should reach the support tools and nothing near financial records or admin endpoints, even when the person running it has wider access. Agent-level grants make that separation real.
  • Use approver roles for sensitive tools. The MCP Server Approver role puts a human in the loop before high-impact tools run, which is often safer than a hard allow or deny.
  • Prefer teams over per-user grants. Assign roles to a team once and manage membership, so access stays legible as people and agents come and go.

For authorization that depends on request context rather than a static role, the gateway supports policy-as-code guardrails using Cedar and OPA at the pre-tool hook. These let you express fine-grained rules, for example allowing a tool call only when request metadata marks it as a non-production environment. In production, applications authenticate with a scoped Virtual Account token rather than a personal one, and can tag each call with metadata the policies read:

curl https://gateway.truefoundry.ai/api/llm/chat/completions \

  -H "Authorization: Bearer $VIRTUAL_ACCOUNT_TOKEN" \

  -H 'X-TFY-METADATA: {"environment":"production","team":"support"}' \

  -H "Content-Type: application/json" \

  -d '{ "model": "openai-main/gpt-4o", "messages": [ ... ] }'

::: CRO BANNER ::: Scope every agent to exactly what it needs. TrueFoundry enforces role-based access to models and MCP tools at the gateway, inside your own VPC. CTA: Book a demo → /book-demo :::::::::::::::::::

Why Enforce Agent Access at the Gateway

You could try to build these checks into each agent, but the reason not to is coverage. When access is enforced at the gateway, a new agent that calls an already-governed model or MCP server inherits its access rules automatically, with nothing to add to the agent's code. Agents built on LangGraph, CrewAI, AutoGen, or a custom loop all route through the same control plane and get the same policies.

It also keeps access decisions where they can be audited. Every call carries the identity of the caller and the resource it reached, so you can answer "which agents can touch this tool" from one place instead of reading a dozen repos. Access control, agent identity, and guardrails then compose into one governed call path: identity says who is calling, access control says whether the call is allowed, and guardrails inspect what it contains. The gateway adds only a few milliseconds of overhead while doing it, so putting all three in the hot path does not slow agents down.

The result is access control that behaves like infrastructure. It is applied uniformly, owned by the platform team, and enforced inside your own AWS, GCP, or Azure account, which is what makes SOC 2, HIPAA, and GDPR reviews tractable.

Try now.

One gateway for all your models, MCP servers, and agents.
No credit card needed.

INSCRIVEZ-VOUS
Table des matières

Gouvernez, déployez et suivez l'IA dans votre propre infrastructure

Réservez un séjour de 30 minutes avec notre Expert en IA

Réservez une démo

Le moyen le plus rapide de créer, de gérer et de faire évoluer votre IA

Démo du livre
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Découvrez-en plus

Aucun article n'a été trouvé.
|
5 min de lecture

Gemini 3 Pro: Benchmarks and How to Use It via Gateway

LLM et GenAI
|
5 min de lecture

What Is Ollama? Running Local LLMs in Production for Teams

GPU
|
5 min de lecture

AI Agent Portability: Switch Models Without Rebuilding Your Agents

IA agentique
August 26, 2026
|
5 min de lecture

AI Agent Access Control: Least-Privilege for Every Agent

Aucun article n'a été trouvé.
August 25, 2026
|
5 min de lecture

AI Agent Identity: Giving Every Agent a Non-Human Identity

Aucun article n'a été trouvé.
August 25, 2026
|
5 min de lecture

AI Agent Guardrails: Inspecting Every Tool Call and Model Hop

Aucun article n'a été trouvé.
What is MCP Authorization
April 22, 2026
|
5 min de lecture

Qu'est-ce que l'autorisation MCP ? Un guide détaillé

Aucun article n'a été trouvé.
MCP Server Security Best Practices for Safe AI Deployments
July 8, 2026
|
5 min de lecture

Meilleures pratiques en matière de sécurité des serveurs Mcp

Ingénierie et produits
What is an AI Agent Registry?
June 13, 2026
|
5 min de lecture

Qu'est-ce qu'un registre d'agents IA ?

Aucun article n'a été trouvé.

Blogs récents

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.

Questions fréquemment posées

What is AI agent access control?

AI agent access control is the set of policies that decide whether an agent, user, or team is allowed to reach a given model, MCP server, or individual tool. It governs whether a call is permitted, which is a separate job from guardrails that inspect what a call contains. On TrueFoundry it is enforced at the gateway through resource-level collaborators and tenant-level roles.

What is the difference between access control and guardrails?

Access control decides whether a call is allowed to happen. Guardrails inspect the content of a call that is already allowed, catching injections, PII, secrets, and unsafe operations. You need both: access control keeps the set of permitted calls small, and guardrails police what flows through the ones that are permitted.

How do I enforce least-privilege for an AI agent?

Give each agent its own identity, then grant it access only to the specific model accounts and MCP tools its function requires, using resource-level collaborator roles. Scope the agent to its job rather than to the permissions of the person driving it, use approver roles for sensitive tools, and prefer team-based grants so access stays manageable.

Can I control access to individual MCP tools, not just whole servers?

Yes. Access rules on the MCP Gateway can narrow to specific tools within a server, so an agent can be granted a read-only tool while the write tool on the same server stays off limits. Because the gateway fronts every call, the rule covers every caller of that tool automatically.

Puis-je déployer TrueFoundry dans mon propre VPC ou sur site ?

Oui. TrueFoundry fonctionne dans votre VPC, sur site, en environnement isolé, en mode hybride ou sur plusieurs clouds, et aucune donnée ne quitte votre domaine. C'est la principale raison pour laquelle les entreprises réglementées le préfèrent aux passerelles SaaS uniquement.

Does TrueFoundry support MCP and AI agents?

Yes. It includes an MCP Gateway, Agent Gateway, and an MCP and Agents Registry with tool-level access control, governing agents from LangGraph, CrewAI, AutoGen, and custom frameworks from one place.

Faites un rapide tour d'horizon des produits
Commencer la visite guidée du produit
Visite guidée du produit