The Model Context Protocol (MCP) provides a standard way for AI agents to interact with external tools, retrieve data, and perform actions within business applications. Each MCP server an agent connects to can execute code, handle credentials, and return information that influences the model’s decisions. This places the server at an important security boundary within the integration. An MCP server security assessment examines how that boundary is protected, including the server’s code, tool definitions, authorization mechanisms, and access to connected systems.
This article examines how weaknesses in MCP server integrations can be exploited and the conditions that make these attacks possible. It focuses on tool poisoning, token handling, supply chain vulnerabilities, and server-side request forgery (SSRF), drawing on the protocol’s security guidance. It also explores how a structured assessment can test these areas, helping security teams identify weaknesses and evaluate the risks before deploying AI agent integrations in production.
1. How Tool Descriptions Can Become an Attack Channel
When an AI agent connects to an MCP server, the server provides a list of available tools, including their names, descriptions, and input schemas. The model uses this information to understand each tool’s purpose, select the appropriate tool, and determine which arguments to pass.
In April 2025, Invariant Labs demonstrated how malicious instructions embedded in a tool description could influence an AI agent to retrieve a private SSH key and transmit it as a tool parameter, without making the underlying instruction apparent to the user. A Cloud Security Alliance research note highlights another concern: an MCP server can modify its tool descriptions after the initial approval. As a result, a tool that was previously reviewed may later present different instructions or behaviour without requiring the user to approve the changes again.
2. Token Handling and the Confused Deputy Problem
Remote MCP servers often act as intermediaries between AI agents and third-party APIs, making secure token handling essential. The MCP security best practices prohibit token passthrough, in which an MCP server accepts an access token that was issued for a different service and forwards it to a downstream API. This practice can bypass the intended authorization controls, including request validation and rate limiting, while making it harder to establish which client initiated a request.
The same guidance describes a confused deputy attack involving proxy servers that use a single static client ID. An attacker can register a client with a malicious redirect URI and exploit an existing consent session to redirect an authorization code to their own endpoint without requiring the user to approve the new request.
Overly broad OAuth scopes can further increase the impact of a compromised token. If a token grants access beyond what a specific task requires, an attacker may be able to reach additional tools or data. Restricting scopes to the minimum permissions necessary helps limit the potential impact of a compromise.
3. Supply Chain Risk and Network Exposure
Most MCP servers are distributed through software packages, making every installation and update a potential supply chain risk. Package registries introduce additional exposure through incidents such as maintainer account takeovers, in which attackers gain control of accounts belonging to trusted package maintainers. In September 2025, researchers reported that version 1.0.16 of the npm package postmark-mcp introduced code that silently copied outgoing emails to an external address. Local MCP servers typically inherit the privileges of the process that launches them. Consequently, a compromised package may gain access to files, credentials, and other resources available to that process.
Server-side request forgery (SSRF) is another risk, and it can arise at different points in an MCP integration. During OAuth metadata discovery, the MCP client retrieves URLs supplied by the server, including authorization server endpoints. A malicious server could provide URLs pointing to internal systems or cloud metadata endpoints. If the client does not validate these destinations, it may send requests to resources within its own network. Separately, an MCP server that provides URL-fetching functionality may introduce its own SSRF exposure by making requests to attacker-controlled or internal addresses. These two scenarios involve different components, so both the client and server request paths should be assessed.
4. What an MCP Server Penetration Test Covers
An effective MCP security assessment examines the entire integration, from the host and client to the MCP server and its connected services. Testers first map the available tools, identify the credentials associated with each integration, and determine which systems and data those tools can access. Using controlled accounts and synthetic data, the assessment then focuses on four key areas:
- Tool definitions: Compare tool descriptions and schemas against approved versions, checking for hidden instructions, unexpected changes, or manipulated parameter definitions.
- Authentication and authorization: Examine token audience validation, OAuth scopes, consent flows, and access controls applied to individual tools.
- Input validation: Test tool inputs for vulnerabilities such as path traversal, command injection, and server-side request forgery (SSRF).
- Supply chain and execution security: Review package provenance, dependency versions, process privileges, and access to the host file system.
Test findings are manually validated, assessed according to their potential business impact, and retested after remediation to confirm whether the identified issues have been addressed. A penetration test of the MCP integration can cover these areas alongside API penetration testing, which examines the security of the downstream services connected to the integration.

MCP servers connect AI agents to tools, data, and business systems, giving them the ability to perform actions beyond generating responses. However, weaknesses in tool definitions, token handling, or package integrity can expose those connected resources to misuse. Assessing these risks before deployment helps organizations understand the security boundaries of their MCP integrations and identify weaknesses that need to be addressed.
If your organization is deploying or integrating MCP servers, explore Laburity’s security testing services or book a consultation to discuss an assessment of your AI agent integrations.