Sponsored by Deepsite.site

Site Cloner MCP Server

Created By
SarthakMishra8 months ago
MCP server to help LLMs clone websites by providing tools to fetch, analyze, and download website assets.
Content

Site Cloner MCP Server

This is an MCP (Model Context Protocol) server designed to help LLMs (like Claude) clone websites by providing tools to fetch, analyze, and download website assets.

Features

  • Fetch HTML content from any URL
  • Extract assets (CSS, JavaScript, images, fonts, etc.) from HTML content
  • Download individual assets to a local directory
  • Parse CSS files to extract linked assets (fonts, images)
  • Create a sitemap of a website
  • Analyze page structure and layout

Requirements

  • Docker installed on your system

Usage

Running with Docker

  1. Build the Docker image:

    docker build -t site-cloner-mcp .
    
  2. Run the container:

    docker run -i --rm site-cloner-mcp
    

For persistent storage of downloaded files, you can mount a volume:

docker run -i --rm -v $(pwd)/downloaded_sites:/app/downloaded_site site-cloner-mcp

Connecting to Cursor

To set up this MCP server in Cursor, you have two options:

1. Project-specific configuration

Create a .cursor/mcp.json file in your project root with the following content:

{
  "mcpServers": {
    "site-cloner": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "site-cloner-mcp"
      ]
    }
  }
}

2. Global configuration

To make the MCP server available globally in Cursor, add the following configuration by going to Cursor SettingsMCPAdd new Global MCP Server:

{
  "mcpServers": {
    "site-cloner": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "site-cloner-mcp"
      ]
    }
  }
}

Available Tools

1. fetch_page

Fetches the HTML content of a webpage.

Args:
    url: The URL of the webpage to fetch

2. extract_assets

Extracts links to assets from HTML content.

Args:
    url: The URL of the webpage (used for resolving relative URLs)
    html_content: The HTML content to parse

3. download_asset

Downloads an asset from a URL and saves it to the specified directory.

Args:
    url: The URL of the asset to download
    output_dir: The directory to save the asset to (default: downloaded_site)

4. parse_css_for_assets

Parses CSS content to extract URLs of referenced assets like fonts and images.

Args:
    css_url: The URL of the CSS file (used for resolving relative URLs)
    css_content: The CSS content to parse (if None, it will be fetched from css_url)

5. create_site_map

Creates a sitemap of the website starting from the given URL.

Args:
    url: The starting URL to crawl
    max_depth: Maximum depth to crawl (default: 1)

6. analyze_page_structure

Analyzes the structure of an HTML page and extracts key components.

Args:
    html_content: The HTML content to analyze

Example Usage with Claude

  1. Ask Claude to clone a website: "Please clone the website at example.com"
  2. Claude will use the available tools to:
    • Fetch the HTML content
    • Extract assets
    • Download necessary files
    • Analyze the structure
    • Create a local copy of the site

Troubleshooting

Server not showing up in Cursor

  1. Restart Cursor
  2. Check your configuration file syntax
  3. Make sure Docker is installed and running correctly: docker --version
  4. Look at Cursor's MCP logs for errors:
    • Output → Select Cursor MCP from Dropdown
  5. Try running the server manually to see any errors:
    docker run -i --rm site-cloner-mcp
    

Module Not Found Error

If you encounter a "ModuleNotFoundError: No module named 'site_cloner'" error:

  1. Check that your package name in pyproject.toml is correct
  2. Make sure the import statements in your Python files don't include "src." prefix
  3. Rebuild the Docker image after making changes:
    docker build --no-cache -t site-cloner-mcp .
    

Checking Docker Logs

To check Docker logs for any errors:

docker logs $(docker ps -q --filter ancestor=site-cloner-mcp)

Notes

  • The server automatically organizes downloaded assets into subdirectories based on content type (html, css, js, images, fonts, videos, other)
  • When cloning a site, be mindful of copyright and terms of service restrictions
  • Some websites may block automated requests, in which case you might need to adjust the user agent string in the code
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
CursorThe AI Code Editor
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop