How it Works
MCPSafetyScanner is designed to automate the safety auditing of Model Context Protocol (MCP) servers, which are used by large language models (LLMs) to manage and secure their operational environments. The tool operates by analyzing an MCP server’s configuration file, which defines the rules and permissions governing the LLM’s interactions with its environment. This configuration file is critical, as misconfigurations can expose vulnerabilities that malicious actors might exploit to compromise the system.
The scanner employs multiple agents to conduct a thorough audit.
Once the audit is complete, MCPSafetyScanner generates a detailed safety report. The report is structured to provide actionable insights for both developers and end-users, enabling them to harden their systems against identified vulnerabilities.
The tool is specifically tailored for users of Claude Desktop, an LLM application that relies on MCP for its operational security. Users can locate their MCP server configuration files at predefined paths depending on their operating system: ~/Library/Application Support/Claude/claudedesktopconfig.json for macOS and %APPDATA%\Claude\claudedesktopconfig.json for Windows. By pointing MCPSafetyScanner at this file, users initiate an automated safety assessment.
The underlying mechanism of MCPSafetyScanner is rooted in the research paper MCP Safety Audit: LLMs with the Model Context Protocol Allow Major Security Exploits by Brandon Radosevich and John Halloran. MCPSafetyScanner addresses these risks by providing a systematic and automated approach to identifying and mitigating them.
The tool requires Python 3.11 to function, ensuring compatibility with modern development environments. Installation is straightforward, involving a git clone of the repository followed by a pip installation in development mode.
Use Cases
Its primary use case is the proactive identification of security vulnerabilities in MCP server configurations before they can be exploited. By automating the auditing process, the tool reduces the likelihood of human error in configuration management, which is a common source of security breaches.
For developers, the tool serves as a critical component of the software development lifecycle, particularly in the testing and red teaming phases. The generated safety report provides a clear roadmap for implementing fixes, ensuring that the LLM’s operational environment remains secure against evolving threats.
End-users, particularly those managing LLM applications like Claude Desktop, benefit from MCPSafetyScanner by gaining visibility into potential security risks associated with their configurations. By following these recommendations, users can significantly reduce the attack surface of their systems.
Key Features & Capabilities
MCPSafetyScanner’s core functionality revolves around its ability to perform automated safety audits of MCP server configurations. The tool’s multi-agent architecture enables it to conduct comprehensive assessments, covering a wide range of potential security issues.
One of the tool’s standout features is its capacity to generate actionable safety reports. For example, if the audit detects that a configuration allows unrestricted access to .pem files, the report will recommend restricting write permissions to these files or implementing additional authentication layers.
The tool’s focus on environment variables is another critical capability.
MCPSafetyScanner supports cross-platform compatibility, particularly for users of Claude Desktop on macOS and Windows. The tool’s design accommodates the specific paths where MCP configuration files are stored on these operating systems, ensuring that users can initiate audits without manual file location adjustments. This compatibility extends to the tool’s installation process, which is streamlined to work within standard Python development environments.
The tool’s reliance on the research-backed findings from the paper MCP Safety Audit: LLMs with the Model Context Protocol Allow Major Security Exploits ensures that its auditing criteria are grounded in real-world security risks. This academic foundation lends credibility to the tool’s recommendations and helps users trust that the identified vulnerabilities are both relevant and actionable.
MCPSafetyScanner is licensed under the MPL 2.0 (Mozilla Public License 2.0), a weak copyleft license that allows for broad usage while maintaining open-source principles.
For instance, users can execute a safety audit by specifying the path to their MCP configuration file and any necessary environment variables, such as API keys.
Troubleshooting support is built into the tool’s design. For example, users working in a conda environment can install Node.js via conda-forge to ensure compatibility with the tool’s requirements.
