---
title: "AI Agent & MCP Security Checks"
sidebarTitle: "AI Agent & MCP Checks"
description: "Five posture checks on AI agents, tools and MCP servers: instruction-like tool descriptions, unapproved writes, excess privilege, open servers, long-lived keys."
keywords: ["mcp security", "tool poisoning", "prompt injection", "ai agent security", "mcp authentication", "agent credentials", "least privilege"]
---

NHI Security runs five checks over the agents you have registered, the tools they are entitled to and the MCP servers its connector reaches. They use only facts it already holds: declared autonomy, declared tool effects, provider grants, credential dates and what the MCP connector observed. Their findings appear on **Findings** like every other finding, with the same triage, exceptions and history.

Four checks judge recorded facts. One, the tool-description check, is a **heuristic** and says so in its name. The table shows which is which.

| Policy | Raised against | Severity | Basis |
|---|---|---|---|
| `agent_tool_description_instructs_model` | The entitled agent | Medium | **Heuristic.** A fixed pattern list over the tool's description |
| `agent_mutating_tool_without_approval` | The agent | Medium; high when a tool is administrative | Declared autonomy and declared tool effects |
| `agent_privilege_exceeds_tools` | The agent | Medium | Provider grants compared with declared tool effects |
| `mcp_server_unauthenticated` | The MCP server | High | **Observed.** The server listed its tools to a caller with no credential |
| `agent_credential_long_lived` | The agent | Medium | Credential creation and expiry dates |

<Note>
The three checks about an agent's tools (description, approval and privilege) read the tools a connector observed the agent using (a `USES` edge), as the earlier agent tool policies do. A tool entitlement declared by a person under **Agents → Entitlements** does not raise these findings yet. See [Limitations](/nhi-security/limitations).
</Note>

All five are on by default and can be switched off or tuned under **Policies** like any other policy. See [Findings & Risk](/nhi-security/findings-and-risk).

## Tool descriptions that talk to the model (heuristic)

A tool's description is what a language model reads when it decides how to call the tool, and the tool's publisher wrote it. Text in it that addresses the model rather than describing the tool is how a tool poisons the agent that loads it.

NHI Security reads the first 20,000 characters of each description and matches them against seven pattern kinds. A description longer than that also raises `oversized_text`, so a payload padded past the limit is still flagged:

| Kind | Looks for |
|---|---|
| `override_instructions` | Telling the model to ignore or override its other instructions |
| `conceal_from_user` | Telling the model to keep something from the user |
| `role_override` | Claiming to change the model's role or system prompt |
| `pseudo_system_tag` | A tag that imitates a system or priority message |
| `secret_file_reference` | Naming a file that usually holds secrets |
| `credential_exfiltration` | Asking for credentials or secrets to be passed along |
| `invisible_characters` | Invisible or direction-changing characters |
| `oversized_text` | Text longer than the scan limit (not a pattern) |

Each pattern is pinned in the test suite by three descriptions it must match and three it must not.

When a connector has observed an agent using a tool whose description matches, the agent gets a medium finding that names the tool and the matched pattern. The tool's own page under **Agents → Tools** shows the matches for any tool, entitled or not, with a short excerpt (at most 80 characters, invisible characters shown as their code points). The API returns the same list as `descriptionSignals` on `GET /nhi/api/v1/tools/{toolId}`.

<Warning>
This is a heuristic. A description written to avoid the patterns raises nothing, and **no match never means the description is safe**. The check only adds findings: it never changes a tool's declared effect, and the runtime gate never reads it. A match is a reason for a person to read the full description.
</Warning>

**Fix:** read the description. If the publisher cannot explain the text, withdraw the agent's entitlement to the tool and raise it with whoever runs the server. If the text is legitimate, mark the finding as a false positive with your reason.

## Write tools with no per-action approval

An agent declared `human_in_the_loop` has a person watching the run who can stop it, but nobody approves each call. When that agent is entitled to a tool declared `write` or `administrative`, its changes land before anyone has said yes. The finding is medium, and high when one of the tools is administrative.

Agents declared `autonomous` or with no autonomy declared are already covered by `unsupervised_agent_mutates` and `agent_autonomy_undeclared`, so this check does not report them again. Agents declared `human_approves_action` pass.

The check reads only the agent's declared autonomy. Runtime-gate rules that send an action to a person do not resolve it, because posture checks and the gate never read each other's configuration.

**Fix:** have a person approve each call to these tools and then set the agent's autonomy to `human_approves_action`, or withdraw the entitlements it does not need. See [Agent Autonomy](/nhi-security/agent-autonomy).

## Agents holding more than their tools need

An agent's own credential is what an attacker gets when the agent is hijacked. This check raises a finding when the agent holds a provider grant that NHI Security classifies as administrative, while every tool it may invoke has a declared effect and none of them is `administrative`. If any of the agent's tools is still `unknown`, the agent is reported as not assessable rather than passed.

**Fix:** remove the administrative grants at the provider or replace them with the narrower permissions the tools need. If the agent does need administrative access, declare the tool that uses it as `administrative`.

## MCP servers that answer without credentials

An MCP connector set to send no credential (`authMode: none`) only reaches public addresses. When the server it points at still completes the handshake and lists its tools, the server is answering anybody on the internet. NHI Security records that observation, and the server gets a high finding. It is shown on the server's resource page and under **Findings**.

What is verified: the server listed its tools to a caller presenting no credential. What is not tested: whether it would also run a tool for that caller. Discovery never calls a customer's tools. A server reached with a bearer token is judged by this check only when its connector has the [MCP server assessment](/nhi-security/mcp-server-assessment) on, which repeats the handshake without the token.

**Fix:** put authentication in front of the server (the MCP authorization specification uses OAuth 2.1 bearer tokens) or take it off the public internet, then switch the connector to bearer authentication with a credential of its own. The next collection resolves the finding.

## Long-lived agent credentials

An agent's credential is the one most likely to end up in a prompt, a log or a tool call. This check raises a finding on an agent whose active credential reports no expiry, or whose expiry is more than `maxLifetimeDays` after it was created (default 90, range 1–730). Federated credentials, which carry no long-lived material, never fire. This is separate from `credential_rotation_overdue`, which measures how old a credential is rather than how long it is allowed to live.

**Fix:** replace it with a short-lived credential, such as a federated or workload identity where the platform supports one, or a token with an expiry and an owner who renews it. Revoke the old one once nothing uses it.

## Finding them in the console

- **Findings → Area: AI agents and MCP** narrows the list to every policy about agents and tool servers: these five, the twelve earlier agent policies and the four [MCP server assessment](/nhi-security/mcp-server-assessment) checks. It combines with the other filters.
- **Agents** links to that filtered list. Each agent's page lists its open findings.
- A tool's page shows the description matches. An MCP server's resource page lists the server's open findings.

## Availability

A check whose facts NHI Security does not hold reports **unavailable** rather than passing. `mcp_server_unauthenticated` needs at least one collected MCP server. The four agent checks need registered agents, and three of them (description, approval and privilege) also need tool entitlements. On an estate with no agents and no MCP server, all five are unavailable. See [Limitations](/nhi-security/limitations).
