The Model Context Protocol (MCP) has emerged as a standard for connecting Large Language Models (LLMs) to external tools and data. However, MCP servers often expose privileged capabilities, such as file system access, network requests, and command execution that can be exploited if not properly secured. We present mcp-sec-audit, an extensible security assessment toolkit designed specifically for MCP servers. It implements static pattern matching for Python-based MCP servers and dynamic sandboxed fuzzing and monitoring via Docker and eBPF. The tool detects risky capabilities through configurable rule-based analysis and provides mitigation recommendations.
翻译:模型上下文协议(MCP)已成为连接大型语言模型(LLM)与外部工具和数据的一种标准。然而,MCP服务器常暴露特权能力,例如文件系统访问、网络请求和命令执行,这些能力若未妥善保护可能被利用。我们提出mcp-sec-audit,一款专为MCP服务器设计的可扩展安全评估工具包。它实现了针对基于Python的MCP服务器的静态模式匹配,以及通过Docker和eBPF进行的动态沙盒模糊测试与监控。该工具通过可配置的基于规则的分析检测风险能力,并提供缓解建议。