快速、高效的网页内容提取工具,适用于AI代理——将网站转换为干净的Markdown。
<a href="https://glama.ai/mcp/servers/@just-every/mcp-read-website-fast"> <img width="380" height="200" src="https://gips1.baidu.com/it/u=2512654639,1844169504&fm=3081&app=3081&f=PNG?w=760&h=400" alt="read-website-fast MCP 服务器" /> </a>现有的MCP网络爬虫速度慢且消耗大量的令牌。这会暂停开发过程,并提供不完整的结果,因为LLMs需要解析整个网页。
此MCP包在本地获取网页,去除噪音,并将内容转换为干净的Markdown,同时保留链接。专为Claude Code、IDE和LLM流水线设计,具有最小的令牌足迹。本地爬取站点,依赖项最少。
注意: 此包现在使用@just-every/crawl进行核心爬取和Markdown转换功能。
claude mcp add read-website-fast -s user -- npx -y @just-every/mcp-read-website-fast
code --add-mcp '{"name":"read-website-fast","command":"npx","args":["-y","@just-every/mcp-read-website-fast"]}'
cursor://anysphere.cursor-deeplink/mcp/install?name=read-website-fast&config=eyJyZWFkLXdlYnNpdGUtZmFzdCI6eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqdXN0LWV2ZXJ5L21jcC1yZWFkLXdlYnNpdGUtZmFzdCJdfX0=
设置 → 工具 → AI助手 → 模型上下文协议(MCP)→ 添加
选择“作为JSON”并粘贴:
{"command":"npx","args":["-y","@just-every/mcp-read-website-fast"]}
或者,在聊天窗口中键入/add并填写相同的JSON——两种路径都能一步到位地安装服务器。
{
"mcpServers": {
"read-website-fast": {
"command": "npx",
"args": ["-y", "@just-every/mcp-read-website-fast"]
}
}
}
将此内容放入您的客户端mcp.json文件中(例如,.vscode/mcp.json,~/.cursor/mcp.json,或.Claude/.mcp.json)。
read_website - 获取网页并将其转换为干净的Markdown
url(必需):要获取的HTTP/HTTPS URLpages(可选):最大爬取页数(默认:1,最大:110)read-website-fast://status - 获取缓存统计信息read-website-fast://clear-cache - 清除缓存目录npm install
npm run build
npm run dev fetch https://example.com/article
npm run dev fetch https://example.com --depth 2 --concurrency 5
# 仅Markdown(默认)
npm run dev fetch https://example.com
# 带有元数据的JSON输出
npm run dev fetch https://example.com --output json
# 同时输出URL和Markdown
npm run dev fetch https://example.com --output both
-p, --pages <number> - 最大爬取页数(默认:1)-c, --concurrency <number> - 最大并发请求数(默认:3)--no-robots - 忽略robots.txt--all-origins - 允许跨域爬取-u, --user-agent <string> - 自定义用户代理--cache-dir <path> - 缓存目录(默认:.cache)-t, --timeout <ms> - 请求超时时间(毫秒,默认:30000)-o, --output <format> - 输出格式:json、markdown 或 both(默认:markdown)npm run dev clear-cache
MCP服务器默认包含自动重启功能,以提高可靠性:
对于开发/调试而不启用自动重启:
# 直接运行而无需重启包装器
npm run serve:dev
mcp/
├── src/
│ ├── crawler/ # URL获取,队列管理,robots.txt
│ ├── parser/ # DOM解析,Readability,Turndown转换
│ ├── cache/ # 基于磁盘的缓存,使用SHA-256键
│ ├── utils/ # 日志记录器,分块实用工具
│ ├── index.ts # CLI入口点
│ ├── serve.ts # MCP服务器入口点
│ └── serve-restart.ts # 自动重启包装器
# 在开发模式下运行
npm run dev fetch https://example.com
# 为生产构建
npm run build
# 运行测试
npm test
# 类型检查
npm run typecheck
# 代码检查
npm run lint
欢迎贡献!请:
npm run dev clear-cache
MIT