site-crawler-mcp
Enables site-wide crawling of internal links with BFS traversal, time/title/URL filtering, and page operations like summarization and link clicking, with results persisted to SQLite.
README
site-crawler-mcp
A site-wide crawler MCP server built on crawl4ai (Apache-2.0). It crawls every internal link of a website like a search-engine spider (BFS), filters pages by publish time / title / URL, and can operate on crawled pages (summarize, click links, download files). Results are returned as JSON and persisted to SQLite for reuse by any project.
中文简介:一个「像谷歌爬虫一样」的全站内链爬虫 MCP。基于 crawl4ai 自研封装, 支持 BFS 全站遍历、时间/标题/URL 筛选、页面操作(LLM 概括/点击链接/下载文件)、 结果 JSON 返回 + SQLite 持久化。注册到 Reasonix / Claude Desktop / Cursor 等任意 MCP 客户端即可全局复用。
Features
- ✅ Site-wide BFS crawl — traverse all internal links (max_depth / max_pages controllable)
- ✅ Time filter — extract publish time from page meta / JSON-LD / URL first,
fall back to crawl time when unavailable (result tagged with
time_source) - ✅ Title filter — include / exclude by title keyword (case-insensitive)
- ✅ URL pattern & domain filters — glob/regex URL matching, same-domain restriction
- ✅ Polite crawling — respects
robots.txtand rate-limits by default (toggleable) - ✅ Page operations — LLM summarize (LiteLLM: DeepSeek / GLM / OpenAI…, local fallback), click a specific link (CSS selector or link text), download files
- ✅ SQLite persistence —
query_crawlstool to reuse crawled data in later projects
Tools
| Tool | Description |
|---|---|
crawl_site |
BFS site-wide crawl. Params: start_url, max_depth, max_pages, published_after/before, title_contains/title_exclude, url_pattern, include_external, respect_robots, rate_limit |
scrape_page |
Scrape a single page (markdown / title / publish time / links) |
summarize_page |
Summarize page content. mode=auto (LLM first → local fallback) / llm / local; llm_provider (LiteLLM format, e.g. deepseek/deepseek-chat), llm_api_key_env (default DEEPSEEK_API_KEY) |
click_link |
Click a link inside the page (selector CSS or link_text) and scrape the target page |
download_file |
Download page files to output dir (default E:\Reasonix-项目\crawler-output) |
query_crawls |
Query persisted crawl results from SQLite (title/URL/time filters) |
Requirements
- Python ≥ 3.12 (tested on 3.12.13)
- uv recommended (optional — plain
pipworks too) - Playwright browsers:
python -m playwright install chromium(or pointPLAYWRIGHT_BROWSERS_PATHat an existing browser install)
Install & Register
# 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"]
For Claude Desktop / Cursor, add the same command/args under mcpServers in their config files.
Quick Start (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())
How the time filter works
crawl4ai's URL filters work on URLs only, so content-level filtering is implemented here:
- URL-level pruning —
TimeRangeFilter/TitleFilter(URL date patterns, URL keywords) - Content-level — after each page is fetched, publish time is extracted from
<meta property="article:published_time">, JSON-LDdatePublished,<time datetime>, orYYYY/MM/DDin the URL. If none found, crawl time is used (decision documented astime_source).
Compliance
- Respects
robots.txtand rate limits by default to avoid stressing target sites or getting IP-banned. - For learning / research / your own sites; please follow target sites' ToS and local laws.
License
Built on crawl4ai (Apache-2.0).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。