Perfect Web Clone IDE
Enables pixel-perfect website cloning from within the IDE by extracting real source code, styles, and assets, and assembling them into a React project with live preview.
README
<div align="center">
Perfect Web Clone IDE
Pixel-Perfect Website Cloning for Your IDE
An MCP server that brings pixel-perfect website cloning directly into your IDE.
Clone any website with one command. Get real code, not guesses.
</div>
Why This Tool?
| Screenshot-based Tools | Perfect Web Clone IDE |
|---|---|
| Guesses code from pixels | Extracts real source code |
| Approximate CSS | Exact computed styles |
| Broken responsive layouts | Preserved responsiveness |
| Lost animations | @keyframes preserved |
| Complex setup | One config file |
Inspired by Perfect-Web-Clone: Want to understand the full multi-agent architecture? Check out the original project. This IDE version brings that power directly into your coding workflow.
Features
One-Command Cloning
Just type in your IDE:
Clone https://stripe.com for me
帮我克隆 https://pixso.ai
The AI handles everything—crawling, code extraction, styling, and preview.
Pixel-Perfect Extraction
- Real HTML Structure: Not guessed from screenshots
- Exact CSS: Computed styles, variables, @keyframes
- All Assets: Images, fonts, videos, SVGs
- Framework Detection: Auto-injects Tailwind, Bootstrap, Bulma CDN
Parallel Processing
Multiple workers process different sections simultaneously:
┌─────────────────────────────────────────────────┐
│ "Clone https://example.com" │
│ ↓ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │Worker 1 │ │Worker 2 │ │Worker 3 │ ... │
│ │Section 0│ │Section 1│ │Section 2│ │
│ └────┬────┘ └────┬────┘ └────┬────┘ │
│ └──────────┼───────────┘ │
│ ↓ │
│ Assembled Project │
│ + Live Preview │
└─────────────────────────────────────────────────┘
IDE Integration (MCP)
Works with any MCP-compatible IDE:
| IDE / Tool | Status |
|---|---|
| Claude Code | Native support |
| Cursor | Via MCP plugin |
| VS Code + Continue | Via MCP extension |
| Any MCP Client | Standard protocol |
Getting Started
Prerequisites
- Python 3.9+
- Claude Code CLI (
npm install -g @anthropic-ai/claude-code) - Playwright (
playwright install chromium)
Installation
# Clone the repository
git clone https://github.com/ericshang98/Perfect-Web-Clone-IDE.git
cd Perfect-Web-Clone-IDE
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install Playwright browser
playwright install chromium
Configure MCP Server
Add to ~/.claude/settings.json:
{
"mcpServers": {
"web-clone": {
"command": "/path/to/Perfect-Web-Clone-IDE/venv/bin/python",
"args": ["-m", "cloner"],
"cwd": "/path/to/Perfect-Web-Clone-IDE"
}
}
}
Restart your IDE to load the MCP server.
Usage
Clone a Website
Clone https://example.com
The system will:
- Crawl the webpage with Playwright
- Extract HTML, CSS, JS, assets
- Split into logical sections
- Process each section in parallel
- Assemble into React project
- Preview in your browser
Output Structure
~/ClonedSites/example.com_20260129_123456/
├── output/
│ ├── preview.html # Standalone preview
│ ├── src/
│ │ ├── app/
│ │ │ ├── page.tsx # Next.js page
│ │ │ └── layout.tsx
│ │ └── components/
│ │ └── sections/ # React components
│ ├── package.json
│ └── tailwind.config.js
└── sections/ # Raw extraction data
Run Full Project
cd ~/ClonedSites/example.com_20260129_123456/output
npm install && npm run dev
Architecture
┌──────────────────────────────────────────────────────────────┐
│ MCP Server │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ clone_webpage(url) │ │
│ │ → Playwright: Full page crawl │ │
│ │ → Extract: CSS, JS, computed styles, @keyframes │ │
│ │ → Detect: Tailwind / Bootstrap / Bulma │ │
│ │ → Split: Semantic sections │ │
│ └────────────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ process_sections_batch() │ │
│ │ │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Claude │ │ Claude │ │ Claude │ │ │
│ │ │ Worker │ │ Worker │ │ Worker │ (Parallel) │ │
│ │ └────┬────┘ └────┬────┘ └────┬────┘ │ │
│ │ ↓ ↓ ↓ │ │
│ │ Section0.jsx Section1.jsx Section2.jsx │ │
│ └────────────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ assemble_project() │ │
│ │ → Combine components │ │
│ │ → Generate Next.js structure │ │
│ │ → Start preview server │ │
│ │ → Open browser │ │
│ └────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
MCP Tools
| Tool | Description |
|---|---|
clone_webpage |
Crawl and split webpage |
get_sections |
List extracted sections |
process_section |
Process single section |
process_sections_batch |
Parallel processing |
assemble_project |
Assemble and preview |
get_status |
Session status |
Limitations
- Login-required pages: Cannot clone authenticated pages
- Heavy SPAs: Complex client-side rendering may not extract fully
- Dynamic content: API-loaded content after page load may be missed
Related Projects
- Perfect-Web-Clone: Full multi-agent system with 40+ tools and web UI. See this to understand the complete architecture.
Star History
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE for details.
<div align="center">
Perfect Web Clone IDE - Extract the real code, not guesses.
Made with ❤️ by Eric Shang
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。