Lilith Shell
Lilith Shell
实验性 MCP 服务器,向 AI 助手公开本地 shell 命令执行功能。
当前状态
本仓库应被视为原型,而非安全的 shell 服务器。
当前的实现公开了一个 MCP 工具 execute_command,它通过 subprocess.run(..., shell=True) 运行调用者提供的命令字符串。它具有固定的五分钟超时限制,捕获 stdout 和 stderr,并接受一个可选的工作目录。它目前尚未实现本 README 中先前描述的安全控制。
建议的操作:在安全模型重建并经过测试之前,归档或取消固定此仓库。
Related MCP server: Terminally MCP
安全警告
请勿在包含凭据、生产数据、私有源代码、SSH 密钥、云令牌或其他敏感材料的主机、账户或目录中运行此程序。
当前代码中的已知漏洞:
没有命令允许列表或拒绝列表强制执行
没有严格、宽松或锁定模式
没有工作目录边界强制执行
没有环境过滤
没有输出清理
没有审计日志
没有通过配置选择 shell
没有流式输出
没有 Windows 特定的执行路径
shell=True与不受信任的工具输入一起使用
这些漏洞使得该项目不适合生产环境使用,即使在普通的开发工作站上也存在风险。
当前功能
该 MCP 服务器注册了一个工具:
execute_command输入:
command字符串可选输入:
directory字符串,默认为~行为:在请求的目录中执行命令并返回退出代码、stdout 和 stderr
已移除的功能
之前的 README 声称支持命令允许列表、危险命令检测、可配置模式、输出清理、审计日志、工作目录限制、跨平台 shell 选择和流式输出。这些功能目前在源代码树中不存在。
重新发布前的最小补丁计划
在将其作为面向安全的 MCP 服务器展示之前,需要完成以下工作:
将
shell=True字符串执行替换为基于 argv 的执行。默认添加必需的严格模式,并提供明确的命令允许列表。
在执行每个命令之前,规范化并强制执行配置的工作区根目录。
为命令解析、被阻止的命令、路径遍历、符号链接逃逸、超时行为和输出限制构建测试。
从返回的输出中屏蔽常见的密钥模式。
添加有界输出处理,以防止大型命令耗尽内存或淹没 MCP 响应。
添加包含时间戳、cwd、退出代码和阻止原因的可审计命令日志。
准确记录支持哪些 shell、平台和威胁边界。
开发
pip install -e ".[dev]"
pytest许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server teaching AI agents to implement TideCloak: auth, E2EE, IGA, security analysis
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.89-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants the ability to create, manage, and control terminal sessions through a safe, isolated tmux environment.1-
- AlicenseBqualityCmaintenanceA secure Model Context Protocol server that allows AI assistants to execute terminal commands with controlled directory access and command permissions. It features a robust security architecture including whitelisting, session IDs, and categorized command levels to ensure safe system interaction.8MIT
- AlicenseBqualityAmaintenanceA secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.13153 npm6MIT