AI
Compliance
DevOps

MCP Server Security: OWASP MCP Top 10 Risks and a Practical Checklist

Quick answer: how do you secure an MCP server?

MCP server security means protecting the Model Context Protocol servers that connect AI agents to your tools and data. The essentials are: require strong authentication (OAuth 2.1 with short-lived, scoped tokens) because the protocol makes authorisation optional; give each server and tool the least privilege it needs; keep secrets out of prompts and config files; validate every input and run servers in a sandbox; vet and pin servers like any other dependency to stop tool poisoning and supply chain attacks; require human approval for risky actions; and log every tool call centrally. The OWASP MCP Top 10 is the best checklist to start from.

The Model Context Protocol has become the standard way to connect AI agents to real systems: code repositories, databases, ticketing tools, cloud consoles. That is exactly what makes it risky. An MCP server is a bridge between a language model, which can be manipulated through text, and systems that hold your data and run your business.

This guide explains the main MCP server security risks, maps them to the OWASP MCP Top 10 and gives a practical checklist for teams running MCP in production. It is written by the engineers behind Gart Solutions’ compliance consulting and DevOps services. If you are new to the protocol, start with our explainer on what an MCP server is.

Connecting AI agents to production systems? Book a free 30-minute call and get a quick security review of your MCP setup from a Gart engineer.

Get a free MCP security review

Why MCP Servers Are a New Attack Surface

MCP servers grew faster than the security practices around them. According to the Cloud Security Alliance, researchers had catalogued nearly 7,000 MCP servers exposed to the internet by early 2026, roughly half without any authentication, and more than 30 CVEs were filed against MCP servers, clients and infrastructure in January and February 2026 alone.

Traditional APIMCP server
Called by code written and reviewed by developersCalled by an AI model deciding at runtime which tool to use
Inputs come from known clientsInputs can come from prompts, documents, web pages and other tools, any of which may carry hidden instructions
Tool documentation is for humansTool descriptions are read by the model and influence its behaviour
Authentication is standard practiceAuthorisation is optional in the protocol, so many servers ship without it
Dependencies are scanned in CI/CDServers are often installed from community registries with a single command

OWASP MCP Top 10 Risks Explained

The OWASP MCP Top 10 is the first dedicated list of MCP risks. It is still in beta, but it already gives teams a shared vocabulary.

RiskWhat it meansKey control
MCP01 Token mismanagement and secret exposureAPI keys and tokens leak through config files, logs or model contextSecrets manager, short-lived tokens, no secrets in prompts
MCP02 Privilege escalation via scope creepServers gain broader permissions over time than their tools needLeast privilege per tool, regular scope reviews
MCP03 Tool poisoningHidden instructions in tool descriptions or metadata steer the modelVet and pin tool definitions, alert on changes
MCP04 Supply chain attacksMalicious or compromised server packages and dependenciesTrusted sources, pinned versions, dependency scanning, SBOM
MCP05 Command injection and executionUnvalidated input reaches shell commands or code executionStrict input validation, no shell where avoidable, sandboxing
MCP06 Prompt injection via contextual payloadsInstructions hidden in documents, web pages or tool outputsTreat all tool output as untrusted, human approval for risky actions
MCP07 Insufficient authentication and authorisationServers reachable without auth, or with weak authorisation boundariesOAuth 2.1, scoped tokens, no token passthrough
MCP08 Lack of audit and telemetryNo record of which agent called which tool with what dataCentral logging of every tool call, alerts on anomalies
MCP09 Shadow MCP serversUnapproved servers set up by teams or individualsApproved registry, discovery scans, gateway enforcement
MCP10 Context injection and over-sharingToo much sensitive data placed into model contextReturn minimal data, mask sensitive fields, data classification

Secure your AI agents before they reach production data.

Gart Solutions reviews your MCP servers, agent workflows and cloud permissions, then implements the controls: authentication, least privilege, sandboxing, logging and CI/CD checks.

  • MCP and AI agent security assessment mapped to the OWASP MCP Top 10
  • Identity, secrets and least-privilege design for agents and tools
  • Logging, monitoring and policy enforcement in your cloud and pipelines
Explore compliance consultingBook an assessment

Authentication and Authorisation for MCP

Because the specification treats authorisation as optional, it is the first thing to fix. A remote MCP server without authentication is effectively a public API into your systems.

DoAvoid
Require OAuth 2.1 for every remote serverUnauthenticated servers on public or internal networks
Issue short-lived tokens scoped to specific tools and resourcesLong-lived personal access tokens with full account rights
Validate that each token was issued for your server (audience check)Token passthrough: forwarding the user’s token to downstream APIs
Use separate identities for each agent and serverOne shared service account for every agent
Bind local servers to localhost and use stdio where possibleLocal servers listening on all network interfaces

Agent and server identities are non-human identities, and they need the same lifecycle as any other credential: owner, scope, rotation and revocation. The OWASP MCP Security Cheat Sheet gives detailed implementation guidance.

Tool Poisoning, Prompt Injection and Supply Chain Risks

The model sees the descriptions of every tool from every connected server. That means a single malicious or compromised server can influence how the agent uses all the others, for example by telling it to read a credentials file and pass the contents to another tool.

ThreatExampleDefence
Tool poisoningA tool description contains hidden instructions to send data elsewhereReview descriptions before approval, pin versions, alert on any definition change
Rug pullA trusted server changes its tool definitions after installationHash and pin tool definitions, re-approve on change
Indirect prompt injectionA web page, email or ticket contains instructions the agent followsTreat tool output as data, limit what agents can do after reading untrusted content
Malicious packageA look-alike server in a community registry steals tokensInstall only from verified publishers, scan dependencies, keep an SBOM
Cross-server data leakageData from a sensitive server flows into a tool on an untrusted oneSeparate sensitive and untrusted servers into different agents or sessions

Not sure which MCP servers your teams are running? We find shadow servers, review their permissions and put an approved registry and gateway in place.

Request an MCP audit

Sandboxing, Least Privilege and Human Approval

ControlHow to apply it
Sandbox every serverRun local servers in containers or sandboxes with minimal file system, process and network access
Read-only by defaultSeparate read and write tools; grant write access only where a workflow needs it
Restrict network egressAllow servers to reach only the APIs they need, block everything else
Human in the loopRequire explicit user approval for destructive, financial or data-export actions
Limit blast radiusUse separate cloud accounts, projects or namespaces for agent workloads
Rate and cost limitsCap tool calls per session to stop runaway agents and abuse

On Kubernetes, the same building blocks apply as for any workload: network policies, pod security standards, workload identity and separate namespaces. Our guide to DevSecOps tools covers scanning and policy tools that fit into this setup.

Logging, Monitoring and Governance

You cannot investigate what you did not record. Every tool call should be logged with the agent identity, user, tool name, parameters (with sensitive values masked), result size and outcome. Send these logs to your central monitoring stack and alert on unusual patterns: new tools, spikes in calls, access to sensitive resources, or calls outside working hours.

Governance elementPurpose
Approved MCP server registryOne list of vetted servers, versions and owners
MCP or AI gatewaySingle enforcement point for authentication, scopes, rate limits and logging
CI/CD security checksScan server code and dependencies, generate an SBOM, block unapproved changes
Regular access reviewsRemove unused servers, tools and permissions
Incident playbookKnow how to revoke tokens and disable a server within minutes
Compliance mappingLink MCP controls to ISO 27001, ISO 42001, SOC 2, NIS2 and the EU AI Act

For the observability side, see our comparison of observability tools. For AI governance frameworks, see ISO 42001 and the Cyber Resilience Act, which applies to software products that ship MCP components.

MCP Server Security Checklist

AreaCheck
InventoryAll MCP servers in use are listed with owner, version and purpose
AuthenticationEvery remote server requires OAuth 2.1 or equivalent; no anonymous access
TokensShort-lived, scoped tokens; no token passthrough; secrets in a vault
PermissionsLeast privilege per tool; write and destructive tools separated and approved
Supply chainTrusted sources, pinned versions, dependency scanning, SBOM
Tool definitionsDescriptions reviewed, hashed and monitored for changes
Input handlingAll inputs validated; no unsanitised shell or code execution
IsolationServers sandboxed with restricted file system and network egress
Human approvalRequired for high-risk actions
LoggingEvery tool call logged centrally with alerts on anomalies
ResponsePlaybook to revoke tokens and disable servers quickly

Case Studies: Security and Compliance Work by Gart

ClientWhat Gart didRelevance to MCP security
Cybersecurity companyBuilt a robust, automated CI/CD pipeline for a security productThe same pipeline controls scan and gate MCP server code and dependencies
Spiral TechnologySupported ISO 27001 compliance with infrastructure audit and cloud improvementsAccess control, logging and evidence that MCP governance builds on
LeTextoInfrastructure audit that uncovered unpatched software and weak access controlsShows how an audit turns hidden exposure into a prioritised fix plan
MedWrite.aiSecure, compliant Azure infrastructure for a healthcare AI productAI systems handling sensitive data need security designed in from day one

Why Work with Gart on AI Agent and MCP Security

What you getWhy it matters
Security and engineering in one teamWe find the risks and implement the fixes in your cloud, Kubernetes and pipelines
Framework mappingControls mapped to OWASP, ISO 27001, ISO 42001, SOC 2, NIS2 and the EU AI Act
DevSecOps experienceDependency scanning, SBOMs, secrets management and policy checks in CI/CD
Cloud identity expertiseLeast-privilege IAM and workload identity on AWS, Azure and GCP
Monitoring and responseCentral logging and alerting through our SRE and monitoring services

Let your AI agents work without opening new doors to attackers.

Book a free consultation with Gart. We will review how your agents connect to tools and data, and outline the controls you need first.

  • Free 30-minute MCP and AI agent security call
  • Assessment against the OWASP MCP Top 10 with a prioritised plan
  • Hands-on implementation in your cloud and CI/CD
Book a free consultationSee audit services

You Might Also Like

FAQ

What is MCP server security?

MCP server security is the set of controls that protect Model Context Protocol servers, the components that give AI agents access to tools and data. It covers authentication and authorisation, least-privilege scopes, secret handling, input validation, sandboxing, supply chain checks, logging and monitoring, and defences against tool poisoning and prompt injection.

What are the biggest MCP security risks?

The OWASP MCP Top 10 lists token mismanagement and secret exposure, privilege escalation through scope creep, tool poisoning, supply chain attacks, command injection, prompt injection through contextual payloads, weak authentication and authorisation, missing audit and telemetry, shadow MCP servers, and context over-sharing.

Does MCP require authentication?

Authorisation is optional in the MCP specification, so a server can be deployed with no authentication at all. Remote MCP servers should always require authentication, preferably OAuth 2.1 with short-lived, narrowly scoped tokens, and should never pass a user's token through to downstream services.

What is MCP tool poisoning?

Tool poisoning is an attack where malicious instructions are hidden in a tool's description or metadata. The AI model reads these descriptions as part of its context and may follow the hidden instructions, for example to read files or send data to an attacker, even if the user never calls the poisoned tool directly.

How do I secure a local MCP server?

Install servers only from trusted sources with pinned versions, run them in a sandbox or container with minimal file system and network access, keep secrets out of configuration files, require user approval for sensitive actions, and review tool descriptions before enabling a server.

How do companies govern MCP servers?

Companies keep an approved registry of MCP servers, route traffic through an MCP or AI gateway that enforces authentication, scopes and logging, scan servers in CI/CD like any other dependency, monitor tool calls centrally and regularly look for unapproved shadow servers.
arrow arrow

Thank you
for contacting us!

Please, check your email

arrow arrow

Thank you

You've been subscribed

We use cookies to enhance your browsing experience. By clicking "Accept," you consent to the use of cookies. To learn more, read our Privacy Policy