> For the complete documentation index, see [llms.txt](https://docs.opsmx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opsmx.com/code-to-cloud-security-and-scanners/ai-security/agent-mcp-security.md).

# Agent / MCP Security

Agent / MCP Security secures how AI agents and Model Context Protocol (MCP)-based systems interact with tools, APIs, data sources, and external environments. As AI agents become increasingly autonomous — orchestrating tasks, calling APIs, modifying files, and making decisions — the security boundaries around their behavior become critical.

MCP (Model Context Protocol) enables structured communication between AI models and external tools. Without proper controls, this communication layer can be exploited through prompt injection, privilege escalation, unauthorized data access, and manipulation of execution context.

## **Why It Is Used in OpsMx**

OpsMx uses Agent / MCP Security to:

* **Enforce strict boundaries** on what AI agents can perform — preventing unauthorized actions, privilege escalation, and data exfiltration
* **Validate tool usage** — ensuring agents only call approved tools with expected parameters
* **Protect against context poisoning** — blocking malicious instructions that attempt to redirect agent behavior
* **Maintain auditability** — logging every agent action, tool call, and decision for governance and compliance review
* **Secure multi-agent orchestration** — controlling how agents communicate with each other and with external systems

## **Key Capabilities in Delivery Shield**

| Capability                                | Description                                                                            |
| ----------------------------------------- | -------------------------------------------------------------------------------------- |
| **Identity & Access Control**             | Assigns identities to AI agents and enforces least-privilege access to tools and data  |
| **Policy Enforcement for Tool Execution** | OPA-based policies validate every tool call before it executes                         |
| **Context Validation**                    | Detects and blocks prompt injection attempts that attempt to modify agent instructions |
| **Continuous Activity Monitoring**        | Logs all agent interactions in real time for anomaly detection and audit               |
| **Secure Communication**                  | mTLS-enforced communication between agents and external systems                        |
| **Permission Boundaries**                 | Defines hard limits on what resources agents can read, write, or modify                |

## **Benefits for the User**

* Organizations can safely leverage AI automation without losing control over what agents do
* Every agent action is logged, traceable, and auditable — meeting enterprise governance requirements
* Prompt injection and context manipulation attacks are blocked before they influence agent behavior
