LC

laurentvv/crawl4ai-mcp-llm

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

45 stars 17 forks 质量 86 趋势 20MIT

laurentvv/crawl4ai-mcp-llm 是从 https://github.com/laurentvv/crawl4ai-mcp-llm. 导入的 MCP 服务器候选

概览

laurentvv/crawl4ai-mcp-llm 是从 https://github.com/laurentvv/crawl4ai-mcp-llm. 导入的 MCP 服务器候选

概述(AI 翻译)

一个强大的网页爬取工具,通过MCP(模型上下文协议)与AI助手集成。该项目允许AI助手爬取网站、提取动态内容、浏览链接并直接保存结构化Markdown文件。

📋 特色

  • 通过MCP与AI助手的原生集成
  • 直接返回抓取的 Markdown 内容给 AI
  • 用于AI导航的提取和曲面内外部链接
  • 网站爬取,可配置深度和页数限制
  • 详细的爬取结果统计,包括跳过页面列表
  • 长爬行期间的实时进度通知
  • 作为MCP资源(crawl://results/...)显示的保存结果
  • 错误且未找到页面处理
  • 默认安全:仅允许公开的 http(s) URL,除非你选择加入,否则禁用 JavaScript
  • 高级抓取能力:
  • 魔法模式:crawl4ai 启发式,模拟真实浏览器并帮助部分反机器人防护(非必然绕过)
  • 有针对性提取:仅用CSS选择器获取所需内容
  • 自定义JavaScript(选择加入):在提取前执行代码(点击、滚动、表单填充)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Web Crawler MCP

A powerful web crawling tool that integrates with AI assistants via the MCP (Model Context Protocol). This project allows AI assistants to crawl websites, extract dynamic content, navigate through links, and save structured Markdown files directly.

📋 Features

  • Native integration with AI assistants via MCP
  • Return scraped Markdown content directly to the AI
  • Extracts and surfaces internal/external links for AI navigation
  • Website crawling with configurable depth and page limit
  • Detailed crawl result statistics, including the list of skipped pages
  • Live progress notifications during long crawls
  • Saved results exposed as MCP resources (crawl://results/...)
  • Error and not found page handling
  • Secure by default: only public http(s) URLs, JavaScript disabled unless you opt in
  • Advanced Scraping Capabilities:
    • Magic Mode: crawl4ai heuristics that simulate a real browser and help with some anti-bot protections (not a guaranteed bypass)
    • Targeted Extraction: Fetch only what you need using CSS selectors
    • Custom JavaScript (opt-in): Execute code before extraction (clicks, scrolls, form fills)
    • Persistent Sessions: One browser is shared across calls, so a session_id keeps cookies and state until it is closed (close_session) or stays idle too long
    • SPA Support: Wait for dynamic CSS selectors or set explicit pre-extraction delays

🚀 MCP Configuration

The simplest and recommended way to use this tool is via uvx. The @latest suffix makes uvx check PyPI at each start and run the newest published version (without it, uvx keeps reusing the version it cached the first time).

Prerequisites

  • uv installed on your system.

Setup for AI Assistants (e.g., Claude Desktop, Cline)

在 GitHub 查看完整 README

安装

uvx --python 3.13 crawl4ai-mcp-llm@latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "crawl": { "command": "uvx", "args": [ "--python", "3.13", "crawl4ai-mcp-llm@latest" ], "disabled": false, "autoApprove": [], "timeout": 600 } } }