Your Insecure MCP Server Won't Survive Production — Tun Shwe, Lenses
Summary
This session, led by Tin Shway and Jeremy Fronae of Lenses, addresses the critical security and design flaws prevalent in most MCP (Multi-tool Co-pilot) servers, particularly when transitioning from local development to production environments. It highlights that agents require interfaces optimized for their use cases, emphasizing that poor design directly correlates with poor security. The presentation details three key differences between human and agent interaction—discovery, iteration, and context—each casting a "security shadow" that can lead to tool poisoning, data leakage, and context injection vulnerabilities. Five secure agentic design principles are introduced: shrinking the attack surface, constraining inputs at the schema level, treating documentation as a defensive layer, returning only necessary data, and minimizing blast radius. The session also covers the "security cliff" encountered when deploying MCP servers to production, necessitating robust OAuth 2.1 implementations, and contrasts Dynamic Client Registration (DCR) with the more secure Client ID Metadata Document (CIMD) approach for client authentication.
Key takeaway
For AI Engineers and MLOps Engineers deploying agentic AI systems, prioritize secure MCP server design from the outset. Implement the five key design principles to mitigate common vulnerabilities before writing any OAuth code. Transitioning to production demands robust OAuth 2.1 flows, with CIMD offering superior security over DCR by verifying client identities and enabling selective client authorization, crucial for enterprise-grade compliance and data protection.
Key insights
Secure MCP server design requires agent-centric interfaces, robust authentication, and strict data governance to prevent vulnerabilities.
Principles
- Good MCP design is synonymous with good MCP security.
- Less exposed surface area reduces attack vectors.
- OAuth 2.1 with CIMD is preferred for enterprise-grade security.
Method
Design MCP servers by consolidating operations, constraining inputs via schema, using documentation defensively, stripping unnecessary data from responses, and scoping permissions at the tool/resource level.
In practice
- Use Pydantic for strict input validation in MCP tools.
- Implement CIMD for dynamic client registration.
- Apply OAuth scopes for session-level permissions.
Topics
- MCP Server Security
- Agentic AI Design
- OWASP MCP Top 10
- OAuth 2.1 Authorization
- Dynamic Client Registration
Best for: AI Security Engineer, AI Engineer, MLOps Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by AI Engineer.