What Is MCP Security? Risks, Controls, and Trust Boundaries
Learn what MCP security covers, how host, client, server, identity, metadata, tools, and downstream systems create distinct trust boundaries.
By Agent Guard Team11 min read
What Is MCP Security? Risks, Controls, and Trust Boundaries
MCP security is the practice of protecting Model Context Protocol connections, servers, capabilities, credentials, data, and downstream actions. It covers the full path from an AI host discovering a server to a tool changing an external system. The protocol standardizes communication; each deployment still has to establish trust, authorization, safe execution, and evidence.
MCP security definition
Model Context Protocol connects AI applications to external tools, resources, and prompt templates through defined host, client, and server roles. Model Context Protocol definition explains those roles in more detail.
What the term includes
MCP security includes server provenance, installation, transport, identity, capability discovery, tool schemas, metadata, prompt injection, user consent, downstream authorization, credential handling, network reach, updates, logging, and incident response.
A secure connection should answer four questions: Which server is this? Who is calling? What exact capability is allowed? What happened in the downstream system?
How the MCP trust boundary works
An MCP deployment crosses several independently owned boundaries. Collapsing them into one "trusted server" label hides the decisions that matter.
Host and client
The host manages user interaction, consent, policy, model context, and client connections. The client maintains a protocol connection to one server. The host should isolate connections so a server cannot silently inherit authority granted to another.
Server and downstream system
The server advertises capabilities and handles requests. It may call a database, SaaS API, filesystem, shell, or internal service. The downstream system must still enforce resource and tenant boundaries. A valid MCP request should not grant more access than the caller is entitled to receive.
The official MCP security best practices describe threats such as confused-deputy behavior, token misuse, and session risks that implementers should address.
Those practices need deployment-specific tests. An architecture diagram cannot show whether a token for one resource works against another in the running environment.
The main MCP security risks
MCP concentrates useful capabilities behind descriptions a model can discover and invoke. That makes metadata, identity, and downstream effect part of the attack surface.
Tool poisoning and prompt injection
A malicious or compromised server can place instructions in tool descriptions, resources, prompts, or returned content. The model may follow those instructions and invoke an unrelated tool. Treat server-controlled text as data without authority to change the user's goal.
Identity and authorization failures
Remote servers can accept the wrong issuer, audience, scope, or resource token. A server may also use one broad service credential downstream and trust caller-supplied tenant IDs. These failures create confused-deputy and cross-tenant paths.
Supply-chain and update risk
Local servers run as packages or executables with the launching user's environment. A new maintainer, dependency, install script, or silent update can change code and tool metadata. Pin versions and review artifact changes.
Data exposure and unsafe effects
Overbroad resources may return secrets or personal data. Generic file, shell, browser, and HTTP tools can turn a small prompt manipulation into a large effect. Scope read and write operations separately and constrain destinations.
The OWASP MCP Top 10 offers a practical catalog of MCP risks and mitigations for threat-model workshops.
Use the catalog to select cases, then validate the exact client, server, credential, and backend path. Avoid treating category coverage as proof of enforcement.
Core MCP security controls
Controls should reduce initial trust, limit authority, and preserve enough evidence to reconstruct a decision.
Inventory and provenance
Maintain an approved registry of server owner, source, version, hash, transport, capabilities, required permissions, and downstream systems. Alert on new servers, changed commands, schema drift, and unexpected metadata updates.
Least privilege
Give each server and tool the minimum filesystem, network, token, tenant, and API scope. Separate read from write. Use short-lived credentials and ensure a tool cannot choose arbitrary destinations or resource identifiers.
Content and action separation
Keep untrusted tool content separate from policy and user authority. Validate arguments before execution and require specific confirmation for consequential actions. Recheck the final target and payload after approval.
Logging and testing
Correlate user, host, client, server version, tool, normalized arguments, policy decision, approval, downstream target, and outcome. Test malformed input, poisoned metadata, wrong scopes, cross-tenant IDs, direct backend access, replay, and failure behavior.
MCP security versus API security
MCP often sits in front of existing APIs. It inherits API security requirements and adds model-mediated discovery plus instruction risks.
Shared controls
Both need authentication, authorization, schema validation, rate limits, network controls, secrets management, audit logs, secure development, and incident response. Downstream APIs should never assume an MCP server makes a request safe.
Agent-specific controls
MCP also needs capability provenance, tool-description review, prompt-injection resistance, explicit consent, action confirmation, context isolation, and tests for model-driven tool selection. These controls address how untrusted content can influence an agent.
How to assess an MCP connection
Start with one high-impact tool and trace it to the final system of record.
A six-step check
1. Identify the server source, owner, version, transport, and deployment artifact. 2. Export tools, resources, prompts, schemas, credentials, and downstream destinations. 3. Test valid, invalid, wrong-scope, wrong-audience, and cross-tenant requests. 4. Place inert hostile instructions in metadata and returned content. 5. Verify approval, action limits, downstream outcome, and complete audit correlation. 6. Fix findings, rerun the original case, and test alternate paths.
Document the pass condition and retained evidence before testing. This prevents a smooth demo from being mistaken for a security result.
Build an evidence matrix before rollout
Convert every important What Is MCP Security control claim into a row with five fields: the protected asset, the initiating identity, the proposed action, the independent enforcement point, and the final evidence. Add one allowed case and one denied case. This prevents a review from stopping at a settings page while an alternate path can still reach the same effect.
Reviewers should ask what changes when What Is MCP Security moves from interactive assistance to delegated or autonomous work. Record network destinations, inherited credentials, repository or data scope, durable state, extension behavior, and approval timing. A control that works during a supervised prompt may not cover a background task, retry, delegated agent, or integration token.
Use synthetic records and inert targets for the first What Is MCP Security run. Preserve the effective configuration, request, policy input, decision, user-facing result, downstream state, and timestamp. A result is complete only when the team can connect the original user intent to the final system effect.
Assign control ownership
For What Is MCP Security, name the team that owns identity, platform configuration, downstream authorization, data policy, runtime decisions, monitoring, and incident response. Define which owner can stop the workflow and how quickly revocation propagates. Shared responsibility without an explicit handoff usually becomes a gap during failure.
Test change and recovery paths
A What Is MCP Security security evaluation must cover change, not only initial configuration. Repeat the baseline when models, prompts, extensions, tools, permissions, dependencies, network destinations, or administrative policies change. Compare the previous and current evidence so reviewers can distinguish intended evolution from drift.
Exercise What Is MCP Security recovery with a harmless scenario. Revoke the agent credential, disable the integration, quarantine a component, and verify that queued or retried work cannot continue with cached authority. Confirm that investigators can retrieve the complete trace without exposing secrets or unrelated user data.
Define release criteria
For What Is MCP Security, require a useful allowed case, a blocked high-impact case, a review case, a tested stop mechanism, and a complete evidence record. Document any unsupported path as a release exception with an owner, expiry date, and compensating control.
For What Is MCP Security, preserve the versioned configuration and rerun the denied case after every material change. Verify both the policy decision and the downstream result, because either side alone can hide a bypass or partial failure.
Review What Is MCP Security network behavior from the actual execution environment. Test an approved destination and an inert denied destination, then confirm that retries, redirects, package downloads, and delegated work cannot escape the same policy.
Inspect how What Is MCP Security handles credentials. Record issuance, scope, storage, redaction, expiry, and revocation. A workflow can misuse a secret without printing it, so verify destination and downstream effects as well as prompt and log exposure.
Test What Is MCP Security with untrusted content placed in a realistic source such as a document, issue, page, or tool response. The content may influence planning, but it must not grant authority or remove an approval requirement.
Confirm that What Is MCP Security audit evidence survives a partial failure. Correlate the original request, active versions, proposed action, policy decision, approval, execution status, and target-system outcome without storing unnecessary sensitive data.
Run the What Is MCP Security release review with platform, application, IAM, data, and incident-response owners. Resolve gaps in ownership, stop authority, and evidence retrieval before granting production credentials or irreversible access.
Document every What Is MCP Security exception with its business reason, affected assets, compensating control, owner, and expiry date. Retest the normal boundary when the exception ends so temporary authority does not become permanent drift.
After release, monitor What Is MCP Security denials, approvals, unusual targets, permission changes, component updates, and trace gaps. Use those signals to select regression cases, while keeping the approved allow path available to legitimate users.
Define a What Is MCP Security fallback for unavailable policy, network loss, incomplete context, and downstream timeout. High-impact actions should fail closed or pause for review; low-impact work may continue only under an explicit cached policy with a bounded lifetime.
Separate the What Is MCP Security detection result from the enforcement result. Record which component recognized the risk, which component made the decision, and which system enforced it. This distinction makes partial coverage and failed integrations visible.
Check the What Is MCP Security user experience for clear denial reasons and recovery steps. Users should know which boundary stopped the request, what safe alternative remains available, and who can review a legitimate exception without bypassing policy.
Keep the What Is MCP Security test corpus versioned and non-destructive. Add a regression case for every confirmed failure, remove sensitive payloads, and retain enough context to reproduce the policy decision after a model or integration upgrade.
Measure What Is MCP Security operations with control-focused signals: complete traces, unexplained denials, approval latency, expired exceptions, revocation delay, and drift from approved versions. Avoid presenting alert volume alone as evidence of protection.
Where AgentGuard fits
The AgentGuard MCP security solution describes scanning and protection layers for MCP-related workflows. AgentGuard also documents Deep Scan for MCP servers and Runtime Guard checks for selected proposed actions.
Select one high-impact tool and confirm exactly where the documented product decision appears before treating it as part of the control path.
Documented scope and limit
Use the AgentGuard documentation to confirm the supported integration and control point. AgentGuard publicly states that it cannot fully monitor or block every third-party MCP runtime call, so the server and downstream system remain responsible for identity, authorization, and final effect.
Teams can Inspect an MCP Connection to add a scoped component or action check to their review.
Frequently Asked Questions
Are MCP servers a security risk?
They can be. Risk depends on server provenance, privileges, exposed capabilities, metadata, credentials, downstream access, and the host's approval and isolation controls.
Does MCP include authorization?
MCP defines an authorization framework for HTTP-based transports. Implementers still need correct token validation, scopes, resource binding, user consent, and downstream enforcement.
What is MCP tool poisoning?
Tool poisoning is the manipulation of tool metadata or behavior so a model is influenced to reveal data, call another tool, or perform an action outside the user's intent.
How do you secure a local MCP server?
Pin and verify the artifact, restrict the launch environment, filesystem and network, review tool schemas and metadata, minimize credentials, and monitor changes.
What should an MCP security test prove?
It should prove server identity, caller authorization, argument validation, resistance to hostile content, bounded side effects, and correlated evidence at the downstream system.
Inspect one high-impact agent path before production rollout.
Test the Path