AI security

Testing AI agents and MCP: the new attack surface

A chatbot answers questions. An agent that reads your inbox, queries your CRM, edits files and calls APIs can take real actions. Agents — and the Model Context Protocol (MCP) servers that connect them to your systems — turn prompt injection into real-world consequences.

What changes with agents

An agent often combines three things:

  • access to private data;
  • exposure to untrusted content;
  • the ability to act or communicate externally.

When all three are present, a single malicious document can drive data exfiltration — without any traditional vulnerability at all.

MCP-specific risks

  • Over-scoped servers holding broad credentials.
  • Tool poisoning — hidden instructions in tool descriptions.
  • Confused deputy — the agent acts for the author of the content, not the user.
  • Weak authentication on remote MCP servers, or tokens accepted without audience checks.
  • Supply chain risk from community servers running with local permissions.

How we test agents

  1. Inventory the tools — every tool and MCP server, its credentials, and what it can read and do.
  2. Map dangerous combinations of private data, untrusted input and external action in one session.
  3. Indirect injection — plant instructions in emails, tickets, documents and pages.
  4. Tool misuse — attacker-chosen parameters, unintended chaining, and exfiltration via URLs, messages or file writes.
  5. Authorisation — does the agent enforce the end user’s permissions, or its own broader ones?
  6. Human-in-the-loop — can confirmations for sensitive actions be bypassed or socially engineered?
  7. Server security — authentication, input validation and secrets handling.

Controls that actually help

  • Least-privilege credentials for each tool, scoped to the user.
  • Avoid combining private data, untrusted content and external actions in a single agent.
  • Human confirmation before sending, paying, deleting or sharing.
  • An allow-list of vetted MCP servers.
  • Log every tool call with its parameters, and alert on unusual patterns.

The bottom line

Agents connected to real systems belong in your security testing scope now — before an attacker shows you what a well-placed email can make them do.

Frequently asked questions

What is MCP security testing?

Testing MCP servers and the agents that use them for over-privileged access, tool poisoning, indirect prompt injection, authorisation failures and data exfiltration paths.

Connecting agents to real systems?

Fixed-price testing, scoped and delivered by a senior tester, with live findings on the SMARTSEC client platform.