home / mcp / mcp fetch page mcp server
Fetches web pages with browser automation, automatic cookies, and CSS selector extraction for precise content capture.
Configuration
View docs{
"mcpServers": {
"kaiye-mcp-fetch-page": {
"command": "npx",
"args": [
"-y",
"mcp-fetch-page@latest"
]
}
}
}MCP Fetch Page provides browser-based page retrieval with automatic cookie handling and CSS selector extraction, letting you fetch dynamic pages and extract specific content with ease.
You can fetch web pages from an MCP client by running the MCP server locally and calling the fetchpage function. It automatically loads saved cookies for authenticated sessions, renders JavaScript, and lets you extract content using CSS selectors. Use domain presets for popular sites to get optimized selectors, or supply your own waitFor selector to grab the exact content you need.
Prerequisites: you need Node.js and npm installed on your machine.
{
"mcpServers": {
"mcp_fetch_page": {
"command": "npx",
"args": ["-y", "mcp-fetch-page@latest"]
}
}
}Optional: authenticate in a browser and save cookies to use with MCP Fetch Page. If you want to save cookies from authenticated sessions, install and use the Chrome extension provided with the package.
Usage steps in practical form are shown below. You will typically login in Chrome, save cookies via the extension, and then request content via the MCP client using fetchpage.
# Standalone debug script (development)
cd mcp-server
node debug.js test-page "https://example.com"
node debug.js test-spa "https://example.com" "#content"
# MCP Inspector for integration testing
npx @modelcontextprotocol/inspector
# Then visit http://localhost:6274The system uses optimized selectors for common domains to simplify extraction.
- mp.weixin.qq.com → .rich_media_wrp (WeChat articles) - wx.zsxq.com → .content (Knowledge Planet) - cnblogs.com → .post (Blog Garden) - Add more in mcp-server/domain-selectors.json
- url: The page you want to fetch (required) - waitFor: CSS selector to extract specific content (optional) - headless: Run the browser in headless mode (default: true) - timeout: Maximum time to wait in milliseconds (default: 30000)
The project organizes the MCP server and related tools under a single folder. You will find the server, debug utilities, and domain presets in the mcp-server directory, and the browser extension under chrome-extension.
If the extension doesn’t load cookies, ensure you are logged in to the target site and cookies are saved correctly. If cookies aren’t found, re-login and re-save cookies. If MCP cannot connect, verify that Node.js is installed and restart your client. Use full paths in commands if you encounter path errors. If a CSS selector doesn’t work, verify that the selector exists on the page and adjust accordingly.
Fetch a page with automatic cookie loading, optional waitFor CSS selector, and headless rendering for dynamic content.
Standalone debug tools to test pages and SPAs from the mcp-server directory.
MCP Inspector for integration testing accessible via npx @modelcontextprotocol/inspector and a local web interface.