Skip to content
MCP Security Checklist

Security audit checklist for MCP servers and AI agents.

The five failure modes we find most often in production Model Context Protocol (MCP) servers and tool-calling agents, and how to verify every boundary on staging before enterprise launch.

Guide / MCP & AI Agent Audit Checklist

Must-pass security controls

  • Server-side caller and tenant binding on every MCP tool handler
  • Strict Host, Origin and CORS validation on HTTP/SSE transports
  • OAuth 2.1 audience checks and zero blind token passthrough
  • URL path-segment encoding and strict allowlists on wrapper routes
  • Database-enforced read-only roles rather than regex SQL filters
  • Explicit approval boundaries on write, delete and export tools

How to verify on staging

  1. 01Run august routes . to list every MCP tool and backing HTTP route
  2. 02Test cross-tenant reads and writes with two separate user tokens
  3. 03Fuzz tool parameters for ../ traversal, SSRF and SQL/command escapes
  4. 04Inject untrusted instructions via documents, tickets or RAG records
  5. 05Lock verified fixes into CI with SARIF 2.1.0 pull-request checks

Treat tools like public APIs ›

Every MCP tool argument can be controlled by an attacker through indirect prompt injection. Auditing an MCP server means verifying authorization, URL construction, database roles and network egress at the code boundary, not hoping a system prompt holds.

Five audit layers ›

What a real MCP security audit verifies live.

Explore our active open-source security advisories, engineer-verified MCP penetration tests, and open-source August CLI.

  1. 01Server-side identity

    Never trust model-supplied tenant IDs, user IDs or workspace slugs

    Every MCP tool handler must derive the caller identity and organization scope strictly from the verified session or OAuth token on the server. Any tool accepting an arbitrary account_id or project_id from model arguments is a direct cross-tenant BOLA vector.

  2. 02OAuth 2.1 & transport

    Validate Host, Origin, token audience and dynamic client registration

    Local and remote MCP servers frequently miss Origin/Host checks (enabling DNS rebinding and loopback CSRF) or forward bearer tokens across downstream APIs without verifying token audience and least-privilege scopes.

  3. 03Path & query encoding

    URL-encode every interpolated parameter before calling backing REST APIs

    MCP wrappers built over internal APIs often interpolate tool arguments directly into URL paths while attaching Authorization headers. Unencoded ../ segments or query injection let an attacker reach excluded admin endpoints.

  4. 04Read-only & sandbox guards

    Enforce read-only execution at the database role and OS boundary, not regex

    String-prefix checks like blocking INSERT or DELETE fail against database features such as PostgreSQL EXPLAIN (ANALYZE TRUE) with writable CTEs or shell metacharacters. Enforce least-privilege DB roles, allowlisted binaries and hard egress controls.

  5. 05Indirect prompt injection

    Gate state-changing, export and external-network tools behind explicit approvals

    Treat every retrieved email, PDF, ticket, web page or database field as untrusted input. High-impact write tools should require deterministic permission boundaries and human-in-the-loop confirmation independent of system prompts.

How should a startup audit an MCP server before an enterprise customer connects to it?

Start by enumerating every exposed tool, resource URI and backing API endpoint with automated discovery (such as august routes), then run a live staging test across two separate tenant accounts covering OAuth 2.1, path traversal, read-only bypasses and indirect prompt injection.

Are prompt guardrails enough to secure an AI agent or MCP server?

No. System prompts and LLM classifiers are probabilistic and routinely bypassed by untrusted data. Real security controls must live in server-side authorization, database permissions, strict URL/path validation and network egress rules.

Can we test our MCP server automatically in CI on every pull request?

Yes. The open-source August CLI discovers MCP tools across Node/Express and Python codebases, runs authorized staging exploit checks across two test tokens, generates minimal patch diffs and exports SARIF 2.1.0 gates for GitHub Actions.

What deliverables do enterprise buyers expect from an AI agent security audit?

Enterprise security teams ask for third-party verification covering tool permissions, tenant isolation, data retention and remediation proof, backed by a signed Letter of Attestation you can share alongside your SOC 2 report.

Need an engineer-verified MCP or AI agent audit?

Share your staging MCP server or agent architecture. We test across real tenant accounts, deliver minimal source patches, retest fixes and sign your Letter of Attestation in 48 to 72 hours.

Book a 15-minute scoping call: august.so/book.