A Model Context Protocol server that provides web content fetching capabilities using browser automation, OCR, and multiple extraction methods. This server enables LLMs to retrieve and process content from web pages, even those that require JavaScript rendering or use techniques that prevent simple scraping.
fetch
- Fetches a URL from the internet using browser automation and multi-method extraction (including OCR).
url
(string, required): URL to fetchraw
(boolean, optional): Get the actual HTML content if the requested page, without simplification (default: false)The server uses multiple methods to extract content:
The server uses a sophisticated scoring system to select the best result, considering:
Base content score (up to 50 points)
Structure bonus (up to 20 points)
Quality penalties
The scoring system ensures the most reliable and high-quality content is selected, regardless of the extraction method used. Debug logging is available to track scoring decisions.
url
(string, required): URL to fetchTo install and run mcp-server-fetch
using Docker, follow these steps:
Build the Docker image:
docker build -t mcp-server-fetch .
Run the Docker container:
docker run --rm -i mcp-server-fetch
Add to your Claude settings:
{
"mcpServers": {
"fetch": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"mcp-server-fetch"
],
"disabled": false,
"alwaysAllow": []
}
}
}
By default, depending on if the request came from the model (via a tool), or was user initiated (via a prompt), the server will use either the user-agent
ModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers)
or
ModelContextProtocol/1.0 (User-Specified; +https://github.com/modelcontextprotocol/servers)
This can be customized by adding the argument --user-agent=YourUserAgent
to the args
list in the configuration.
The server now includes advanced content extraction capabilities:
We encourage contributions to help expand and improve mcp-server-fetch. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.
For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers
Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-fetch even more powerful and useful.
mcp-server-fetch is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
{
"mcpServers": {
"fetch": {
"env": {},
"args": [
"run",
"--rm",
"-i",
"mcp-server-fetch"
],
"command": "docker"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.