Claude Custom Fetch Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Claude Custom Fetch Mcp (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
为使用第三方 API 的 Claude Code 用户提供网页抓取能力的 MCP 服务器。
Claude Code 内置的 WebFetch 工具依赖 Anthropic 官方 API 的服务端能力。当你使用第三方 API 提供商(SiliconFlow、自建网关等)时,WebFetch 无法正常工作。
本 MCP 服务器在本地发起 HTTP 请求抓取网页,不依赖任何 API 提供商,只要你的电脑能上网就能工作。
git clone https://github.com/lyshrines/claude-custom-fetch-mcp
cd claude-custom-fetch-mcp
pip install -r requirements.txt
pip install truststore在你的项目根目录(或 home 目录)创建 .mcp.json:
{
"mcpServers": {
"custom-fetch": {
"command": "python",
"args": ["-m", "mcp_fetch.server"],
"env": {
"PYTHONPATH": "/path/to/claude-custom-fetch-mcp",
"USERPROFILE": "C:\\Users\\YourName",
"CACHE_TTL": "3600",
"MAX_CACHE_SIZE_MB": "100",
"LOG_LEVEL": "INFO"
}
}
}
}Windows 用户注意:env中需要显式设置USERPROFILE,否则日志路径解析可能失败。
在 ~/.claude/settings.json 中添加:
{
"enabledMcpjsonServers": ["custom-fetch"]
}重启 Claude Code,在 /mcp 中应能看到 custom-fetch 已启用。
# 联网抓取
当需要抓取网页内容时,优先使用 custom-fetch MCP 的 `fetch_url` 工具,而非内置 WebFetch(内置 WebFetch 在非官方 API 下不可用)。fetch_url抓取网页并提取内容。
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
url | string | 是 | - | 要抓取的 URL |
use_cache | boolean | 否 | true | 是否使用缓存 |
extract_main | boolean | 否 | true | 是否只提取正文 |
timeout | number | 否 | 15 | 超时时间(秒) |
detect_api_provider检测当前 Claude Code 的 API 配置,判断是否使用官方 API。
cache_stats查看缓存统计信息。
clear_cache清理缓存。older_than 参数指定清理多少秒前的条目,0 表示全部清理。
network_test测试到指定网站的连通性。sites 参数传入 URL 列表。
mcp - MCP SDKrequests - HTTP 客户端truststore - 使用系统 SSL 证书readability-lxml - 正文提取beautifulsoup4 - HTML 解析lxml - XML/HTML 处理MIT License
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.