Labsco
walksoda logo

Crawl4AI MCP Server

β˜… 46

from walksoda

An MCP server for advanced web crawling, content extraction, and AI-powered analysis using the crawl4ai library.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

Crawl-MCP: Unofficial MCP Server for crawl4ai

⚠️ Important: This is an unofficial MCP server implementation for the excellent crawl4ai library.
Not affiliated with the original crawl4ai project.

A comprehensive Model Context Protocol (MCP) server that wraps the powerful crawl4ai library with advanced AI capabilities. Extract and analyze content from any source: web pages, PDFs, Office documents, YouTube videos, and more. Features intelligent summarization to dramatically reduce token usage while preserving key information.

🌟 Key Features

  • πŸ” Google Search Integration - 7 optimized search genres with Google official operators
  • πŸ” Advanced Web Crawling: JavaScript support, deep site mapping, entity extraction
  • 🌐 Universal Content Extraction: Web pages, PDFs, Word docs, Excel, PowerPoint, ZIP archives
  • πŸ€– AI-Powered Summarization: Smart token reduction (up to 88.5%) while preserving essential information
  • πŸ’Ύ Disk Persistence (token-saver): Save full results to disk and return slim metadata, so agents read them from a file on demand without spending context
  • 🎬 YouTube Integration: Extract video transcripts and summaries without API keys
  • ⚑ Production Ready: 19 specialized tools with comprehensive error handling

πŸ“– Documentation

TopicDescription
Installation GuideComplete installation instructions for all platforms
API ReferenceFull tool documentation and usage examples
Configuration ExamplesPlatform-specific setup configurations
HTTP IntegrationHTTP API access and integration methods
Advanced UsagePower user techniques and workflows
Development GuideContributing and development setup

Language-Specific Documentation

  • English: docs/ directory
  • ζ—₯本θͺž: docs/ja/ directory

πŸ› οΈ Tool Overview

Web Crawling (3)

  • crawl_url - Extract web page content with JavaScript support
  • deep_crawl_site - Crawl multiple pages from a site with configurable depth
  • crawl_url_with_fallback - Crawl with fallback strategies for anti-bot sites

Data Extraction (3)

  • intelligent_extract - Extract specific data from web pages using LLM
  • extract_entities - Extract entities (emails, phones, etc.) from web pages
  • extract_structured_data - Extract structured data using CSS selectors or LLM

YouTube (4)

  • extract_youtube_transcript - Extract YouTube transcripts with timestamps
  • batch_extract_youtube_transcripts - Extract transcripts from multiple YouTube videos (max 3)
  • get_youtube_video_info - Get YouTube video metadata and transcript availability
  • extract_youtube_comments - Extract YouTube video comments with pagination

Search (4)

  • search_google - Search Google with genre filtering
  • batch_search_google - Perform multiple Google searches (max 3)
  • search_and_crawl - Search Google and crawl top results
  • get_search_genres - Get available search genres

File Processing (3)

  • process_file - Convert PDF, Word, Excel, PowerPoint, ZIP to markdown
  • get_supported_file_formats - Get supported file formats and capabilities
  • enhanced_process_large_content - Process large content with chunking and BM25 filtering

Batch Operations (2)

  • batch_crawl - Crawl multiple URLs with fallback (max 3 URLs)
  • multi_url_crawl - Multi-URL crawl with pattern-based config (max 5 URL patterns)

πŸ’Ύ Persist Large Results to Disk (token-saver)

All information-gathering tools accept an optional output_path parameter that writes the full fetched content straight to disk and returns a slim metadata-only response. This lets an LLM fetch huge pages, long YouTube transcripts, or whole batches without blowing its context budget β€” read from the saved file only when needed.

How it works:

  • Single-file tools (e.g. crawl_url, extract_youtube_transcript) write one .md (or .json for JSON-kind tools) β€” pass an absolute file path; the extension is auto-added if omitted. An existing regular file at that path is rejected unless overwrite=true.
  • Batch tools (batch_crawl, multi_url_crawl, deep_crawl_site, search_and_crawl, batch_extract_youtube_transcripts) expect an absolute directory path and write one .md per URL plus index.json. Any non-existent path is treated as a directory and created β€” including names containing dots such as /tmp/run.v1. If the path already exists as a regular file, the call is rejected. batch_crawl / multi_url_crawl keep their list return shape and embed an output_file key on each success item.
  • Request-dict tools (search_google, batch_search_google, search_and_crawl, batch_extract_youtube_transcripts) read the persistence keys directly from their request dict.
  • Common parameters: output_path (absolute; None or "" skips persistence), include_content_in_response (default false β€” when true, content is included in the response too, still subject to any content_limit/content_offset/max_content_per_page slicing), overwrite (default false).
  • Writes are atomic per file (temp file + os.replace); parent directories are auto-created; the full unsliced payload is persisted before any slicing or tool-internal truncation so the on-disk copy is always complete even when the response is sliced.
  • Batch dict tools (deep_crawl_site, search_and_crawl, batch_extract_youtube_transcripts) skip per-item persistence for items that report success=false; these still appear in index.json with file: null so callers can reason about the attempt list.

Markdown single-file example:

Copy & paste β€” that's it
{
  "tool": "crawl_url",
  "arguments": {
    "url": "https://example.com/long-article",
    "output_path": "/tmp/crawl_out/article.md"
  }
}

JSON structured extraction (extension auto-added):

Copy & paste β€” that's it
{
  "tool": "extract_structured_data",
  "arguments": {
    "url": "https://example.com/products",
    "extraction_type": "css",
    "css_selectors": {"price": ".price", "name": "h1"},
    "output_path": "/tmp/crawl_out/products"
  }
}

Batch directory mode:

Copy & paste β€” that's it
{
  "tool": "batch_crawl",
  "arguments": {
    "urls": ["https://a.example", "https://b.example"],
    "output_path": "/tmp/crawl_out/batch_run1"
  }
}

Each persisted markdown file begins with a YAML frontmatter block containing url, title, fetched_at, and source_tool so the artifact is self-describing.

🎯 Common Use Cases

Content Research:

Copy & paste β€” that's it
search_and_crawl β†’ extract_structured_data β†’ analysis

Documentation Mining:

Copy & paste β€” that's it
deep_crawl_site β†’ batch processing β†’ extraction

Media Analysis:

Copy & paste β€” that's it
extract_youtube_transcript β†’ summarization workflow

Site Mapping:

Copy & paste β€” that's it
batch_crawl β†’ multi_url_crawl β†’ comprehensive data

πŸ—οΈ Project Structure

  • Original Library: crawl4ai by unclecode
  • MCP Wrapper: This repository (walksoda)
  • Implementation: Unofficial third-party integration

πŸ“„ License

This project is an unofficial wrapper around the crawl4ai library. Please refer to the original crawl4ai license for the underlying functionality.

🀝 Contributing

See our Development Guide for contribution guidelines and development setup instructions.

πŸ”— Related Projects