Web Fetch MCP Server
Provides tools to fetch web content in HTML, JSON, text, or Markdown formats via MCP. Supports custom headers, length limits, and start index.
README
Web Fetch MCP Server (Python)
基于 zcaceres/fetch-mcp 的 Python 实现,使用 FastMCP 框架。
功能
提供 4 个网页内容获取工具:
| 工具 | 描述 |
|---|---|
fetch_html |
获取网页原始 HTML |
fetch_json |
获取并解析 JSON 数据 |
fetch_txt |
获取纯文本(去除 HTML 标签) |
fetch_markdown |
获取网页并转换为 Markdown |
所有工具支持以下参数:
url- 目标 URL(必填)headers- 自定义请求头(可选)max_length- 最大返回字符数,默认 50000(可选)start_index- 起始字符位置,默认 0(可选)
使用方式
本地运行
# 安装依赖
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 8000
Docker 运行
# 构建镜像
docker build -t web-fetch-mcp .
# 运行容器
docker run -d -p 8000:8000 --name web-fetch-mcp web-fetch-mcp
# 或使用 docker-compose
docker-compose up -d
MCP 客户端配置
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.