MCP Web Fetch Server
The MCP Web Fetch Server is an all-in-one web research and file management server for LLM agents. Here's what you can do with it:
Web Fetching
Fetch web pages (
fetch_url) — retrieves content as markdown, with chunked reading viastart_indexandmax_lengthfor long pagesGet HTTP metadata (
fetch_metadata_tool) — performs a HEAD request to retrieve status code, headers, etc. without downloading full contentBatch-fetch multiple URLs (
batch_fetch) — concurrently fetches up to 10 URLs with per-URL error isolation and progress reportingExtract links and images (
extract_links) — scrapes and returns all links and images from a page as a structured list
Web Search
Search the web (
web_search) — queries DuckDuckGo (no API key needed), returning titles, URLs, and snippets; automatically falls back to a local SearXNG instance if DuckDuckGo fails
AI Summarization
Summarize a URL (
summarize_url) — fetches a page and uses the connected client's LLM (via MCP sampling) to generate a summary, with an optionalfocusparameter
Local File Management (opt-in, sandboxed, disabled by default)
Read files (
read_file), list directories (list_dir), and write files (write_file) within a configured allowed directory; prompts for confirmation before overwriting existing files
Monitoring & Security
Admin web dashboard for monitoring server status, configuration, fetch history, cache, and registered tools
Security features: SSRF protection, robots.txt compliance, domain allowlisting, Bearer token auth, and rate limiting
MCP Protocol Extras: Resources, Prompts, Completions, Elicitation, Roots, and Progress notifications
Provides web search capability using DuckDuckGo, with no API key required. Used for fetching search results via the web_search tool.
Provides a fallback search engine via a local SearXNG instance, used automatically when DuckDuckGo scraping fails. Allows self-hosted metasearch integration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Web Fetch Serversearch for latest AI news"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Web Fetch Server
An all-in-one Python MCP server for web research: fetch pages, search the web, batch-fetch, extract links, summarize via client-side sampling, and (optionally) read/write local files — all for LLM agents like Cursor. Supports local stdio and Streamable HTTP for remote access, and exercises essentially every MCP protocol capability (Tools, Resources, Prompts, Completions, Sampling, Elicitation, Roots, Progress, Logging).
Documentation:
Document | What's inside |
Full end-user guide: install (Docker/Linux/Windows), Cursor setup, all tools, admin GUI, config, troubleshooting | |
Full technical reference: architecture, modules, MCP APIs, admin API, security, Docker stack, testing |
Features
Tools
fetch_url— page content as markdown, with chunked reading (start_index,max_length)fetch_metadata_tool— HEAD request metadatabatch_fetch— fetch multiple URLs concurrently, with per-URL error isolation and progressweb_search— DuckDuckGo web search (no API key), with automatic fallback to a local SearXNG instance if DuckDuckGo's scrape failsextract_links— structured link/image extraction from a pagesummarize_url— asks the connected client's LLM to summarize a page (MCP sampling)read_file/write_file/list_dir— sandboxed local file access (opt-in, disabled by default)
Other MCP capabilities
Resources:
config://settings,history://recent,fetch-cache://{encoded_url}Prompts:
fetch,research_topic,summarize_page,extract_key_facts,compare_sourcesCompletions: URL/depth autocomplete for prompt and resource arguments
Elicitation:
write_fileconfirms before overwriting an existing fileRoots: local file tools honor client-exposed directories in addition to
FETCH_LOCAL_FILES_ROOTProgress notifications:
batch_fetchandsummarize_urlreport progress as they runManagement GUI: web dashboard at
/adminfor status, config, history, cache, and tools
Security
SSRF protection with resolve-then-check and redirect re-validation
robots.txtcompliance (override withignore_robots_txt=true)Optional domain allowlist
Local file tools sandboxed to one configured directory, path-traversal safe
Bearer token auth + rate limiting for HTTP mode
/healthendpointWindows
.exebuild (no Python required for end users)
Related MCP server: webmcp
Quick Start
Option A: Docker — full stack (recommended for server deployment)
Runs the MCP server, admin GUI, and SearXNG together.
Linux / macOS:
cd mcp-fetch-server
cp .env.docker.example .env # edit MCP_AUTH_TOKEN
chmod +x scripts/docker-up.sh
./scripts/docker-up.sh
# or: docker compose up -d --buildWindows (PowerShell):
cd "E:\my python projects\MCP\mcp-fetch-server"
copy .env.docker.example .env
.\scripts\docker-up.ps1Service | URL |
MCP protocol |
|
Admin GUI |
|
Health |
|
SearXNG (search fallback) |
|
Connect Cursor over HTTP (Bearer token required):
{
"mcpServers": {
"web-fetch": {
"url": "http://127.0.0.1:8000/mcp",
"headers": { "Authorization": "Bearer your-token-from-env" }
}
}
}Local files for read_file/write_file map to the ./workspace folder on your host.
Option B: Windows executable (local / Cursor stdio)
cd "E:\my python projects\MCP\mcp-fetch-server"
.\dist\mcp-fetch-server.exe --transport stdioBuild the exe yourself: .\scripts\build_exe.ps1 → outputs dist\mcp-fetch-server.exe
Option C: Python + uv (development)
cd "E:\my python projects\MCP\mcp-fetch-server"
uv sync --dev
copy .env.example .env
uv run mcp-fetch-server --transport stdioConnect to Cursor
See the User Manual — Connect to Cursor for step-by-step instructions.
Minimal .cursor/mcp.json using the executable:
{
"mcpServers": {
"web-fetch": {
"command": "E:/my python projects/MCP/mcp-fetch-server/dist/mcp-fetch-server.exe",
"args": ["--transport", "stdio"],
"env": { "PYTHONIOENCODING": "utf-8" }
}
}
}Management GUI
A built-in web dashboard lets you monitor and manage the server without using Cursor:
Mode | URL |
stdio (Cursor default) |
|
streamable-http |
|
The dashboard shows uptime, registered tools, redacted configuration, recent fetch history, cached page previews, and a button to clear history/cache. It auto-refreshes every 30 seconds.
If MCP_AUTH_TOKEN is set, enter it in the dashboard's auth bar (stored in your
browser session only). Disable the GUI with FETCH_ADMIN_ENABLED=false.
Optional: SearXNG search fallback
web_search uses DuckDuckGo by default and falls back to SearXNG when that scrape fails.
When you use Docker (docker compose up), SearXNG is started automatically and the MCP
container is preconfigured to reach it at http://searxng:8080.
For local (non-Docker) use, you can still run only SearXNG:
docker compose up -d searxngSet FETCH_SEARXNG_URL=http://localhost:8080 in .env. See searxng/settings.yml.
Remote HTTP Mode (without full Docker stack)
$env:MCP_AUTH_TOKEN = "your-long-random-token"
.\dist\mcp-fetch-server.exe --transport streamable-http --host 127.0.0.1 --port 8000MCP endpoint:
http://127.0.0.1:8000/mcpHealth check:
http://127.0.0.1:8000/health
Project Structure
mcp-fetch-server/
├── dist/mcp-fetch-server.exe # Windows executable
├── src/mcp_fetch_server/ # Source code (tools, resources, prompts, security, ...)
├── tests/ # 84 pytest tests
├── docs/ # User manual + technical docs
├── scripts/docker-up.sh # Linux/macOS stack startup
├── scripts/docker-up.ps1 # Windows stack startup
├── docker-compose.yml # Full stack: MCP server + SearXNG
├── .env.docker.example # Environment template for Docker Compose
├── Dockerfile # MCP server image
├── workspace/ # Host folder mounted for local file tools (Docker)
├── searxng/settings.yml # SearXNG config (JSON API enabled)
├── src/mcp_fetch_server/admin.py # Management web GUI
└── .cursor/mcp.json # Cursor configDevelopment
uv run pytest
uv run ruff check .
./scripts/docker-up.sh # Linux / macOS
docker compose downWindows only:
.\scripts\build_exe.ps1
.\scripts\docker-up.ps1License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/narimanamiri/mcp-fetch-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server