经 AI Skill Hub 精选评估,Python RPA自动化工具包 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
Python RPA自动化工具包 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Python RPA自动化工具包 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/lorisunjunbin/petp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"python-rpa------": {
"command": "npx",
"args": ["-y", "petp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Python RPA自动化工具包 执行以下任务... Claude: [自动调用 Python RPA自动化工具包 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"python_rpa______": {
"command": "npx",
"args": ["-y", "petp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
中文 | English
Python RPA toolkit with 80+ processors orchestrating browser automation, AI/LLM (10 providers), databases, SSH, email, and HTTP tasks. Configurable pipelines with cron scheduling and loops. Runs as wxPython GUI, headless service, or Docker container. Built-in MCP Tool Server (Streamable-HTTP) for AI agent integration.
Pipeline 1:n Execution
Execution 1:n Task
Task 1:1 Processor
Links: Web Intro | Web App | Changelog
---
| Category | Capabilities |
|---|---|
| **Browser Automation** (Selenium) | Navigate, click, key-in, collect, batch find, iFrame, cookies, screenshot. Chrome DevTools Recorder import. |
| **SSH / SFTP** (Paramiko) | SSH/SFTP sessions, remote commands, file upload/download. |
| **File & Folder** | Open, write, delete, read, find, watch & auto-move, ZIP/UNZIP. |
| **Data & Spreadsheet** | CSV/Excel read & write, collect, filter, group-by, mapping, masking, merge. Chinese almanac (CNLunar). |
| **Database** | MySQL, PostgreSQL, SAP HANA, SQLite — unified DB_ACCESS processor. |
| **AI / LLM** (10 providers) | DeepSeek, Gemini, Ollama, Zhipu, Anthropic, Qianfan, MiniMax, Doubao, Moonshot, OpenAI-compatible. Setup + Q&A + MCP tool calling. |
| **AI Execution Generator** | Natural language → task flow generation. Multi-turn chat, Processor browser, selective context, connection caching. |
| **MCP** | Standard MCP Tool Server (Streamable-HTTP). MCP client for all LLM providers. OOTB tools: weather query, daily almanac. |
| **HTTP / Network** | Configurable requests, response extraction, OAuth2/PKCE, Basic Auth, XSRF. |
| **Email** | SMTP send (CC/BCC, HTML, attachments). IMAP receive (filter, attachment download). |
| **OCR & Captcha** | Image text extraction (paddleocr/rapidocr/easyocr). Captcha solving (ddddocr). |
| **Mouse & GUI** (PyAutoGUI) | Click, scroll, position query. |
| **Execution Control** | Init params, nested execution, conditional stop/jump, IF_ELSE branching, loops, shell commands. |
| **Theme** | 9 themes (System auto + 8 named) with live switching. |
---
```bash pip install -U uv uv pip install -r requirements.txt # Full (GUI)
<details>
<summary>Custom install — pick only what you need</summary>
bash uv pip install -r requirements/core.txt -r requirements/ssh-sftp.txt -r requirements/http-client.txt ```
See requirements/ directory for all available groups: ai-deepseek.txt, ai-gemini.txt, ai-ollama.txt, database.txt, excel-data.txt, mcp.txt, ocr.txt, web-automation.txt, etc.
</details>
Download from python.org. On Windows, check "Add Python to PATH".
<details> <summary>Python 3.14 requires a development snapshot (click to expand)</summary>
The stable release (4.2.x on PyPI) does not support Python 3.14. Download a 4.3.0-alpha .whl from wxpython.org/Phoenix/snapshot-builds matching your platform:
```bash
```bash
./build/script/docker_build_bg.sh # build + export tar ./build/script/docker_build_bg.sh --run # build + start container ./build/script/docker_build_bg.sh --no-tar # build only ./build/script/docker_build_bg.sh --push repo:tag # push to registry ./build/script/docker_build_bg.sh --dirty # use working dir (skip git archive)
./build/script/docker_build_webapp.sh # build + export tar ./build/script/docker_build_webapp.sh --run # build + start container ./build/script/docker_build_webapp.sh --dirty # use working dir (skip git archive) ```
Note: Build scripts default togit archivemode — only git-tracked and staged files are included in the Docker context. Use--dirtyto include all working directory files (relies on.dockerignore).
```bash
./build/script/deploy_bg_to_nas.sh ./build/script/deploy_bg_to_nas.sh --no-start # only transfer + load ./build/script/deploy_bg_to_nas.sh --keep-tar # don't delete remote tar
./build/script/deploy_webapp_to_nas.sh
sudo ./build/script/tailscale_funnel_refresh.sh
python PETP_background.py --run-pipeline DAILY_REPORT --no-http
python PETP_background.py --run-pipeline MY_PIPELINE --init-data '{"param":"value"}' --no-http
PETP exposes executions as MCP tools via Streamable-HTTP on port 8866.
🔒 Auth is fail-closed. Whenhttp_request_tokenis unset inpetpconfig.yaml, every protected endpoint (/petp/*,/mcp) returns501 Not Configured. Set a token before exposing the server (e.g. via Tailscale Funnel). Send it asAuthorization: Bearer <token>on every request.
🔒 Security hardening (Phase 2 P0). -CMDprocessor: defaults toshlex.split(no shell). Setshell="yes"only for trusted commands needing pipes/redirects. - Dynamic_fn/lambda_*parameters: run in a sandbox with__import__,open,eval,exec,compileremoved. Whitelisted modules:re,json,datetime,math. - Encrypted password salt: override the public default by setting envPETP_SALTor writing~/.petp/secret(POSIX mode0600). The default salt is logged with a WARNING —cryptocodeciphertext is not actually secret unless you set a custom salt.
Performance (headless/Docker): - Shared thread pool for concurrent tool calls (no per-request executor overhead) - Static execution cache — zero filesystem I/O after startup (no stat/mtime checks) - Processor class pre-loading on server start (eliminates cold-start latency) - Real-time task-level SSE progress notifications during long-running tools/call - Cached outputSchema parsing (same tool re-called without re-parsing mcp_desc JSON)
Built-in MCP Tools:
| Tool | Description | Input |
|---|---|---|
T_WEATHER_QUERY | Query real-time weather (wttr.in) | city (e.g. "上海", "Tokyo") |
T_DAILY_ALMANAC | Chinese almanac + holiday info (cnlunar + holiday-cn) | none (uses today) |
Claude Code / Cursor / any MCP client:
{
"mcpServers": {
"petp": {
"type": "http",
"url": "http://localhost:8866/mcp"
}
}
}
HTTP API (no MCP client needed):
```bash
curl -X POST http://localhost:8866/petp/exec \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"action":"pipeline","params":{"pipeline":"MY_PIPELINE"},"wait_for_result":"true"}'
curl -X POST http://localhost:8866/petp/exec \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"action":"pipeline","params":{"pipeline":"MY_PIPELINE"},"wait_for_result":"false"}' ```
| Endpoint | Description |
|---|---|
GET /health | Health check |
GET,POST /mcp | MCP Tool Server (Streamable-HTTP) |
GET /petp/tools | List exposed tools |
POST /petp/exec | Trigger execution or pipeline |
GET /petp/result?request_id=<id> | Poll async result |
---
| Problem | Solution |
|---|---|
ModuleNotFoundError | Install the corresponding requirements/*.txt group |
| wxPython import error | Ensure .whl matches Python version — see [snapshot builds](https://wxpython.org/Phoenix/snapshot-builds/) |
| ChromeDriver mismatch | Download from [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) |
| Port 8866 in use | Change http_port in config/petpconfig.yaml |
---
PET-P 是一款基于 Python 开发的 RPA(机器人流程自动化)工具包。它内置了超过 80 个处理器,能够高效编排浏览器自动化、AI/LLM(支持 10 个供应商)、数据库、SSH、电子邮件及 HTTP 任务。用户可以通过可配置的 Pipeline 实现 Cron 定时调度与循环逻辑。项目支持多种运行模式,包括 wxPython GUI 图形界面、Headless 无界面服务以及 Docker 容器化部署,并内置了 MCP Tool Server,方便与 Claude 等 AI 智能体集成。
PET-P 提供了极其丰富的自动化能力。在浏览器自动化方面,基于 Selenium 支持导航、点击、输入、数据采集及 Chrome DevTools Recorder 脚本导入;在远程操作方面,通过 Paramiko 实现 SSH/SFTP 会话及文件传输;在文件管理方面,支持文件读写、自动移动及 ZIP 压缩;此外,还具备强大的数据处理、电子表格操作及 AI 集成能力,能够通过 MCP 协议将执行任务转化为 AI 工具。
在安装之前,请确保系统中已安装 Python 3.14。项目依赖管理推荐使用 uv 工具。根据您的部署需求,可以选择不同的依赖安装方式:若需运行 GUI 界面,请安装完整版依赖;若需作为 Headless 服务运行,请安装 requirements-nogui.txt;若需在 Docker 环境中使用,请安装 requirements-docker.txt。您也可以通过 requirements/ 目录下的分组文件进行自定义精简安装。
首先,请从 python.org 下载并安装 Python 3.14,在 Windows 上请务必勾选 "Add Python to PATH"。若需使用 GUI 模式,由于当前的 wxPython 稳定版尚未完全支持 Python 3.14,请前往 wxpython.org 下载对应的 4.3.0-alpha 版本 .whl 文件进行安装。对于 Docker 用户,可以直接通过构建好的镜像进行部署。建议使用 uv 进行依赖安装以获得更快的速度和更好的环境隔离。
项目提供了快速启动指南。您可以直接通过命令行运行预设的 Pipeline,例如使用 `python PETP_background.py --run-pipeline DAILY_REPORT` 来执行每日报告任务。如果需要传递初始数据,可以使用 `--init-data` 参数。对于需要通过 MCP 协议暴露给 AI 的任务,PET-P 会通过端口 8866 的 Streamable-HTTP 提供服务,实现 AI 对自动化流程的直接调用。
项目配置主要通过 `petpconfig.yaml` 文件进行管理。需要特别注意的是,安全性采用 "Fail-closed"(失败即关闭)策略:如果未在配置文件中设置 `http_request_token`,所有受保护的端点(如 `/petp/*` 和 `/mcp`)都将返回 501 错误。在通过 Tailscale Funnel 等工具暴露服务器之前,请务必配置好 Token 以确保 API 的安全性。
PET-P 的核心���作流基于 Pipeline 机制。用户可以定义复杂的自动化逻辑,并通过命令行触发执行。系统支持将执行过程封装为 MCP Tools,通过 Streamable-HTTP 协议对外暴露,使得 Claude 等大模型能够感知并调用本地的自动化能力。无论是定时任务还是由 AI 驱动的任务,都能在统一的框架下完成从数据输入到结果输出的全流程自动化。
针对常见问题,如果遇到 `ModuleNotFoundError`,请检查是否安装了对应的 `requirements/*.txt` 依赖组;若遇到 wxPython 导入错误,请确保下载的 `.whl` 文件版本与 Python 版本严格匹配;若出现 ChromeDriver 不匹配的问题,请根据报错提示下载对应版本的驱动程序。通过这些步骤,可以解决大部分环境配置与运行时的异常。
功能完整的Python RPA框架,80+处理器提供丰富功能,MCP集成设计现代。但项目较新,使用者偏少,生产环境需谨慎评估。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Python RPA自动化工具包 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | petp |
| 原始描述 | 开源MCP工具:Python RPA toolkit with 80+ processors orchestrating browser automation, AI/LLM 。⭐6 · Python |
| Topics | RPA自动化浏览器自动化AI集成DevOps工具MCP服务器 |
| GitHub | https://github.com/lorisunjunbin/petp |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-17 · 更新时间:2026-05-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端