MCP server to fetch raw HTML content from Chrome pages via Chrome DevTools Protocol
npm install crawl-mcp



A Model Context Protocol (MCP) server that fetches raw HTML content from Chrome pages via the Chrome DevTools Protocol. Designed to complement chrome-devtools-mcp by providing HTML extraction capabilities.
- get_page_html: Fetch the complete raw HTML of any open Chrome page, or extract HTML of specific elements using CSS selectors
- list_chrome_pages: List all open pages in Chrome available for HTML extraction
- Node.js 18+
- Chrome/Chromium running with remote debugging enabled
``bashWindows
chrome.exe --remote-debugging-port=9222
Installation
`bash
npm install
npm run build
`Usage
$3
Add to your VS Code
settings.json:`json
{
"mcp": {
"servers": {
"crawl-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"crawl-mcp"
]
}
}
}
}
`$3
Add to
claude_desktop_config.json:`json
{
"mcpServers": {
"crawl-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"crawl-mcp"
]
}
}
}
`$3
| Variable | Default | Description |
|----------|---------|-------------|
|
CDP_HOST | localhost | Chrome DevTools Protocol host |
| CDP_PORT | 9222 | Chrome DevTools Protocol port |Tools
$3
Fetches raw HTML content from an open Chrome page.
Parameters:
-
pageIndex (number, optional): Page index (0-based). Defaults to 0.
- selector (string, optional): CSS selector to get HTML of a specific element.Examples:
Get full page HTML:
`
Use the get_page_html tool to fetch the HTML from the first Chrome tab
`Get specific element:
`
Use get_page_html with selector "#main-content" to get only that section
`$3
Lists all open pages accessible via Chrome DevTools Protocol.
Returns: Array of objects with
index, title, and url`.This MCP is designed to work alongside chrome-devtools-mcp. Use chrome-devtools-mcp for:
- Navigation and page interaction
- Taking screenshots and snapshots
- Console and network monitoring
Use CrawlMCP for:
- Extracting raw HTML source code
- Getting HTML of specific DOM elements
MIT