Fetch an entire site and use it as a MCP Server
mcp-demo-m.mov
One-off usage (choose one of the followings):
bunx sitemcp npx sitemcp pnpx sitemcpInstall globally (choose one of the followings):
bun i -g sitemcp npm i -g sitemcp pnpm i -g sitemcpsitemcp https://daisyui.com # or better concurrency sitemcp https://daisyui.com --concurrency 10Use the -m, --match flag to specify the pages you want to fetch:
sitemcp https://vite.dev -m "/blog/**" -m "/guide/**"The match pattern is tested against the pathname of target pages, powered by micromatch, you can check out all the supported matching features.
We use mozilla/readability to extract readable content from the web page, but on some pages it might return irrelevant contents, in this case you can specify a CSS selector so we know where to find the readable content:
sitemcp https://vite.dev --content-selector ".content" You can execute server from your MCP client (e.g. Claude Desktop).
The below example configuration for Claude Desktop
{ "mcpServers": { "daisy-ui": { "command": "npx", "args": [ "-y", "sitemcp", "https://daisyui.com", "-m", "/components/**", ] } } } - Some site has a lot of pages. It is better to run
sitemcpbefore registering the server to the MCP client.sitemcpcaches the pages in~/.cache/sitemcpby default. You can disable by--no-cacheflag.
MIT.
