MCP & agents

MCP security checklist: 10 controls before a tool server touches real data

DEV: mcp Josue Barros
MCP & agents

An MCP server is a remote API whose caller is a language model, and the piece lays out ten concrete controls — from audience-bound tokens and per-tool authorization to idempotent writes and tracing. It gives teams a checklist of evidence to collect before a tool server is allowed near real customer data.

Key points

  • Authenticate client and user separately; bind the token audience to your MCP resource with a short lifetime.
  • Authorize per tool and per argument, and resolve tenant from the session rather than model-supplied arguments.
  • Return 404 for another tenant's object instead of 403, which confirms the object exists.
  • Treat tool descriptions and tool results as untrusted; delimit output as data and run least privilege.
  • Validate every argument against a server-side schema, cap output size, paginate by cursor and redact fields.
  • Make writes idempotent and append audit rows with tool version, actor, latency and trace id.

Why it matters

Most teams treat MCP as an integration task and expect the protocol to supply an authorization model; it only standardizes transport and message shapes. The useful part of this checklist is that every control maps to evidence you can run in CI: a cross-tenant read, an oversized output, a retry after timeout. If you are building agent tooling, the fastest win is to stop deriving tenant from model arguments and enforce it in the session plus database row-level security. As your tool count grows, avoid the single admin tool and plan versioning and a kill switch early.

Real-world use

  • A multi-tenant SaaS MCP tool server that searches and reads customer records
  • An agent flow that performs high-risk writes such as refunds and needs a human confirmation step
  • An agent that pulls tickets or documents into context and is exposed to prompt injection

This summary was generated by the agent from the original post on DEV: mcp. The full text and all rights belong to its author and publisher. Go to original

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message