ecommerce-insight-mcp
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., "@ecommerce-insight-mcpCompare the featured products in this category: https://www.trendyol.com/c/electronics"
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.
E-Commerce Presentation & Insights MCP Server
An MCP server for Claude Desktop that scrapes e-commerce product pages and category links to generate structured presentation payloads, product comparisons, and market insights.
English
A Model Context Protocol (MCP) server built with Python (FastMCP) that lets Claude Desktop scrape and clean e-commerce product and category pages into structured JSON, enabling Claude to build presentation slides, market analysis reports, and competitive product comparisons.
Features
1. extract_product_presentation_data(url: str)
Fetches a single product page and returns:
Page title (
<title>)Up to 6 product images — detected first via
og:image/twitter:imagemeta tags, falling back to<img>tags filtered by exclusion keywords (logo, icon, sprite, etc.) and minimum size; all URLs resolved withurljoinClean text with
script,style,header,footer,nav,noscripttags stripped, lines shorter than 3 characters removed, capped at the first 150 lines
2. extract_structured_product_schema(url: str)
Extracts machine-readable structured data instead of freeform text:
All
<script type="application/ld+json">blocks, parsed into JSON (this is the same schema.orgProductdata Google uses for rich snippets — reliable price, stock, brand, and rating fields when the site provides it)All
og:*andproduct:*OpenGraph meta tags as a flat key-value map
Useful when you need exact, structured fields (price, SKU, availability) rather than a text summary — most modern e-commerce platforms (Shopify, Trendyol, WooCommerce, etc.) publish this data even when they don't want to be scraped in other ways.
3. get_category_presentation_data(url: str)
Fetches a category/listing page and returns:
Page title
Up to 8 unique products from links whose
hrefcontains-p-,/product/,/urun/,-pm-, or/p-, with link text longer than 10 characters (name + full URL)
All three tools return {"error": "Hata oluştu: ..."} on failure instead of raising an exception.
Fetch Strategy
Every tool goes through a shared two-stage fetch (_fetch_soup):
Fast path — a plain
httpxrequest.Fallback path — if the fast path returns a blocking status code (
403/429/503), or returns200 OKwith a page that looks like a bot-check (title/body matching patterns like "security check", "captcha", "verify you are human", or suspiciously short content — see_looks_blocked), the tool retries with a headless Playwright browser (randomized viewport,tr-TRlocale, hiddennavigator.webdriverflag).
This is enough to handle most JS-rendering and basic bot-detection cases, but it is not a stealth/evasion toolkit — see Known Limitations below for what it doesn't get past.
Error handling is centralized in a @handle_fetch_errors decorator wrapping all three tools, so each tool function only contains its own parsing logic — no repeated try/except blocks. Timeouts, HTTP errors, connection errors, and missing Playwright are each caught once and turned into a consistent {"error": "..."} JSON response.
Known Limitations
As of the latest update, this server is largely platform-agnostic:
Relative links in
get_category_presentation_dataare resolved with Python's built-inurllib.parse.urljoin(base_url, href), so they correctly resolve against any target domain.Product images are detected via
og:image/twitter:imagemeta tags first (a standard nearly all e-commerce sites use), falling back to<img>tags filtered by exclusion keywords (logo, icon, sprite, etc.) and minimum size — not tied to any single CDN.Product-link detection matches common patterns (
-p-,/product/,/urun/,-pm-,/p-) used across Turkish and international e-commerce platforms.
Remaining limitations:
Hepsiburada is not reliably supported. It runs enterprise-grade bot protection that blocks both plain HTTP requests and a headless Playwright browser (with a randomized User-Agent, disabled automation flags, and a hidden
navigator.webdriver) — the site returns a 200 OK "security check" page instead of product content either way. Tested and confirmed as of this writing; not expected to change without significantly more invasive evasion techniques, which this project intentionally does not pursue.No
robots.txtcheck or rate limiting between requests.Not yet tested against every major e-commerce platform — edge cases on unfamiliar sites are possible.
Requirements
Python 3.10+
Dependencies (requirements.txt):
fastmcp
httpx
beautifulsoup4
playwrightAfter installing, download the Playwright browser binary once:
playwright install chromiumInstallation
git clone https://github.com/odrdgi-create/ecommerce-insight-mcp.git
cd ecommerce-insight-mcp
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtClaude Desktop Setup
Add the following block to your Claude Desktop config file
(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json,
Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"ecommerce-insight": {
"command": "python",
"args": ["/full/path/to/ecommerce-insight-mcp/ecommerce_mcp.py"]
}
}
}If using a venv, point
"command"to the venv's Python binary (e.g./full/path/to/ecommerce-insight-mcp/venv/bin/python).
Save the file and restart Claude Desktop. The "E-Commerce HTML Summarizer" server should appear in the tools list.
Usage Example
Ask Claude something like:
"Analyze this product page for a presentation: https://www.trendyol.com/..."
Claude calls extract_product_presentation_data and receives:
{
"type": "single_product_presentation",
"url": "https://www.trendyol.com/...",
"title": "Product Name",
"product_images": ["https://cdn.dsmcdn.com/..."],
"extracted_content": "Clean product description, specs, etc..."
}For a category page:
"Compare the featured products in this category: https://www.trendyol.com/..."
{
"type": "category_showcase_presentation",
"category_title": "Category Name",
"category_url": "https://www.trendyol.com/...",
"top_products": [
{"name": "Product 1", "url": "https://www.trendyol.com/..."}
]
}For exact structured fields:
"Get me the exact price and stock status for this product: https://www.trendyol.com/..."
Claude calls extract_structured_product_schema and receives the site's raw JSON-LD and OpenGraph data, from which it can read fields like price, currency, and availability directly.
Project Structure
ecommerce-insight-mcp/
├── ecommerce_mcp.py # MCP server and tool definitions
├── requirements.txt # Python dependencies
├── .gitignore
└── README.mdRoadmap (suggested)
Dynamic relative-URL resolution based on target domain (
urljoin)Platform-agnostic image detection (
og:image+ filtered<img>fallback)Structured data extraction (JSON-LD + OpenGraph) via
extract_structured_product_schemaPlaywright fallback for JS-rendered / bot-checked pages, with soft-block (200 OK block page) detection
Centralized error handling via a
@handle_fetch_errorsdecorator (removed repeated try/except blocks)robots.txtcompliance and request throttlingUnit tests
Pin dependency versions in
requirements.txt
License
Not specified — consider adding an open-source license (e.g. MIT).
Related MCP server: Amazon Product Intelligence Agent
Türkçe
Python (FastMCP) ile yazılmış bir Model Context Protocol (MCP) sunucusu. Claude Desktop'ın e-ticaret ürün ve kategori sayfalarındaki ham HTML'i temizleyip yapılandırılmış JSON verisine dönüştürmesini sağlar; bu sayede Claude sunum slaytları, pazar analizi raporları ve rakip ürün karşılaştırmaları üretebilir.
Özellikler
1. extract_product_presentation_data(url: str)
Tek bir ürün sayfasını çeker ve şunları döndürür:
Sayfa başlığı (
<title>)En fazla 6 ürün görseli — önce
og:image/twitter:imagemeta etiketlerinden tespit edilir, bulunamazsa dışlama anahtar kelimeleri (logo, icon, sprite vb.) ve minimum boyut filtresiyle<img>etiketlerine düşülür; tüm URL'lerurljoinile çözümlenirscript,style,header,footer,nav,noscriptetiketleri ayıklanmış, 3 karakterden uzun satırlarla sınırlı, ilk 150 satıra kırpılmış temiz metin
2. extract_structured_product_schema(url: str)
Serbest metin yerine makine tarafından okunabilir yapısal veri çeker:
Tüm
<script type="application/ld+json">bloklarını JSON'a çevirir (bu, Google'ın zengin snippet'ler için kullandığı aynı schema.orgProductverisidir — site sağladığında güvenilir fiyat, stok, marka ve puan alanları verir)Tüm
og:*veproduct:*OpenGraph meta etiketlerini düz bir key-value haritası olarak döndürür
Metin özeti yerine kesin, yapılandırılmış alanlara (fiyat, SKU, stok durumu) ihtiyacın olduğunda kullanışlıdır — çoğu modern e-ticaret platformu (Shopify, Trendyol, WooCommerce vb.) diğer scraping yollarını engellese bile bu veriyi yayınlar.
3. get_category_presentation_data(url: str)
Bir kategori/liste sayfasını çeker ve şunları döndürür:
Sayfa başlığı
hrefiçinde-p-,/product/,/urun/,-pm-veya/p-geçen linklerden, metni 10 karakterden uzun olan ve tekrar etmeyen ilk 8 ürün (isim + tam URL)
Üç tool da hata durumunda {"error": "Hata oluştu: ..."} formatında JSON döndürür, exception fırlatmaz.
Veri Çekme Stratejisi
Her tool ortak, iki aşamalı bir çekme mekanizmasından (_fetch_soup) geçer:
Hızlı yol — düz bir
httpxisteği.Yedek yol — hızlı yol engelleyici bir statü kodu (
403/429/503) döndürürse veya200 OKile birlikte bot-kontrolüne benzeyen bir sayfa dönerse (başlık/gövdede "güvenlik kontrolü", "captcha", "robot değilsiniz" gibi ifadeler ya da şüpheli derecede kısa içerik — bkz._looks_blocked), tool headless Playwright tarayıcısıyla (rastgele viewport,tr-TRdili, gizlenmişnavigator.webdriverbayrağı) tekrar dener.
Bu, çoğu JS-render ve temel bot-tespit durumunu ele almaya yetiyor, ama bir stealth/atlatma araç seti değil — nelerin aşılamadığını aşağıdaki Bilinen Sınırlamalar'da görebilirsin.
Hata yönetimi, üç tool'u da saran tek bir @handle_fetch_errors decorator'ında toplanmıştır — her tool fonksiyonu artık sadece kendi parse mantığını içerir, tekrar eden try/except blokları yoktur. Zaman aşımı, HTTP hataları, bağlantı hataları ve eksik Playwright kurulumu tek bir yerde yakalanır ve tutarlı bir {"error": "..."} JSON yanıtına çevrilir.
Bilinen Sınırlamalar
Son güncellemeyle birlikte bu sunucu artık büyük ölçüde platform-bağımsız:
get_category_presentation_dataiçindeki relative linkler Python'un yerleşikurllib.parse.urljoin(base_url, href)fonksiyonuyla çözümlenir — hangi hedef domain olursa olsun doğru URL üretilir.Ürün görselleri önce
og:image/twitter:imagemeta etiketlerinden tespit edilir (neredeyse tüm e-ticaret sitelerinin kullandığı standart bir yapı), bulunamazsa dışlama anahtar kelimeleri (logo, icon, sprite vb.) ve minimum boyut filtresiyle<img>etiketlerine düşülür — artık tek bir CDN'e bağlı değildir.Ürün linki tespiti, hem Türkiye hem uluslararası e-ticaret platformlarında yaygın olan pattern'leri (
-p-,/product/,/urun/,-pm-,/p-) kapsar.
Kalan sınırlamalar:
Hepsiburada güvenilir şekilde desteklenmiyor. Kurumsal seviyede bot koruması kullanıyor; bu koruma hem düz HTTP isteklerini hem de headless Playwright tarayıcısını (rastgele User-Agent, otomasyon bayrakları kapatılmış,
navigator.webdrivergizlenmiş halde) engelliyor — site her durumda ürün içeriği yerine 200 OK statüsüyle bir "güvenlik kontrolü" sayfası döndürüyor. Bu yazı itibarıyla test edilip doğrulanmıştır; çok daha agresif atlatma teknikleri olmadan değişmesi beklenmiyor — bu proje bilinçli olarak o yönde ilerlemiyor.robots.txtkontrolü veya istekler arası gecikme (rate limiting) yoktur.Henüz her büyük e-ticaret platformunda test edilmedi — alışılmadık sitelerde uç durumlar (edge case) çıkabilir.
Gereksinimler
Python 3.10+
Bağımlılıklar (requirements.txt):
fastmcp
httpx
beautifulsoup4
playwrightKurulumdan sonra Playwright'ın tarayıcı ikilisini bir kereliğine indirin:
playwright install chromiumKurulum
git clone https://github.com/odrdgi-create/ecommerce-insight-mcp.git
cd ecommerce-insight-mcp
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtClaude Desktop Entegrasyonu
Claude Desktop'ın konfigürasyon dosyasına (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json) aşağıdaki bloğu ekleyin:
{
"mcpServers": {
"ecommerce-insight": {
"command": "python",
"args": ["/tam/yol/ecommerce-insight-mcp/ecommerce_mcp.py"]
}
}
}
venvkullanıyorsanız"command"alanına venv içindeki Python'un tam yolunu (örn./tam/yol/ecommerce-insight-mcp/venv/bin/python) yazın.
Dosyayı kaydedip Claude Desktop'ı yeniden başlatın. Araç çubuğunda "E-Commerce HTML Summarizer" sunucusunu görmelisiniz.
Kullanım Örneği
Claude'a şu şekilde bir istekte bulunabilirsiniz:
"Şu ürün sayfasını analiz edip sunum için özetler misin: https://www.trendyol.com/..."
Claude, extract_product_presentation_data tool'unu çağırır ve şuna benzer bir payload alır:
{
"type": "single_product_presentation",
"url": "https://www.trendyol.com/...",
"title": "Ürün Adı",
"product_images": ["https://cdn.dsmcdn.com/..."],
"extracted_content": "Ürün özellikleri, açıklama vb. temiz metin..."
}Kategori sayfası için:
"Bu kategorideki öne çıkan ürünleri karşılaştır: https://www.trendyol.com/..."
{
"type": "category_showcase_presentation",
"category_title": "Kategori Adı",
"category_url": "https://www.trendyol.com/...",
"top_products": [
{"name": "Ürün 1", "url": "https://www.trendyol.com/..."}
]
}Kesin yapısal alanlar için:
"Bu ürünün tam fiyatını ve stok durumunu getir: https://www.trendyol.com/..."
Claude, extract_structured_product_schema tool'unu çağırır ve sitenin ham JSON-LD ile OpenGraph verisini alır, buradan fiyat, para birimi, stok durumu gibi alanları doğrudan okuyabilir.
Proje Yapısı
ecommerce-insight-mcp/
├── ecommerce_mcp.py # MCP sunucu ve üç tool tanımı
├── requirements.txt # Python bağımlılıkları
├── .gitignore
└── README.mdYol Haritası (öneri)
Relative URL tamamlamayı hedef domain'e göre dinamikleştirme (
urljoin)Platform-agnostik görsel tespiti (
og:image+ filtrelenmiş<img>fallback'i)Yapısal veri çıkarma (JSON-LD + OpenGraph) —
extract_structured_product_schemaJS-render'lı / bot-kontrollü sayfalar için Playwright yedek mekanizması, soft-block (200 OK engelleme sayfası) tespitiyle birlikte
@handle_fetch_errorsdecorator'ı ile merkezi hata yönetimi (tekrar eden try/except blokları kaldırıldı)robots.txtkontrolü ve istekler arası gecikmeBirim testleri
requirements.txtiçinde sürüm pinleme
Lisans
MIT eklendi.
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 Servers
- FlicenseBqualityDmaintenanceAn MCP Server for Web scraping and Crawling, built using Crawl4AI224
- FlicenseNot gradedqualityDmaintenanceThis MCP server scrapes Amazon product details and reviews, manages a local JSON database, and visualizes intelligence data through a rich dashboard.
- AlicenseAqualityFmaintenanceAn MCP server that gives AI agents eyes on any e-commerce storefront, enabling scraping, analysis, and comparison through the Model Context Protocol.1499MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the Universal Commerce Protocol (UCP) Discovery and Catalog capabilities, letting you search and compare products across UCP merchants directly from Claude.MIT
Related MCP Connectors
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Zenrows MCP server — Fetch, Extract, Batch, and Browser Sessions for AI coding assistants
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/odrdgi-create/ecommerce-insight-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server