Web Scraper Stack
БесплатноНе проверенProvides tools for web scraping using a multi-service stack including Playwright and proxy support.
Описание
Provides tools for web scraping using a multi-service stack including Playwright and proxy support.
README
A complete toolkit for web scraping with MCP (Model Context Protocol) support. This project provides a FastAPI REST API, an MCP server, a LangGraph agent, and a Streamlit chat interface—all working together to scrape, search, and extract web content.
📦 Project Structure
This monorepo contains four interconnected components:
| File | Purpose |
|---|---|
client.py |
MCP client that proxies requests to a remote web scraper API |
server.py |
FastAPI + MCP server that exposes scraping tools as REST endpoints |
scraper_demo.py |
LangGraph agent demo using the MCP tools with Groq LLM |
streamlit_GUI.py |
Interactive chat interface for the MCP agent |
🔧 Available Tools
All components share these 6 core web scraping tools:
search_google– Search Google and get structured resultsscrape_url– Extract clean content (markdown/text/html) from any webpagescrape_structured– Extract specific data using CSS selectorsextract_metadata– Get page metadata (title, OG tags, description)extract_links– Extract all links with optional regex filteringtake_screenshot– Capture webpage screenshots (base64 encoded)
🏗️ Architecture
┌─────────────────┐ ┌──────────────┐ ┌─────────────────────┐ │ Streamlit GUI │────▶│ MCP Client │────▶│ Remote Scraper API │ │ (Chat Interface)│ │ (client.py) │ │ (agent-scraper-mcp) │ └─────────────────┘ └──────────────┘ └─────────────────────┘ │ │ │ ▼ ▼ ▼ ┌─────────────────┐ ┌──────────────┐ ┌─────────────────────┐ │ LangGraph Demo │────▶│ FastAPI │────▶│ Local MCP Server │ │ (scraper_demo) │ │ + MCP Server │ │ (server.py --mcp) │ └─────────────────┘ └──────────────┘ └─────────────────────┘
🚀 Quick Start
Prerequisites
- Python 3.11+
uvpackage manager (install guide)- Groq API key (for LLM features)
Installation
# Clone the repository
git clone https://github.com/yourusername/web-scraper-mcp-suite.git
cd web-scraper-mcp-suite
# Install dependencies with uv
uv sync
# Create .env file with your API keys
echo "GROQ_API_KEY=your_groq_api_key_here" > .env
Running the Components
1. Start the FastAPI + MCP Server (Recommended)
# Run as REST API server (default)
uv run server.py
# Or run as pure MCP server
uv run server.py --mcp
The REST API will be available at http://localhost:8000 with Swagger docs at /docs.
2. Launch the Streamlit Chat Interface
# In a new terminal
uv run streamlit run streamlit_GUI.py
3. Run the LangGraph Demo
# Test the agent with a search query
uv run scraper_demo.py
📡 API Endpoints (from server.py)
FastAPI provides these REST endpoints (when running python server.py):
| Method | Endpoint | Description |
|---|---|---|
| POST | /search |
Search Google |
| POST | /scrape |
Extract webpage content |
| POST | /scrape-structured |
CSS selector extraction |
| POST | /metadata |
Get page metadata |
| POST | /links |
Extract all links |
| POST | /screenshot |
Capture screenshot |
🔌 MCP Integration
Both client.py and server.py implement MCP servers that can be used with any MCP client (Claude Desktop, Cursor, etc.).
Connect to the MCP server:
{
"mcpServers": {
"web-scraper": {
"command": "uv",
"args": ["run", "server.py", "--mcp"]
}
}
}
🧪 Testing the Tools
Using the REST API
curl -X POST http://localhost:8000/search \
-H "Content-Type: application/json" \
-d '{"query": "latest AI news", "num_results": 5}'
Using the MCP Client
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"web_scraper": {
"transport": "streamable_http",
"url": "http://localhost:8000/mcp"
}
})
tools = await client.get_tools()
result = await tools[0].ainvoke({"query": "Python tutorials"})
🎯 Use Cases
- RAG Applications – Scrape documentation and websites for retrieval-augmented generation
- AI Agents – Give your LLM the ability to search and scrape the web
- Data Collection – Automate extraction of structured data from multiple pages
- Monitoring – Take periodic screenshots of important webpages
⚠️ Important Notes
- Remote API Dependency: The current
client.pyrelies onhttps://agent-scraper-mcp.onrender.com(may be deprecated). For production, either:- Run your own instance of server.py locally
- Update
REMOTE_SCRAPER_SERVERinclient.pyto point to your own endpoint
- The 60+ Tools List: You may have seen a longer list of tools elsewhere. The actual implemented tools are only the 6 scraping tools listed above. Additional tools would need to be implemented in
client.py. - Environment Variables: Ensure
GROQ_API_KEYis set for LLM features inscraper_demo.pyandstreamlit_GUI.py.
🤝 Contributing
Feel free to submit issues and pull requests. Some ideas for extension:
- Add caching layer for repeated requests
- Implement parallel scraping with asyncio.gather()
- Add more tools (text summarization, translation, etc.)
- Add authentication to the FastAPI server
🙏 Acknowledgments
- FastMCP – MCP server framework
- LangChain MCP Adapters – Tool integration
- Groq – Fast LLM inference
- Streamlit – Chat interface framework
Установка Web Scraper Stack
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/bivoraryal/web-scraper-mcp-stackFAQ
Web Scraper Stack MCP бесплатный?
Да, Web Scraper Stack MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Web Scraper Stack?
Нет, Web Scraper Stack работает без API-ключей и переменных окружения.
Web Scraper Stack — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Web Scraper Stack в Claude Desktop, Claude Code или Cursor?
Открой Web Scraper Stack на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Playwright
Browser automation, scraping, screenshots
автор: MicrosoftPuppeteer
Browser automation and web scraping.
автор: modelcontextprotocolopentabs-dev/opentabs
Plugin-based MCP server + Chrome extension that gives AI agents access to web applications through the user's authenticated browser session. 100+ plugins with a
автор: opentabs-devrobhunter/agentdeals
1,500+ developer infrastructure deals, free tiers, and startup programs across 54 categories. Search deals, compare vendors, plan stacks, and track pricing chan
автор: robhunterCompare Web Scraper Stack with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории browse
