web-fetch-mcp — Claude Code MCP server: what it does, setup
This MCP server lets an agent read web pages, summarize them, compare URLs, and pull out requested details.
claude mcp add --env GEMINI_API_KEY=<GEMINI_API_KEY> --env HTTP_PROXY=<HTTP_PROXY> --env HTTPS_PROXY=<HTTPS_PROXY> --transport stdio web-fetch-mcp -- npx -y web-fetch-mcpWhat web-fetch-mcp does
web-fetch-mcp exposes three tools for web research: summarize_web creates a short account of linked pages, compare_web checks information across URLs, and extract_web finds requested details from page content. A single request can include up to 20 URLs. HTML is converted into readable text, and GitHub /blob/ links are resolved to raw content.
The server runs through npx and connects over MCP. It requires GEMINI_API_KEY; HTTP_PROXY and HTTPS_PROXY can be supplied when the route to Gemini needs a proxy. Without GEMINI_API_KEY, the server will not start. Requests to private IP addresses are blocked, while timeout and content-size limits can be configured.
What it helps with
- summarize research pages by URL
- compare claims across several sites
- extract named details from web content
- process up to 20 URLs in one request
Example prompts for the agent
- Use
summarize_webto give me the main points from these URLs: ... - Call
compare_weband contrast the pricing and terms on these pages: ... - Use
extract_webto find publication dates and author names in these pages: ...
How to install web-fetch-mcp
Platform CLI
claude mcp add --env GEMINI_API_KEY=<GEMINI_API_KEY> --env HTTP_PROXY=<HTTP_PROXY> --env HTTPS_PROXY=<HTTPS_PROXY> --transport stdio web-fetch-mcp -- npx -y web-fetch-mcpReplace <…> with your own values
Platform CLI
codex mcp add web-fetch-mcp --env GEMINI_API_KEY=<GEMINI_API_KEY> --env HTTP_PROXY=<HTTP_PROXY> --env HTTPS_PROXY=<HTTPS_PROXY> -- npx -y web-fetch-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"web-fetch-mcp": {
"command": "npx",
"args": [
"-y",
"web-fetch-mcp"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>",
"HTTP_PROXY": "<HTTP_PROXY>",
"HTTPS_PROXY": "<HTTPS_PROXY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"web-fetch-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"web-fetch-mcp"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>",
"HTTP_PROXY": "<HTTP_PROXY>",
"HTTPS_PROXY": "<HTTPS_PROXY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e GEMINI_API_KEY=<GEMINI_API_KEY> -e HTTP_PROXY=<HTTP_PROXY> -e HTTPS_PROXY=<HTTPS_PROXY> web-fetch-mcp npx -y web-fetch-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about web-fetch-mcp
How do I install web-fetch-mcp in Claude Code?
Run claude mcp add web-fetch-mcp -e GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y web-fetch-mcp.
What does web-fetch-mcp do?
It fetches web pages and gives an agent tools for summarizing, comparing, and extracting details from their content.
How many URLs can one request handle?
Up to 20 URLs. The server blocks requests to private IP addresses.