
An AI agent can read a thousand documents without doing any harm. The risk starts when it acts: when it updates a customer record, runs a database query, sends an email, or calls another agent. Every one of those actions happens through a tool. And more and more of those tools are now reached through the Model Context Protocol.
That’s why AI agent security needs to start where agents take action. Prompt filters and network controls still matter, but they see intent or traffic, not the action itself. The MCP layer is where an agent’s decision becomes a real change in a real system, and it’s the most direct place to stop the wrong one.
This guide covers what AI agent security means, the risks that show up at the action layer, the controls that belong at the MCP layer, and what else a complete agent security program needs.
What is AI agent security?
AI agent security is the practice of protecting the systems AI agents can reach and controlling the actions they take, so an agent can only do what its task requires, for the people it’s acting for, under policy that holds even if the agent is manipulated.
Traditional application security assumes a developer decided what the software would do. Agents are different. A model decides at runtime which tool to call and with what inputs, based on instructions, retrieved content, and tool descriptions that an attacker may be able to influence. Securing agents means controlling those decisions where they turn into actions.
Why the MCP layer is where agent security happens
Think of an agent’s work in three stages.
- Intent. A user or another system gives the agent a task, and the model reasons about it.
- Action. The agent calls a tool to read, write, or change something.
- Result. The tool returns data, which flows back to the model and often to the user.
Most early AI security focused on the first stage: filtering prompts and model outputs. That’s still useful, but a prompt only shows what someone asked for. The tool call is what actually happens. Perimeter and network tools sit even further away, and often see an agent’s action only after it has executed.
MCP standardizes the action stage. When agents reach tools through MCP, every action passes through a predictable point where you can check who’s acting, what tool they’re calling, and with what inputs, before the call goes through.
AI agent security risks at the action layer
The OWASP Top 10 for Agentic Applications, published in December 2025, catalogs the most critical risks for agentic systems. Several of them land directly at the tool layer.
Goal hijacking and prompt injection
Attackers plant instructions in content the agent reads, such as an email, a web page, or a document, to redirect what it does next. With direct access to tools, a hijacked agent doesn’t just say the wrong thing. It does the wrong thing.
Tool misuse
OWASP lists tool misuse and exploitation as a core agentic risk. An agent with a broad tool, such as unrestricted database access, can be steered into using it in ways nobody intended, including destructive actions.
Identity and privilege abuse
Agents often run with the full permissions of a service account or the user who set them up. OWASP calls out identity and privilege abuse because an over-privileged agent turns one manipulation into a wide breach, especially when agents chain together.
Agentic supply chain risk
Agents depend on tools, MCP servers, and plugins from many sources. The OWASP MCP Security Cheat Sheet describes MCP-specific versions of this risk, including tool poisoning, where hidden instructions sit inside a tool’s description, and rug pulls, where a server changes its tools after approval.
Data exfiltration through tool results
Tool results flow back into the model and out to users. A manipulated agent can pull sensitive data through a legitimate tool and leak it in its output, or pass it to another tool that sends it out.
Five controls to put at the MCP layer
1. Least privilege per agent and per tool
Give each agent access only to the tools its task requires, and where possible, only to the parameters it needs. A support agent that can look up an order shouldn’t be able to issue refunds. Filtering each agent’s available tools also keeps tools it should never use out of its context entirely.
2. Identity for the agent and the user
Check two identities on every call: the agent making it and the person it’s acting for. That way an agent can’t reach data its user couldn’t reach directly, and every action traces back to a real person.
3. Deterministic rules for high-impact actions
Some actions should never depend on a model’s judgment. Rules that run as code, such as “never delete production records” or “send any payment over a set amount to a human,” apply the same way every time, however a prompt was worded. Model-based guardrails can be steered by a well-crafted prompt. Deterministic rules don’t rely on a model interpreting them.
4. Inspection of inputs and outputs
Check tool inputs before a call runs and tool results before they reach the model or the user. That’s where you catch prompt injection hidden in retrieved content and sensitive data on its way out.
5. A record of every action
Log every tool call, including those that were blocked or failed, with the agent, the user, the tool, and the result. That record is how security teams investigate incidents and how governance teams show auditors what agents actually did.
What else a complete AI agent security program needs
The MCP layer is where you enforce, but it isn’t the whole program.
- Inventory. You can’t secure agents or MCP servers you don’t know about. Continuous discovery finds the ones that never went through review.
- Adversarial testing. Red teaming agents before and after deployment shows where controls are weak, so you can fix them before attackers find them.
- Behavioral monitoring. Baseline what normal looks like for each agent and alert when one drifts outside its intended scope.
- Governance. Tie security policy to risk classifications and regulatory requirements, so enforcement and evidence come from the same place.
A checklist for securing AI agents
- Inventory every agent and MCP server, including the ones nobody approved.
- Route agent tool access through a single control point.
- Grant least-privilege access per agent, per tool, and per parameter.
- Enforce policy for the user behind each agent, not just the agent.
- Put deterministic rules and human approval on high-impact actions.
- Inspect tool inputs and outputs for injection and sensitive data.
- Log every tool call, including denied ones.
- Red team agents continuously, and feed findings back into policy.
How Airia secures agents at the MCP layer
Airia Secure is the runtime security capability of the Airia platform, built to enforce policy at the moment an agent acts.
The Airia MCP Gateway is the control point for agent tool access. It enforces per-agent, per-tool least privilege on every MCP server connection, and admins can assign access at the app, tool, and parameter level by role. Filtering each agent’s tool context to approved tools limits blast radius and keeps unneeded tool definitions out of the model’s context.
Agent Constraints add deterministic, action-level enforcement. They validate tool inputs and execution parameters before actions proceed, and route high-impact or sensitive actions to human review. Because they run as code, they apply the same way every time, rather than depending on a model’s judgment.
Airia Secure also detects and blocks prompt injection and jailbreak attempts, both direct and indirect, with sub-300ms enforcement latency, and blocks sensitive data from leaving through agent outputs, model API calls, and MCP server responses. Behavioral monitoring flags agents operating outside their intended scope. Agentic Red Teaming runs attack scenarios mapped to the OWASP LLM Top 10 and MITRE ATLAS, and its findings feed back into Agent Constraints.
Every enforcement decision is recorded in the AI Audit Trail, so security and governance teams work from the same record. Airia Discover supplies the inventory, including agents and MCP servers that never went through review. The Cloud Security Alliance completed a formal AARM Core conformance review of Airia, one of nine platforms worldwide to finish one.
Conclusion
AI agents are only as risky as the actions they can take. Prompt filters see intent and network tools see traffic, but the tool call is where an agent actually changes something. Secure that layer first: least privilege per tool, identity for every call, deterministic rules for what matters most, and a record of everything. Then build discovery, testing, and governance around it.
Find out what your agents can reach today. Request a demo to map your agent-to-tool access and see Airia block an out-of-policy tool call before it completes.
Put these ideas to work.
Schedule a 30-minute walkthrough with our team.