Site Cloner MCP Server

by SarthakMishra

6 stars
371 downloads
Not rated
GitHub

About

MCP server to help LLMs clone websites by providing tools to fetch, analyze, and download website assets.

Details

Author
SarthakMishra
GitHub stars
6
Downloads
371
Categories
Other

- Fetch HTML content from any URL
- Extract assets (CSS, JavaScript, images, fonts, etc.) from HTML
- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Site Cloner MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The server runs in Docker. Build the image (docker build -t site-cloner-mcp .) and run the container (docker run -i --rm site-cloner-mcp). For persistent storage, mount a volume. To integrate with Cursor, add a project-level .cursor/mcp.json or a global MCP server pointing to the Docker command. Once configured, ask Claude to clone a website, and it will use the available tools to fetch, parse, download, and organize assets.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "site cloner mcp server": {
            "site-cloner": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "site-cloner-mcp",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "site-cloner": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "site-cloner-mcp",
            "."
        ]
    }
}

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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.