“MCP Does Not Stand for Misuse Cryptography Protocol”: Uncovering Cryptographic Misuse in Model Context Protocol at Scale

Biwei Yan, Yue Zhang, Minghui Xu, Hao Wu, Yechao Zhang, Kun Li, Guoming Zhang, Xiuzhen Cheng · 2025

Read “MCP Does Not Stand for Misuse Cryptography Protocol”: Uncovering Cryptographic Misuse in Model Context Protocol at Scale by Biwei Yan, Yue Zhang, Minghui Xu, Hao Wu, Yechao Zhang, Kun Li, Guoming Zhang, Xiuzhen Cheng (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-03775.txt.

Introduction

The Model Context Protocol has become popular middleware connecting language models to tools, but it ships with almost no built-in security. Biwei Yan and a large team argue in a 2025 security preprint that developers must add encryption themselves. Hand-rolled cryptography has a long record of misuse, and here it guards sensitive data and services.

The team built MICRYSCOPE, a detector designed for cryptographic misuse in this ecosystem. It translates crypto code from many languages into one shared representation, maps function dependencies, and tracks sensitive data flows against established rules. Applied to more than nine thousand servers, it found crypto logic in several hundred, and about one in five of those misused it. Misuse clustered in certain registries, in Python code, and in developer tools. Case studies uncovered leaked API keys, weak DES encryption, and MD5-based authentication bypasses.

Catalog record

CREATORBiwei Yan, Yue Zhang, Minghui Xu, Hao Wu, Yechao Zhang, Kun Li, Guoming Zhang, Xiuzhen Cheng
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE68 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2512-03775

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

“MCP Does Not Stand for Misuse Cryptography Protocol”: Uncovering Cryptographic Misuse in Model Context Protocol at Scale Biwei Yan, Yue Zhang, Minghui Xu, Hao Wu, Yechao Zhang, Kun Li, Guoming Zhang, Xiuzhen Cheng Abstract . The Model Context Protocol (MCP) is rapidly emerging as the middleware for LLM-based applications, offering a standardized interface for tool integration. However, its built-in security mechanisms are minimal: while schemas and declarations prevent malformed requests, MCP provides no guarantees of authenticity or confidentiality, forcing developers to implement cryptography themselves. Such ad hoc practices are historically prone to misuse, and within MCP they threaten sensitive data and services. We present MICRYSCOPE , the first domain-specific framework for detecting cryptographic misuses in MCP implementations. MICRYSCOPE combines three key innovations: a cross-language intermediate representation that normalizes cryptographic APIs across diverse ecosystems, a hybrid dependency analysis that uncovers explicit and implicit function relationships (including insecure runtime compositions orchestrated by LLMs) and a taint-based misuse detector that tracks sensitive data flows and flags violations of established cryptographic rules. Applying MICRYSCOPE to 9,403 MCP servers, we identified 720 with cryptographic logic, of which 19.7% exhibited misuses. These flaws are concentrated in certain markets (e.g., Smithery Registry with 42% insecure servers), languages (Python at 34% misuse rate), and categories (Developer Tools and Data Science & ML accounting for over 50% of all misuses). Case studies reveal real-world consequences, including leaked API keys, insecure DES/ECB tools, and MD5-based authentication bypasses. Our study establishes the first ecosystem-wide view of cryptographic misuse in MCP and provides both tools and insights to strengthen the security foundations of this rapidly growing protocol. 1. Introduction The rapid adoption of Model Context Protocol (MCP) ( wiki_mcp ) has reshaped how large language models (LLMs) interact with external tools, databases, and services. By decoupling model reasoning from tool execution, MCP provides a standardized interface for heterogeneous capabilities, enabling structured requests that are mediated by clients and executed by servers. This abstraction simplifies integration and creates a uniform communication channel, positioning MCP as a foundational layer in AI ecosystems. Recent developments further underscore its momentum: Microsoft has also positioned MCP as the “USB-C for AI apps,” embedding it into its Windows AI Foundry to enable cross-platform interoperability ( verge_microsoft ) . Industry analyses suggest that MCP is on track to become the de facto middleware for intelligent systems, akin to HTTP in the web era, with forecasts indicating that more than 75% of enterprises will invest MCP by 2025 ( superagi_trends ) . These trends highlight not only MCP’s accelerating adoption ( axios_mcp ; contentful_mcp ) but also its growing role as critical infrastructure in the agentic AI ecosystem. Despite its promise, MCP’s built-in security mechanisms remain minimal. At the protocol level, it enforces JSON-based schemas, capability declarations, and identifier traceability. While these safeguards help prevent malformed requests and enable basic auditing, they fall short in two critical areas: authenticity and confidentiality. MCP cannot natively guarantee that request–response messages are genuine or protected from interception, forcing developers to implement custom cryptographic safeguards such as encryption, authentication codes, or digital signatures. Here lies the crux of the problem. History shows that when security-critical tasks are delegated to individual developers, cryptographic misuse is not the exception but the norm ( ami2022crypto ; fischer2024challenges ; karimova2025model ; mandal2024belt ; kim2024privacy ) . From hard-coded keys ( ChenCWWJSXP25 ; ShiYZ0Y0025 ) and fixed random seeds to weak hashes like MD5 ( torres2023runtime ; wickert2022fix ) and insecure modes such as ECB ( chen2024towards ) , decades of research have consistently demonstrated the prevalence of errors when developers directly handle cryptographic APIs. Within MCP, the risk is magnified: servers often mediate access to sensitive data and proprietary services, meaning that even subtle misuses such as predictable random values or unauthenticated encryption can escalate into systemic vulnerabilities with far-reaching consequences. Unfortunately, existing program analysis and misuse detection tools are ill-suited to the unique challenges of MCP. First, MCP servers are highly heterogeneous, spanning over ten programming languages (e.g., Python, C++, Java, JavaScript) with differing type systems, memory models, and cryptographic libraries. Second, MCP tools are often weakly coupled, leaving it to the LLM at runtime to orchestrate function compositions that may combine otherwise benign operations into insecure workflows. For instance, a developer may provide one function that derives a key by simply truncating a password and another that encrypts data using AES-CBC. Individually, both functions appear reasonable (but when the LLM chains them together in response to a user prompt like “ encrypt this file with my password, ” the result is a dangerously weak encryption scheme). Third, even when the cryptographic APIs themselves are recognized, the real challenge lies in understanding intent. The same MD5 function may be perfectly acceptable when checking for accidental file corruption, yet dangerously inadequate when used for password storage. In other words, detecting misuse in MCP requires reasoning about semantics and context, not just pattern matching. To address these challenges, we present MICRYSCOPE , a domain-specific analysis framework for detecting cryptographic misuses in MCP implementations. MICRYSCOPE introduces three key innovations: (i) a cross-language intermediate representation (IR) that normalizes cryptographic API usage across diverse ecosystems, ensuring consistent detection across languages; (ii) a hybrid dependency analysis that reconstructs both explicit and implicit relationships among functions in MCP’s plugin-style architecture. Unlike traditional control-flow analysis, this approach models may-dependencies created at runtime when the LLM orchestrates weakly coupled functions, thereby exposing insecure compositions that static analysis alone cannot reveal; and (iii) a taint-based misuse detector that tracks data flows across function boundaries and flags violations of well-established cryptographic security rules. Through a large-scale study of 9,403 MCP servers, MICRYSCOPE identified 720 servers that implemented cryptographic logic, of which 19.7% exhibited misuses. These vulnerabilities are not evenly distributed: the Market Smithery Registry shows the highest density of insecure servers (42%), while Mcpmarket, though the largest platform, contains a lower proportion of misuses (37%). At the language level, Python servers (34%) are disproportionately prone to errors compared to other languages, reflecting the uneven quality of its cryptographic library ecosystem. From a functional perspective, Developer Tools and Data Science & ML categories account for more than 50% of all misuses, underscoring that critical flaws emerge in the very tools developers depend on most. Beyond statistics, our case studies highlight tangible consequences: hard-coded LLM API keys that attackers could immediately exploit for financial abuse, DES in ECB mode exposed through MCP tools that propagate insecure primitives into downstream applications, and MD5-based authentication tokens that allow adversaries to bypass deployment pipelines. “MCP” now being read as “ Misuse Cryptography Protocol ” rather than “ Model Context Protocol ”. In summary, this work makes the following contributions: • We provide the first systematic study of cryptographic misuse in MCP, highlighting its causes, patterns, and consequences. • We design MICRYSCOPE , a scalable analysis framework that integrates a cross-language intermediate representation, hybrid dependency reasoning, and taint-based detection to identify MCP-specific cryptographic misuses that existing tools fail to capture. • We analyze 9,403 MCP servers and find that 19.7% of crypto-enabled servers contain misuses, mapping their prevalence across markets, languages, and categories, and demonstrating real-world consequences through case studies that expose financial, confidentiality, and integrity risks. Figure 1 . LLM generates requests. ⬇

Read the complete text