Web Fetch MCP Server
Click on "Deploy 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., "@Web Fetch MCP Server fetch markdown from https://example.com"
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.
Web Fetch MCP Server (Python)
基于 zcaceres/fetch-mcp 的 Python 实现,使用 FastMCP 框架。
功能
提供 4 个网页内容获取工具:
工具 | 描述 |
| 获取网页原始 HTML |
| 获取并解析 JSON 数据 |
| 获取纯文本(去除 HTML 标签) |
| 获取网页并转换为 Markdown |
所有工具支持以下参数:
url- 目标 URL(必填)headers- 自定义请求头(可选)max_length- 最大返回字符数,默认 50000(可选)start_index- 起始字符位置,默认 0(可选)
Related MCP server: Fetch MCP Server
使用方式
本地运行
# 安装依赖
uv venv && source .venv/bin/activate
uv pip install -e .
# Stdio 模式
uv run python fetch_mcp_server.py
# SSE 模式(HTTP 服务)
uv run fastmcp run fetch_mcp_server.py:mcp --transport sse --port 8000Docker 运行
# 构建镜像
docker build -t web-fetch-mcp .
# 运行容器
docker run -d -p 8000:8000 --name web-fetch-mcp web-fetch-mcp
# 或使用 docker-compose
docker-compose up -dMCP 客户端配置
Streamable HTTP 模式(Docker 默认)
{
"mcpServers": {
"fetch": {
"url": "http://localhost:8000/mcp"
}
}
}SSE 模式
{
"mcpServers": {
"fetch": {
"url": "http://localhost:8000/sse"
}
}
}Stdio 模式
{
"mcpServers": {
"fetch": {
"command": "python",
"args": ["/path/to/fetch_mcp_server.py"]
}
}
}环境变量
DEFAULT_LIMIT- 默认最大返回字符数(默认: 50000)
License
MIT
Available Tools
4 toolsfetch_htmlA
Fetch a website and return its unmodified contents as HTML.
Args: url: URL of the website to fetch headers: Optional headers to include in the request max_length: Maximum number of characters to return (default: 50000) start_index: Start content from this character index (default: 0)
Returns: The raw HTML content of the webpage
Inputs: url (required), headers, max_length, start_index. Returns: result
fetch_jsonA
Fetch a JSON file from a URL.
Args: url: URL of the JSON to fetch headers: Optional headers to include in the request max_length: Maximum number of characters to return (default: 50000) start_index: Start content from this character index (default: 0)
Returns: The JSON content as a string
Inputs: url (required), headers, max_length, start_index. Returns: result
fetch_markdownA
Fetch a website and return the content as Markdown.
Args: url: URL of the website to fetch headers: Optional headers to include in the request max_length: Maximum number of characters to return (default: 50000) start_index: Start content from this character index (default: 0)
Returns: The content of the webpage converted to Markdown format
Inputs: url (required), headers, max_length, start_index. Returns: result
fetch_txtA
Fetch a website and return the content as plain text (no HTML).
Args: url: URL of the website to fetch headers: Optional headers to include in the request max_length: Maximum number of characters to return (default: 50000) start_index: Start content from this character index (default: 0)
Returns: The text content of the webpage with HTML tags, scripts, and styles removed
Inputs: url (required), headers, max_length, start_index. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool is clearly distinguished by its output format: HTML, JSON, plain text, and Markdown. There is no overlap in purpose since the format determines the correct tool to use.
All tool names follow the exact same verb_noun pattern: fetch_html, fetch_json, fetch_txt, fetch_markdown. This makes the tool set highly predictable and easy to navigate.
Four tools is well-scoped for a web fetching server, covering the most common output formats without unnecessary bloat. Each tool earns its place and there is no redundancy.
The tool surface fully covers the stated purpose of fetching web content, including raw HTML, structured JSON, readable text, and Markdown. There are no obvious dead ends or missing core operations for a fetch-only server.
Maintenance
Related MCP Connectors
Web and URL utilities over MCP: shorten URLs, screenshot pages, read page metadata, encode URLs.
MCP server (stdio): fetch web pages as clean readable markdown via the AgentForge API
Web MCP: scrape/crawl sites, web search, brand assets, app stores, YouTube, Reddit, Hacker News.
Web scraping MCP server: any URL to Markdown or JSON, with JavaScript rendering and batch jobs.
Related MCP Servers
- AlicenseAqualityDmaintenanceA powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.49,329 npm42MIT
- AlicenseAqualityDmaintenanceProvides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.45,464 npm837MIT
- AlicenseAqualityDmaintenanceProvides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.4117,041 npm2MIT
- AlicenseBqualityDmaintenanceProvides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown with support for custom headers.4117,041 npm3MIT