Skip to main content
Glama
site-crawler-mcp

site-crawler-mcp

by coolaigit

site-crawler-mcp

사이트 전체를 크롤링하는 MCP 서버로, crawl4ai(Apache-2.0) 기반입니다. 검색 엔진 스파이더처럼 웹사이트의 모든 내부 링크를 크롤링하고(BFS), 게시 시간/제목/URL로 페이지를 필터링하며, 크롤링된 페이지에서 작업(요약, 링크 클릭, 파일 다운로드)을 수행할 수 있습니다. 결과는 JSON으로 반환되고 SQLite에 저장되어 어떤 프로젝트에서도 재사용할 수 있습니다.

한국어 소개: 「구글 크롤러처럼」 사이트 전체 내부 링크를 크롤링하는 MCP입니다. crawl4ai 기반으로 자체 래핑했으며, BFS 전체 사이트 탐색, 시간/제목/URL 필터링, 페이지 작업(LLM 요약/링크 클릭/파일 다운로드), 결과 JSON 반환 + SQLite 영속화를 지원합니다. Reasonix / Claude Desktop / Cursor 등 어떤 MCP 클라이언트에든 등록하면 전역에서 재사용할 수 있습니다.

기능

  • ✅ 사이트 전체 BFS 크롤링 — 모든 내부 링크를 순회합니다 (max_depth / max_pages 조절 가능)

  • ✅ 시간 필터 — 페이지 메타 / JSON-LD / URL에서 게시 시간을 먼저 추출하고, 없는 경우 크롤링 시간으로 대체합니다 (결과는 time_source로 표시)

  • ✅ 제목 필터 — 제목 키워드로 포함/제외 (대소문자 구분 안 함)

  • ✅ URL 패턴 및 도메인 필터 — glob/regex URL 매칭, 동일 도메인 제한

  • ✅ 정중한 크롤링 — 기본적으로 robots.txt를 존중하고 속도 제한을 적용합니다 (전환 가능)

  • ✅ 페이지 작업 — LLM 요약 (LiteLLM: DeepSeek / GLM / OpenAI…, 로컬 폴백), 특정 링크 클릭 (CSS 선택자 또는 링크 텍스트), 파일 다운로드

  • ✅ SQLite 영속화 — 나중 프로젝트에서 크롤링 데이터를 재사용할 수 있는 query_crawls 도구

Related MCP server: read-website-fast

도구

도구

설명

crawl_site

BFS 전체 사이트 크롤링. 매개변수: start_url, max_depth, max_pages, published_after/before, title_contains/title_exclude, url_pattern, include_external, respect_robots, rate_limit

scrape_page

단일 페이지 스크레이핑 (markdown / 제목 / 게시 시간 / 링크)

summarize_page

페이지 콘텐츠 요약. mode=auto (LLM 우선 → 로컬 폴백) / llm / local; llm_provider (LiteLLM 형식, 예: deepseek/deepseek-chat), llm_api_key_env (기본값 DEEPSEEK_API_KEY)

click_link

페이지 내부의 링크 클릭 (selector CSS 또는 link_text) 및 대상 페이지 스크레이핑

download_file

페이지 파일을 출력 디렉터리로 다운로드 (기본값 E:\Reasonix-项目\crawler-output)

query_crawls

SQLite에서 저장된 크롤링 결과 쿼리 (제목/URL/시간 필터)

요구 사항

  • Python ≥ 3.12 (3.12.13에서 테스트됨)

  • uv 권장 (선택 사항 — 일반 pip도 작동합니다)

  • Playwright 브라우저: python -m playwright install chromium (또는 PLAYWRIGHT_BROWSERS_PATH를 기존 브라우저 설치 경로로 설정)

설치 및 등록

# 1. Create environment & install
uv venv .venv --python 3.12
uv pip install --python .venv\Scripts\python.exe crawl4ai "mcp>=1.2,<2"
uv pip install --python .venv\Scripts\python.exe -e .

# 2. Install browser (once)
.venv\Scripts\python.exe -m playwright install chromium

# 3. Register as MCP server (example for Reasonix config.toml)
[[plugins]]
name    = "site-crawler-mcp"
type    = "stdio"
command = "C:\\path\\to\\site-crawler-mcp\\.venv\\Scripts\\python.exe"
args    = ["-m", "site_crawler_mcp.server"]

Claude Desktop / Cursor의 경우, 해당 설정 파일의 mcpServers 아래에 동일한 command/args를 추가하세요.

빠른 시작 (Python API)

import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

async def main():
    params = StdioServerParameters(command="python", args=["-m", "site_crawler_mcp.server"])
    async with stdio_client(params) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()
            res = await session.call_tool("crawl_site", {
                "start_url": "https://example.com",
                "max_depth": 2,
                "max_pages": 20,
                "title_contains": "Example",
            })
            print(res.content[0].text)

asyncio.run(main())

시간 필터 작동 방식

crawl4ai의 URL 필터는 URL에만 적용되므로, 여기서는 콘텐츠 수준 필터링을 구현했습니다:

  1. URL 수준 가지치기 — TimeRangeFilter / TitleFilter (URL 날짜 패턴, URL 키워드)

  2. 콘텐츠 수준 — 각 페이지를 가져온 후 <meta property="article:published_time">, JSON-LD datePublished, <time datetime>, URL의 YYYY/MM/DD에서 게시 시간을 추출합니다. 찾지 못하면 크롤링 시간을 사용합니다 (결정 사항은 time_source로 기록됨).

준수 사항

  • 기본적으로 robots.txt와 속도 제한을 존중하여 대상 사이트에 부담을 주거나 IP가 차단되는 것을 방지합니다.

  • 학습 / 연구 / 자신의 사이트를 위한 용도입니다. 대상 사이트의 이용약관과 현지 법률을 준수하세요.

라이선스

MIT

crawl4ai(Apache-2.0) 기반으로 제작되었습니다.

Available Tools

6 tools
crawl_siteA

BFS 全站爬取(谷歌爬虫式):从 start_url 遍历站内所有内链。

筛选:published_after/before(ISO 时间,发布时间优先、抓取时间兜底)、 title_contains/title_exclude(标题包含)、url_pattern(glob/regex 模式)。 默认遵守 robots.txt 并按 0.5s/请求限速,可关闭。 结果 JSON 返回并持久化到 SQLite。

Inputs: start_url (required), max_depth, max_pages, rate_limit, +7 more.

download_fileC

下载页面文件(图片/文档等)到 E:\Reasonix-项目\crawler-output。

Inputs: url (required), filename.

query_crawlsC

查询已持久化的爬取结果(SQLite),供其它项目复用。

Inputs: limit, success_only, url_contains, title_contains, +2 more.

scrape_pageA

抓取单个页面,返回 markdown、标题、发布时间与链接列表,并持久化。

Inputs: url (required), respect_robots.

summarize_pageA

概括页面内容。mode: auto(LLM 优先,失败回落本地)/ llm / local。

llm_provider 如 "deepseek/deepseek-chat" 或 "openai/gpt-4o-mini"(LiteLLM 格式); llm_api_key_env 指定 API key 的环境变量名(默认 DEEPSEEK_API_KEY)。

Inputs: url (required), mode, llm_provider, llm_api_key_env.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: full site crawling, single page scraping, summarization, link clicking, file downloading, and querying. No overlap or ambiguity.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case (e.g., crawl_site, scrape_page, query_crawls), making the tool set predictable and easy to navigate.

    Tool Count5/5

    With 6 tools, the server is well-scoped. It covers the essential operations for a site crawler without unnecessary bloat or missing functionality.

    Completeness4/5

    The tool set covers core workflows: crawling, scraping, summarizing, interacting, downloading, and querying. Minor gaps like explicit crawl session management or update/delete operations exist, but the surface is largely complete for typical use cases.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Fetches webpages and crawls sites locally, stripping noise and converting content into clean, link-preserving Markdown with a minimal token footprint. Supports configurable crawl depth, concurrency, robots.txt compliance, and caching for efficient AI agent and LLM pipelines.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and MCP clients to fetch webpages locally, strip noise, preserve links, and convert content into clean, token-efficient Markdown, with optional depth crawling, caching, and robots.txt-aware rate limiting.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to crawl websites, follow internal links, render JavaScript pages, and extract clean main text and linked PDF tables into structured records. It exposes a crawl tool over stdio that returns records inline and writes a complete JSONL file.
      MIT