- Home
- MCP servers
- MCP Fetch Page
MCP Fetch Page
- javascript
1
GitHub Stars
javascript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
Prerequisites: you need Node.js and npm installed on your machine.
{
"mcpServers": {
"mcp_fetch_page": {
"command": "npx",
"args": ["-y", "mcp-fetch-page@latest"]
}
}
}
Additional setup and usage notes
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:6274
Domain presets
The 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
Parameters
- 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)
File Structure
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.
Troubleshooting
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.
Available tools
fetchpage
Fetch a page with automatic cookie loading, optional waitFor CSS selector, and headless rendering for dynamic content.
debug_script
Standalone debug tools to test pages and SPAs from the mcp-server directory.
inspector
MCP Inspector for integration testing accessible via npx @modelcontextprotocol/inspector and a local web interface.