ScrapeForge MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ScrapeForge MCP ServerExtract product names and prices from these Amazon product URLs and cache the schema."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ScrapeForge
The first web scraper that learns page layouts and remembers them.
Zero-config structured extraction. One crawl per domain template, never again.
What is this?
ScrapeForge is a self-learning, LLM-powered web scraper that doesn't just extract data , it understands page templates and caches them for reuse.
Traditional scrapers break when a site redesigns. ScrapeForge breaks the cycle:
First visit --> LLM analyzes the DOM and generates a CSS extraction schema
Pattern learning --> URLs sharing the same layout are automatically grouped (
/product/iphoneand/product/samsung-->*/product/*)Forever after --> Every subsequent URL on that template reuses the cached schema zero LLM cost, zero latency
Rot detection --> If a cached schema starts failing, the system detects it empirically and regenerates
No XPath. No manual selectors. No brittle maintenance.
Related MCP server: extracto-mcp
The Problem It Solves
The Problem: Writing and maintaining CSS selectors for web scraping is time-consuming and breaks easily when websites update.
The 10x Solution: ScrapeForge makes data extraction 10x faster by using LLMs to automatically generate, empirically test, and cache robust extraction schemas.
Traditional Scraper | ScrapeForge |
Write CSS selectors by hand | LLM generates selectors from raw HTML |
Breaks on every redesign | Validates schemas empirically; auto-regenerates when stale |
One script per site | One schema per template , covers thousands of URLs |
Hardcoded URL lists | Learns URL patterns automatically ( |
No anti-bot handling | Built-in stealth, retry backoff, rate limiting, timeout guards |
Killer Features
LLM Schema Generation: Feed it HTML, get a
JsonCssExtractionStrategyschema automatically (Gemini, OpenAI, Ollama, any other provider supported)Pattern Generalization: Automatically discovers that
amazon.in/*/dp/B0C8...andamazon.in/*/dp/B0DF...share one schemaEmpirical Verification: Before trusting a cached schema, it actually tests extraction on the new URL and measures fill-rate
SQLite Schema Cache: Persistent, timestamped schema storage with domain-scoped lookups
Production Hardened: Exponential backoff retries,
asynciotimeouts, rate limiting, thread-safe file I/OMCP Server: Exposed as FastAPI + Model Context Protocol tools. Claude, Cursor, or any MCP client can scrape natively
Multi-Output: Markdown, raw HTML, or structured JSON in one call
Tech Stack
Layer | Tools |
Crawler | Crawl4AI + Playwright |
API Framework | FastAPI + Uvicorn |
Web Crawling | Crawl4AI (Playwright‑based) |
LLM Integration | Gemini / OpenAI / Ollama (pluggable via |
Database | SQLAlchemy2.0 + SQLite (default, replaceable) |
Async Helpers |
|
MCP |
|
Testing |
|
Why This Is Different
Most "AI scrapers" call an LLM for every single page.
ScrapeForge calls the LLM once per template, then caches and generalizes.
That means:
1000 product pages on Amazon = 1 LLM call (not 1000)
Zero maintenance when sites add new articles/products
Self-healing when layouts drift
Run Instructions (for a clean machine)
Follow these exact step‑by‑step commands to get the system running from scratch.
1. Clone the repository
git clone https://github.com/ajazhussainsiddiqui/ScrapeForge.git
cd ScrapeForge2. Create and activate a Python virtual environment
python -m venv venv
source venv/bin/activate # Linux / macOS
# or
.\venv\Scripts\activate # Windows3. Install all dependencies
pip install -r requirements.txt4. Install Playwright browsers (required by Crawl4AI)
playwright install5. Create the .env configuration file
echo "DATABASE_URL=sqlite:///./schema.db" > .env
echo "LLM_API_KEY=your_api_key_here" >> .env # only needed for structured extractionNote: If you only want to test Markdown / HTML crawling, you can leave
LLM_API_KEYempty. For structured extraction, provide a Gemini key or anyother provider like OpenAI, Groq (the code expects theprovider/modelformat, e.g.gemini/gemini-2.0-flash).
6. Initialize the database tables
python -c "from db.connection import engine, Base; Base.metadata.create_all(engine)"7. Start the FastAPI server
uvicorn api:app # run in terminal from root directoryYour API is now live at http://localhost:8000. The interactive Swagger documentation is available at http://localhost:8000/docs.
Concept Table (5+ key ideas & their location)
Concept | Implementation Location |
Async web crawling (Markdown / HTML / screenshots) |
|
LLM‑driven schema generation (CSS selectors) |
|
Empirical schema caching , test & reuse |
|
Structured output validation (failure scoring) |
|
FastAPI REST endpoints (scrape, schemas, health) |
|
MCP (Model Context Protocol) integration |
|
Repository pattern for schema storage |
|
Async retry + exponential backoff |
|
URL pattern matching & generalization |
|
Demo Path (works with live data)
Follow this guided walkthrough to see the system in action. No demo data is pre‑seeded , you will generate it in real time.
Note: You can also run this demo directily by executing
main.pyfile with the inputs or follow FastAPI swagger below.
Prerequisites
Server is running (
uvicorn api:app ...).You have a valid
LLM_API_KEYin.env(for the structured part).If you don't have a key, skip Step 4 and just observe the Markdown + schema list.
Open Swagger UI
Open your browser and go to:
http://localhost:8000/docsYou will see all available endpoints grouped under
scrape,schemas, andsystem.
Health check & raw Markdown scrape
Expand the
GET /healthendpoint. Click "Execute".
You get:{"status": "ok"}, the server is live.Expand the
POST /scrapeendpoint. In the request body, paste:{ "url": "https://news.ycombinator.com", # replace this url with webpage you want to scrape "crawl_type": "markdown", "magic": true }Click "Execute".
The response returns the full Markdown content ofnews.ycombinator.com, no API key required.
Generate a structured schema (seed the cache)
Back in
POST /scrape, change the body to:{ "url": "https://www.bbc.com/news/articles/cwyz11475l1o", "crawl_type": "structured", "model_provider": "gemini/gemini-2.0-flash", # configure your LLM model and below its API key "api_key": "YOUR_ACTUAL_API_KEY", "magic": true }Click "Execute".
The system fetches the BBC article HTML.
It calls the LLM to generate a CSS extraction schema.
It saves that schema to the SQLite database.
It runs the schema against the page and returns structured JSON (title, body, images, etc.).
This takes 15‑30 seconds , this is the "seed" step.
View the cached schema
Expand the
GET /schemasendpoint. Click "Execute".
You see a list of cached schemas. The one you just created appears with:domain:bbc.comdomain_pattern: a concrete URL (later generalised)example_urls: the URL you just scrapedlast_successful_used: timestamp
Test the cache with a similar URL
Go back to
POST /scrapeand run structured extraction on a different BBC article, e.g.:{ "url": "https://www.bbc.com/news/articles/c99dym3prl1o", "crawl_type": "structured", "model_provider": "gemini/gemini-2.0-flash", "api_key": "YOUR_API_KEY", "magic": true }Click "Execute".
This time, the system skips the LLM, reuses the cached schema, runs the structured crawler, and returns JSON in < 5 seconds. It also automatically updates theexample_urlslist and toucheslast_successful_used.(Optional) Expand
GET /schemasagain. You will see that theexample_urlsarray now contains both URLs , the system is learning and generalising.
Demo complete
In 5 minutes, you have:
Scraped raw Markdown (no AI).
Generated a new extraction schema using an LLM (with AI).
Cached and reused that schema on a second, similar page.
Explored the API documentation and the database state.
Running Tests
Execute the full test suite with:
pytest tests/ -vTests cover:
Database repository (CRUD, caching).
Schema validation & similarity scoring.
URL generalisation and pattern matching.
Rate limiter and retry logic.
Configuration (config.py)
Key environment variables (set in .env):
Variable | Default | Description |
|
| Database connection string |
| (empty) | API key for Gemini/OpenAI |
|
| Max seconds per crawl |
|
| Max seconds for schema generation |
|
| Jaccard similarity to merge schemas |
|
| Minimum delay between external calls |
Project Structure (high‑level)
.
├── api.py # FastAPI app, MCP mounting, endpoints
├── main.py # Orchestration entry point (for CLI / testing)
├── config.py # Environment variables & constants
├── requirements.txt # Python dependencies
├── core/
│ ├── crawler.py # Crawl4AI wrappers (markdown, html, structured)
│ ├── schema_gen.py # LLM schema generation
│ └── validators.py # Output validation & failure scoring
├── services/
│ └── schema_service.py # Caching, empirical testing, merging logic
├── db/
│ ├── connection.py # SQLAlchemy engine & session
│ ├── models.py # Schema table definition
│ └── repository.py # CRUD operations
├── utils/
│ ├── async_helpers.py # RateLimiter, retry_async
│ ├── schema.py # Jaccard similarity for schemas
│ └── url.py # Domain extraction, pattern matching
└── tests/ # Unit tests (pytest)This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Cloud scraping & crawling API for AI agents. Turn any URL into clean, LLM-ready markdown.
Turn any website into structured JSON data matching your custom schema.
Enable language models to perform advanced AI-powered web scraping with enterprise-grade reliabili…
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Related MCP Servers
- AlicenseAqualityDmaintenanceStructured web context infrastructure for AI agents. Extract reliable schema-guided JSON from websites using Claude-powered parsing, Browserless fallback rendering, and MCP-native workflows.11MIT
- AlicenseAqualityDmaintenanceEnables Claude and any MCP client to turn a URL plus a schema into validated, typed JSON without HTML parsing or hallucinated fields.448MIT
- AlicenseAqualityBmaintenanceMCP server that extracts structured JSON from public URLs for AI agents using schemas like product, article, and company.645MIT
- AlicenseNot gradedqualityCmaintenanceEnables lead generation and web scraping through 16 MCP tools, allowing AI clients like Claude, Cursor, and Windsurf to perform scraping tasks via natural language.61MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ajazhussainsiddiqui/ScrapeForge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server