Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Security & accessibilitySeniorCommonSecurity

How would you test the security boundary of an AI agent connected to MCP tools?

Answer

Inventory tools, data and side effects, then grant the least privilege needed for each role and environment. Test direct and indirect prompt injection, unauthorized tool discovery or invocation, parameter tampering, data exfiltration, approval bypass, replay and runaway loops. Enforce authorization in downstream systems, isolate test credentials and workspaces, log every call, and require parameter-bound approval for consequential actions.

Strong answer includes

  • tests both model behavior and downstream authorization
  • covers indirect injection and excessive agency
  • uses least privilege, isolation and auditable approvals

Practical example

A test plants an instruction inside a web page's hidden HTML comment telling the browsing agent to also call a delete-repository tool it has access to; a properly scoped agent either never has that destructive tool available in a read-only browsing session or refuses to act on instructions embedded in page content, and the test confirms which is actually true.

#mcp#ai-agent-security#prompt-injection#security-qa

Sources

Model Context Protocol specificationModel Context Protocol · AI host, client, server and tool behavior plus security and consent principlesOWASP Top 10 for LLM ApplicationsOWASP · Prompt injection, data disclosure, excessive agency and other LLM-specific risksPlaywright MCPMicrosoft · Agent-driven browser automation, capabilities, configuration and security boundaries