mcpField
D
dittu

dittu

Local
github.comDeveloper Tools46Updated 2d ago

About dittu

dittu is an MCP server and CLI that turns rendered websites into editable Next.js or Astro frontend projects. It suits developers and coding agents that need to reproduce a site’s appearance and check visual differences; backend behavior is not copied.

Key features

  1. 01Captures rendered desktop and mobile layouts
  2. 02Preserves CSS and downloads page assets
  3. 03Exports previews, Next.js, and Astro projects
  4. 04Replays recorded scroll animations
  5. 05Scores clones with pixel comparisons

Use cases

  1. 01Create a frontend reference from a website
  2. 02Crawl several pages into a project
  3. 03Verify visual changes after refactoring

MCP support

The MCP server registers with coding agents and exposes website cloning and clone verification. Agents can call `clone_website` and `verify_clone`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"manish-tamang-dittu": {
"command": "npx",
"args": [
"-y",
"@manishtamang/dittu"
]
}
}
}
Run commandnpx -y @manishtamang/dittu

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@manishtamang/dittu0.2.0

Tools

3

Saved tool list · updated 3d ago

ParameterTypeRequiredDescription
urlstringYesPage to clone, e.g. https://example.com
buildbooleanNoAlso npm install + build + score the generated apps (slow, default false)
pagesintegerNoCrawl up to n same-site pages (default 1)
outDirstringNoOutput directory (default ./dittu-out/<host>)
removearrayNoCSS selectors to drop (cookie banners, chat widgets)
verifybooleanNoScore the clone against the original (default true)
waitMsintegerNoExtra wait after load in ms
stylingenumNocss keeps the original stylesheet (default); tailwind converts class rules to Tailwind utilities wherever that renders identically and keeps the rest as CSScss | tailwind
frameworksarrayNoProjects to generate (default next + astro)

Details

From the project README

dittu: Clone Any Website

Turn any website into an editable Next.js or Astro project, verified pixel by pixel.

Layout, CSS, fonts, images and scroll animations. Not the backend. One CLI, one MCP server, and skills for your coding agent.

Quick start · How it works · Benchmarks · Docs

$ dittu clone https://dub.co/home --build

› Capturing https://dub.co/home
  1,680,755 chars of markup, 6 stylesheets, 33 animations, 13 JS-responsive elements
✓ Static preview → dittu-out/dub.co/preview
✓ Next.js project → dittu-out/dub.co/next
✓ Astro project → dittu-out/dub.co/astro

Visual match (1 − differing pixels / total)
  preview  /home    1440px   99.95%
  next     /home    1440px   99.95%
  astro    /home    1440px   99.95%
  preview  /home     390px   99.89%
  next     /home     390px   99.89%
  astro    /home     390px   99.89%
✓ All checks ≥ 95% (lowest 99.89%)

Quick start

Set up your agent
npx @manishtamang/dittu setup

Registers the dittu MCP server and installs the skills for every agent it finds: Claude Code, Cursor, Gemini CLI, Codex. Check your machine first with npx @manishtamang/dittu doctor (on Linux/WSL you may need sudo npx playwright install-deps chromium).

Ask your agent

Clone https://example.com into Next.js and make the pricing cards a reusable component.

The agent calls clone_website, reads the scores, refactors the generated components, and calls verify_clone to prove nothing visual changed.

Use the terminal
npx @manishtamang/dittu                                        # interactive: banner, then pick URL, frameworks, pages…
npx @manishtamang/dittu clone https://example.com -y           # no questions: preview + Next.js + Astro, scored
npx @manishtamang/dittu clone https://example.com -p 5 --build # crawl 5 pages, build and score the apps
npx @manishtamang/dittu verify dittu-out/example.com --targets next
npx @manishtamang/dittu serve dittu-out/example.com
Update dittu
npx @manishtamang/dittu@latest setup

How dittu works

Most cloners screenshot a page and ask an LLM to redraw it. dittu copies what the browser actually rendered, then checks the result:

  1. Capture: Chromium loads the page, scrolls it so lazy content and scroll reveals fire, then freezes JS timers so carousels hold still. A second render at 390 px records layout that JS computes per viewport.
  2. Serialize the live DOM, not the server HTML. Next.js/React sites come out as their final markup without hydration scripts or RSC payloads. Nesting the HTML parser would restructure gets repaired, so React hydrates cleanly.
  3. Keep the original CSS in cascade order, including CSS-in-JS rules that exist only in the CSSOM. Media queries, hover states and keyframes keep working.
  4. Download every asset from the same session and rewrite URLs.
  5. Export to a static preview, a Next.js App Router project (JSX) and an Astro project, split into section components.
  6. Replay motion: recorded scroll reveals, Framer Motion animate calls and loops run again through a 2 KB runtime.
  7. Verify: screenshot original and clone the same way at desktop and mobile and score them. --build scores the built apps, not just the preview.

Details: docs/architecture.md.

What you can clone

Site typeSupport
Marketing sites, landing pages, portfolios, docs✅ 99%+ typical
Next.js / React / Vue / Svelte / Astro builds✅ post-hydration DOM
Tailwind, CSS modules, styled-components, emotion✅ original CSS kept
Scroll reveals (AOS, Framer Motion, GSAP, IntersectionObserver)✅ recorded and replayed
Layout JS computes per viewport✅ mobile render → media-query overrides
Multi-page sites✅ --pages N, internal links rewired, shared header/footer components
Canvas / WebGL scenes⚠️ still image
Carousels, tabs, menus, forms⚠️ look is copied, behaviour is not
Pages behind login or bot protection❌

Benchmarks

SiteStackDesktopMobileBuilt apps
dub.co/homeNext.js, heavy animation99.95%99.89%Next.js + Astro: same
nextjs.orgNext.js99.79%99.99%99.78–99.79%
ui.shadcn.comNext.js + Tailwind100.00%100.00%100.00%
astro.buildAstro100.00%100.00%
manishtamang.com (3 pages)Next.js99.89–99.99%99.80–100%same

Methodology and limits: docs/fidelity.md.

FAQ

Does it copy the backend? No. Data fetching, auth, APIs and form handling are not copied. You get the frontend, ready to wire to your own logic.

Why is the generated JSX full of {" "}? Whitespace between inline elements changes layout in HTML but is dropped by JSX. dittu keeps it explicit so the clone renders identically. Refactor freely, and re-run verify to check.

Why plain CSS instead of Tailwind classes? The original stylesheet is the only way to get 99%. A Tailwind conversion pass is on the roadmap, guarded by verify.

Is the 95% score honest? It's raw pixel identity over the full page, including height differences, at desktop and mobile. Diff images are saved next to the scores so you can check.

Can I clone any site I want? Technically mostly yes. Legally, see the disclaimer.

Documentation

Disclaimer

dittu is for learning, prototyping, design references and migrating sites you own. Cloning a site doesn't give you rights to its brand, copy, images or code. Read DISCLAIMER.md.

Contributing

See CONTRIBUTING.md. Agents working in this repo: AGENTS.md.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.