Pandora's Shell
通过安全的shell接口使AI助手能够执行终端命令的MCP Server。
⚠️ 安全警告:此工具授予AI助手在您系统上执行终端命令的完全权限。仅在虚拟机或可承受重建的测试环境中使用。
概述
潘多拉之壳是一个MCP服务器,允许AI助手(如Claude)在您系统上执行终端命令,具有完整的系统访问权限。
先决条件
- Claude Desktop(需要Claude Pro/Enterprise订阅)
- Python 3.10+
- Git
- uv(包管理工具)
安装步骤
Windows
-
安装先决条件
winget install python git # 或从python.org和git-scm.com手动安装 # 安装uv(管理员模式下) powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
设置项目
git clone https://github.com/Zelaron/Pandoras-Shell.git cd Pandoras-Shell python -m venv venv venv\Scripts\activate uv pip install mcp pip install -e .
-
配置Claude Desktop
在%APPDATA%\Claude
或%LOCALAPPDATA%\Anthropic\Claude
创建或编辑claude_desktop_config.json
:{ "mcpServers": { "pandoras-shell": { "command": "C:/path/to/cloned/Pandoras-Shell/venv/Scripts/python.exe", "args": [ "C:/path/to/cloned/Pandoras-Shell/src/pandoras_shell/executor.py" ], "env": { "PYTHONPATH": "C:/path/to/cloned/Pandoras-Shell/src" } } } }
macOS
-
安装先决条件
brew install python git uv
-
设置项目
git clone https://github.com/Zelaron/Pandoras-Shell.git cd Pandoras-Shell python3 -m venv venv source venv/bin/activate uv pip install mcp pip install -e .
-
配置Claude Desktop
编辑~/Library/Application Support/Claude/claude_desktop_config.json
:{ "mcpServers": { "pandoras-shell": { "command": "/path/to/cloned/Pandoras-Shell/venv/bin/python", "args": [ "/path/to/cloned/Pandoras-Shell/src/pandoras_shell/executor.py" ], "env": { "PYTHONPATH": "/path/to/cloned/Pandoras-Shell/src" } } } }
使用方法
- 完全重启Claude Desktop(不仅仅是关闭窗口)
- 点击🔌图标验证服务器是否出现在"已安装的MCP服务器"列表中
- 如果未出现,检查Claude的日志:
- Windows:
%APPDATA%\Claude\Logs\mcp*.log
或%LOCALAPPDATA%\Anthropic\Claude\Logs\mcp*.log
- macOS:
~/Library/Logs/Claude/mcp*.log
- Windows:
故障排除
如遇问题,请尝试:
- 检查日志文件
- 验证配置文件路径是否正确(Windows使用正斜杠
/
) - 确认Python版本(3.10+)
- 检查虚拟环境是否正确激活
- 手动测试执行器脚本
安全注意事项
- 仅在虚拟机或测试环境中使用
- 不要在生产系统或包含敏感数据的机器上使用
- 保持重要数据的备份
免责声明:开发者不对因使用此软件造成的任何损失负责。使用风险自负。