PrestaShop人工智能套件
使用AI代理管理PrestaShop 9电子商务商店的完整工具包。使用Claude Code、MCP(模型上下文协议)和Cowork自治代理构建。
文章: 用PrestaShop和Claude构建人工智能驱动的电子商务管道
这有什么作用
此套件将Claude Code连接到您的PrestaShop商店,并自动化日常操作:
- 产品研究:AI代理每天都能找到热门产品进行直运
- 产品列表:AI代理创建具有描述、SEO和图像的优化列表
- 订单管理:AI代理拉取订单并生成履行电子表格
- 基础设施:SSH隧道、自动同步、部署脚本、动态DNS
建筑
Local (Windows) Remote Server
+------------------+ +------------------+
| Claude Code | HTTPS/SSH | PrestaShop 9 |
| + MCP Server +-------------->| + Webservice API |
| + Cowork Agents | | + MySQL |
+--------+---------+ +--------+---------+
| |
v v
+------------------+ +------------------+
| GitHub Repo +| auto-sync.sh |
| (main branch) | sync | (cron, 5 min) |
+------------------+ +------------------+看 docs/architecture.md 查看完整的系统图。
需求
| 组件 | 版本 | 目的 |
|---|---|---|
| PrestaShop | 9.x | 电子商务平台 |
| Python | 3.10+ | MCP服务器运行时 |
| uv | 最新 | Python包管理器 |
| Claude Code | 最新 | AI助手CLI/IDE |
| Git | 2.x+ | 版本控制和部署 |
| SSH | 任意 | 服务器访问和隧道 |
| PHP | 8.1+ | 服务器上的图像上传程序 |
快速开始
- 克隆此仓库
git clone https://github.com/YOUR_USER/prestashop-ai-kit.git
cd prestashop-ai-kit- 配置凭据
cp .env.example .env
# Edit .env with your PrestaShop API keys and database credentials- 设置MCP服务器
cd mcp-server
uv sync
uv run src/prestashop_mcp/server.py- 在克劳德代码中注册 --将MCP服务器添加到您的设置中
- 将工具部署到服务器 --复制
image-uploader.php以及服务器脚本
看 设置.md 获取完整的分步指南。
项目结构
prestashop-ai-kit/
├── mcp-server/ # MCP server (Python) for PrestaShop API
│ ├── src/ # Server source code
│ └── pyproject.toml # Dependencies
├── cowork-agents/ # Autonomous agent instruction files
│ ├── agent1-product-researcher.md
│ ├── agent2-product-lister.md
│ ├── agent3-order-manager.md
│ └── criteria-template.md
├── infrastructure/ # Server and local infrastructure scripts
│ ├── ssh-config-template # SSH config for server access
│ ├── deploy.sh # Manual deployment script
│ ├── auto-sync.sh # Cron-based auto-pull on server
│ ├── sync-check.sh # Check if server is in sync with Git
│ ├── start-tunnel.ps1 # Start SSH tunnel for MySQL
│ ├── setup-scheduled-tasks.ps1 # Windows Task Scheduler setup
│ └── update-duckdns.ps1 # Dynamic DNS updater
├── prestashop-tools/ # Tools deployed to the PrestaShop server
│ ├── image-uploader.php # Server-side image upload endpoint
│ └── gitignore-prestashop # .gitignore template for PrestaShop
├── docs/ # Documentation
│ ├── architecture.md # Full system architecture diagram
│ ├── admin-api-status.md # PrestaShop 9 API endpoint status
│ └── troubleshooting.md # Common issues and fixes
├── claude-context/ # Claude Code context templates
├── .env.example # Environment variable template
├── SETUP.md # Detailed setup guide
└── README.md # This file文档
- 设置.md -完整的设置指南(基础设施、API、MCP、代理)
- docs/architecture.md --系统架构和数据流
- docs/admin-api-status.md -哪些PrestaShop 9 API端点有效
- docs/故障排除.md --常见问题和解决方案
联合工作代理
| 代理 | 角色 | 频率 |
|---|---|---|
| 产品研究员 | 发现热门直销产品 | 每日 |
| Product Lister | 创建优化的店铺列表 | 经过研究 |
| 订单管理器 | 生成履行电子表格 | 每日 |
每个代理人的指示都在 联合工作代理人/。使用前自定义商店名称、URL和条件。
许可证
麻省理工学院
