scrapedatshi-mcp
v0.6.11MCP server for the scrapedatshi RAG pipeline API — use scrapedatshi tools directly from Claude Desktop
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
verify_provider_key
Verify an LLM or embedding API key and return the live list of models available for that key. Call this BEFORE any operation that requires an LLM or embedding provider — never assume or hardcode model names. Returns: key validity, list of available model names (live from the provider's API), and an error message if the key is invalid. Supported LLM providers: openai, anthropic, gemini Supported embedding providers: openai, cohere, gemini, mistral, voyage The API key can be omitted if the corresponding env var is set (OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, COHERE_API_KEY, MISTR…
| Parameter | Type | Description |
|---|---|---|
provider * | string | Provider to verify. LLM: 'openai', 'anthropic', 'gemini'. Embedding: 'openai', 'cohere', 'gemini', 'mistral', 'voyage'. |
provider_type * | string | 'llm' for text generation models (used in extract_data, extract_crawl, contextual_retrieval). 'embedding' for vector embedding models (used in sync_to_vectordb). |
api_key | string | The API key to verify. Can be omitted if the corresponding env var is set. |
get_usage_guide
Returns the complete guided workflow for using scrapedatshi tools. Call this at the start of any scrapedatshi conversation to understand which tool to use for each task and the required pre-flight sequence.
scrape_url
Scrape a single web URL and return the full page content as clean Markdown. No chunking — returns the raw text in one piece. No embedding or vector DB required. Use this when the user wants to read, summarize, or display a page's content directly — without splitting it into chunks. For RAG/embedding use cases where you need the content split into segments, use chunk_url instead. The response includes selectors_found — a list of CSS selectors for the main content sections detected on the page (e.g. ['article', '#main-content']). Use one to re-scrape just that section via the selector= p…
| Parameter | Type | Description |
|---|---|---|
url * | string | The web URL to scrape. |
cookies | object | Optional dict of cookies to include with the request for authenticated scraping (e.g. {"session": "abc123", "auth_token": "xyz"}). Only used in local-fetch mode (default). Never forwarded to the serve… |
headers | object | Optional dict of additional HTTP request headers (e.g. {"Authorization": "Bearer eyJ..."}). Only used in local-fetch mode (default). Never forwarded to the server. |
js_render | boolean | Use headless Chromium to render JavaScript before scraping. Required for SPAs and JS-heavy pages. Ask the user before enabling. Adds a small surcharge. |
selector | string | Optional CSS selector to target a specific element (e.g. 'article', '.content', 'main'). |
storage_state | object | Optional Playwright storage state dict for enterprise SSO/MFA authenticated scraping. Captured locally using capture_session() from scrapedatshi[auth] — opens a real browser, user logs in manually,… |
chunk_url
Scrape a single web URL, chunk its content into RAG-ready text segments, and return the structured chunks. No embedding or vector DB required — this is the fastest and cheapest operation for RAG pipelines. Use this when the user wants the content of a web page split into chunks for embedding, retrieval, or RAG — NOT when they just want to read or summarize the page (use scrape_url for that). HIERARCHICAL CHUNKING (hierarchical=true): Produces small child chunks (~child_chunk_size tokens) for precise vector matching, each carrying a larger parent chunk (~chunk_size tokens) as metadata. Wh…
| Parameter | Type | Description |
|---|---|---|
url * | string | The web URL to scrape and chunk. |
child_chunk_size | integer | Target token count for child (search) chunks when hierarchical=true. Parent chunks use chunk_size. Default: 128. |
chunk_size | integer | Target token count per chunk. Default: 512. Range: 64–4096. |
contextual_retrieval | boolean | Enable RAG 2.0 contextual enrichment. An LLM generates a unique context string for each chunk, boosting retrieval accuracy by 35–50%. Present this as a recommended upgrade. Requires llm_provider and… |
cookies | object | Optional dict of cookies to include with the request for authenticated scraping (e.g. {"session": "abc123", "auth_token": "xyz"}). Only used in local-fetch mode (default). Never forwarded to the serve… |
headers | object | Optional dict of additional HTTP request headers (e.g. {"Authorization": "Bearer eyJ..."}). Only used in local-fetch mode (default). Never forwarded to the server. |
hierarchical | boolean | Enable hierarchical (parent-child) chunking. Small child chunks (~child_chunk_size tokens) are embedded for precise vector matching; the larger parent chunk (~chunk_size tokens) is stored as metadata… |
js_render | boolean | Use headless Chromium to render JavaScript before scraping. Required for SPAs and JS-heavy pages. Ask the user before enabling. Adds a small surcharge. |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name. MUST be chosen from the list returned by verify_provider_key — do not guess or hardcode. |
llm_provider | string | LLM provider for contextual retrieval. One of: 'openai', 'anthropic', 'gemini'. Verify with verify_provider_key first. |
overlap | integer | Token overlap between consecutive chunks. Default: 50. |
selector | string | Optional CSS selector to target a specific element (e.g. 'article', '.content', 'main'). |
storage_state | object | Optional Playwright storage state dict for enterprise SSO/MFA authenticated scraping. Captured locally using capture_session() from scrapedatshi[auth] — opens a real browser, user logs in manually,… |
crawl_site
Crawl an entire website, chunk all pages, and return structured JSON chunks. Two modes: 'sitemap' (reads sitemap.xml — best for docs/blogs) and 'spider' (follows links — works on any site). Use this when the user wants chunks from MULTIPLE pages WITHOUT extracting structured fields. For structured field extraction across pages, use extract_crawl. ⚠️ ALWAYS confirm the max_pages limit with the user before calling. Default is 10 pages. For large sites, warn about credit usage first. If contextual_retrieval is requested, follow the PRE-FLIGHT sequence: 1. Call verify_provider_key(provi…
| Parameter | Type | Description |
|---|---|---|
url * | string | The root domain or sitemap URL to crawl. |
allow_subdomains | boolean | If true, also crawl subdomains of the root domain (e.g. wiki.company.com when root is company.com). Cookies and headers are shared across all subdomains within scope. Multi-part TLDs (.co.uk, .com.br)… |
contextual_retrieval | boolean | Enable RAG 2.0 contextual enrichment. Present as a recommended upgrade. Requires llm_provider and llm_model from verify_provider_key. |
cookies | object | Optional dict of cookies for authenticated crawling (e.g. {"session": "abc123"}). Only sent to URLs within the permitted domain scope — never leaked to external domains. Only used in local-fetch mod… |
crawl_mode | string | 'sitemap': reads sitemap.xml (best for docs/blogs). 'spider': follows links from root URL (works on any site). |
exclude_pattern | string | Skip URLs containing this substring (e.g. '/blog/'). |
headers | object | Optional dict of additional HTTP request headers (e.g. {"Authorization": "Bearer eyJ..."}). Same domain-isolation rules apply as cookies. Only used in local-fetch mode (default). |
include_pattern | string | Only crawl URLs containing this substring (e.g. '/docs/'). |
js_render | boolean | Use headless browser to render JS before scraping each page. Ask the user before enabling. Adds surcharge per page. |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name from verify_provider_key. Do not guess or hardcode. |
llm_provider | string | LLM provider for contextual retrieval. Verify with verify_provider_key first. |
max_pages | integer | Maximum pages to crawl. Default: 10. Maximum: 200. Always confirm with user for large sites. |
selector | string | Optional CSS selector applied to every crawled page. |
storage_state | object | Optional Playwright storage state dict for enterprise SSO/MFA authenticated crawling. Captured locally using capture_session() from scrapedatshi[auth] — opens a real browser, user logs in manually,… |
extract_data
Scrape a URL and extract structured data matching a user-defined schema using an LLM. Returns a JSON object (or array if extract_as_list=true). Use this when the user wants specific FIELDS from a page (e.g. product name, price, stock status; article author, date, summary). PRE-FLIGHT REQUIRED — before calling: 1. Call verify_provider_key(provider, 'llm') → get live model list 2. Present models to user, ask them to choose one 3. Ask: 'Is this a JavaScript-heavy page or SPA?' → js_render 4. Present Contextual Retrieval is NOT applicable here (extraction only) LLM keys can be omitted if…
| Parameter | Type | Description |
|---|---|---|
llm_provider * | string | LLM provider. One of: 'openai', 'anthropic', 'gemini'. Call verify_provider_key first. |
schema * | object | Dict mapping field names to description strings. Example: {"title": "string — the product name", "price": "number — price in USD", "in_stock": "boolean — whether in stock"} |
url * | string | The web URL to scrape and extract structured data from. |
click_selector | string | CSS selector for an element to click after page load (tabs, accordions, load-more). Only used when js_render=true. |
extract_as_list | boolean | If true, extracts ALL matching items on the page as a JSON array. Use for listing pages (product catalogues, article feeds). |
js_render | boolean | Use headless browser to render JS before extracting. Ask the user before enabling. |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name from verify_provider_key. Do not guess or hardcode. Use an advanced model (not mini/flash/haiku) for long-form pages like documentation or legal docs. |
selector | string | Optional CSS selector to target a specific section before extraction. |
extract_crawl
Crawl a domain and extract structured data from every page using your LLM. Each page is processed independently — failed pages return an error without aborting the batch. Only successfully extracted pages are billed. Use this when the user wants structured FIELDS from MULTIPLE pages (e.g. extract title + price from every product page on a site). ⚠️ Each page takes 5–15 seconds. Default is 5 pages. For more than 20 pages, warn the user about wait times and credit usage before proceeding. PRE-FLIGHT REQUIRED — before calling: 1. Call verify_provider_key(provider, 'llm') → get live…
| Parameter | Type | Description |
|---|---|---|
llm_provider * | string | LLM provider. One of: 'openai', 'anthropic', 'gemini'. Call verify_provider_key first. |
schema * | object | Dict mapping field names to description strings. Example: {"title": "string — the product name", "price": "number — price in USD"} |
url * | string | The root domain to crawl. |
crawl_mode | string | 'sitemap': reads sitemap.xml. 'spider': follows links from root URL. |
exclude_pattern | string | Skip URLs containing this substring (e.g. '/blog/'). |
extract_as_list | boolean | If true, extracts ALL matching items on each page as a JSON array. |
include_pattern | string | Only crawl URLs containing this substring (e.g. '/products/'). |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name from verify_provider_key. Do not guess or hardcode. Advanced models (not mini/flash/haiku) use 30k char context — better for long pages. |
llm_rpm | integer | Optional rate limit in requests-per-minute for LLM calls. Use this to avoid hitting provider rate limits — e.g. 10 for Gemini free/Tier-1, 60 for OpenAI Tier-1. When omitted the server uses a short… |
max_pages | integer | Maximum pages to crawl and extract. Default: 5. Maximum: 50. Always confirm with user before setting above 20. |
selector | string | Optional CSS selector applied to every page before extraction. |
sync_to_vectordb
Full RAG pipeline: scrape a URL, embed the chunks using your embedding provider, and inject the vectors into your vector database — all in one call. Use this when the user wants to ADD web content to their vector DB for later retrieval. The user brings their own embedding provider and vector DB. PRE-FLIGHT REQUIRED — before calling: 1. Call verify_provider_key(embedding_provider, 'embedding') → get live embedding model list 2. Present models to user, ask them to choose one 3. Call list_vector_db_providers if user is unsure what config fields are needed 4. Ask: 'Is this a JavaScript-hea…
| Parameter | Type | Description |
|---|---|---|
embedding_provider * | string | Embedding provider. Call verify_provider_key(provider, 'embedding') first to get available models. |
url * | string | The web URL to scrape, embed, and inject into the vector DB. |
vector_db * | string | Vector DB provider. Call list_vector_db_providers to see required config fields for each. |
vector_db_config * | object | Provider-specific config. Call list_vector_db_providers for required fields. API keys within this config can be omitted if set as env vars. Examples: pinecone: {"index_host": "https://my-index.svc.pin… |
chunk_size | integer | Target token count per chunk. Default: 512. |
contextual_retrieval | boolean | Enable RAG 2.0 contextual enrichment before embedding. Present as a recommended upgrade. Requires llm_provider and llm_model. |
embedding_api_key | string | API key for the embedding provider. Can be omitted if set as env var. |
embedding_endpoint | string | Public HTTPS endpoint for Ollama only (e.g. from ngrok). Not needed for cloud providers. |
embedding_model | string | Embedding model name from verify_provider_key. Do not guess or hardcode. |
js_render | boolean | Use headless browser to render JS before scraping. Ask the user before enabling. |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name from verify_provider_key. Do not guess or hardcode. |
llm_provider | string | LLM provider for contextual retrieval. Verify with verify_provider_key(provider, 'llm') first. |
overlap | integer | Token overlap between consecutive chunks. Default: 50. |
selector | string | Optional CSS selector to target a specific page section. |
chunk_file
Parse a local file and chunk its content into RAG-ready text segments. Returns structured JSON chunks. No embedding or vector DB required. Supported file formats: .pdf, .md, .txt, .yaml, .yml, .json, .csv, .xlsx, .xls, .docx, .ipynb, .html, .htm, .xml, .toml, .ini, .cfg, and all common code files (.py, .js, .ts, .jsx, .tsx, .sql, .go, .rb, .java, .cs, .cpp, .c, .rs, .php, .sh, .bash, .zsh, .r, .swift, .kt, .scala) Maximum file size: 50 MB CODE-AWARE CHUNKING: .py files are split by top-level class and function using Python's AST parser — each class/function becomes its own chunk with impor…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Absolute path to the local file to chunk. Supported: .pdf, .md, .txt, .yaml, .yml, .json, .csv, .xlsx, .xls, .docx, .ipynb, .html, .htm, .xml, .toml, .ini, .cfg, .py (AST-aware: split by class/functio… |
chunk_size | integer | Target token count per chunk. Default: 512. Range: 64–4096. |
contextual_retrieval | boolean | Enable RAG 2.0 contextual enrichment. Present as a recommended upgrade. Requires llm_provider and llm_model from verify_provider_key. |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name from verify_provider_key. Do not guess or hardcode. |
llm_provider | string | LLM provider for contextual retrieval. Verify with verify_provider_key first. |
overlap | integer | Token overlap between consecutive chunks. Default: 50. |
ingest_file
Full RAG pipeline for local files: upload a file, embed the chunks using your embedding provider, and inject the vectors into your vector database. Supported file formats: .pdf, .md, .txt, .yaml, .yml, .json, .csv, .xlsx, .xls, .docx, .ipynb, .html, .htm, .xml, .toml, .ini, .cfg, and all common code files (.py, .js, .ts, .jsx, .tsx, .sql, .go, .rb, .java, .cs, .cpp, .c, .rs, .php, .sh, .bash, .zsh, .r, .swift, .kt, .scala) Maximum file size: 50 MB Use this when the user wants to ADD a local document (PDF, markdown, etc.) to their vector DB. This is the file-based equivalent of sync_to_vector…
| Parameter | Type | Description |
|---|---|---|
embedding_provider * | string | Embedding provider. Call verify_provider_key(provider, 'embedding') first to get available models. |
file_path * | string | Absolute path to the local file to ingest. Supported: .pdf, .md, .txt, .yaml, .yml, .json. Example: 'C:/Users/user/Documents/report.pdf' |
vector_db * | string | Vector DB provider. Call list_vector_db_providers to see required config fields for each. |
vector_db_config * | object | Provider-specific config. Call list_vector_db_providers for required fields. API keys within this config can be omitted if set as env vars. |
chunk_size | integer | Target token count per chunk. Default: 512. |
contextual_retrieval | boolean | Enable RAG 2.0 contextual enrichment before embedding. Present as a recommended upgrade. Requires llm_provider and llm_model. |
embedding_api_key | string | API key for the embedding provider. Can be omitted if set as env var. |
embedding_endpoint | string | Public HTTPS endpoint for Ollama only (e.g. from ngrok). Not needed for cloud providers. |
embedding_model | string | Embedding model name from verify_provider_key. Do not guess or hardcode. |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name from verify_provider_key. Do not guess or hardcode. |
llm_provider | string | LLM provider for contextual retrieval. Verify with verify_provider_key(provider, 'llm') first. |
overlap | integer | Token overlap between consecutive chunks. Default: 50. |
autorag
Full AutoRAG pipeline: crawl an entire domain, chunk every page, embed all chunks, and inject into your vector database — all in a single call. Use this when the user wants to bulk-ingest an entire website into their vector DB. This combines crawl_site + sync_to_vectordb into one operation. ⚠️ ALWAYS confirm the max_pages limit with the user before calling. Default is 5 pages. Each page is fetched, chunked, embedded, and injected. For large sites, warn about credit usage and wait times first. PRE-FLIGHT REQUIRED — before calling: 1. Call verify_provider_key(embedding_provider, 'embe…
| Parameter | Type | Description |
|---|---|---|
embedding_provider * | string | Embedding provider. Call verify_provider_key(provider, 'embedding') first to get available models. |
url * | string | The root domain to crawl (e.g. 'https://docs.example.com'). |
vector_db * | string | Vector DB provider. Call list_vector_db_providers to see required config fields for each. |
vector_db_config * | object | Provider-specific config. Call list_vector_db_providers for required fields. API keys within this config can be omitted if set as env vars. |
chunk_size | integer | Target token count per chunk. Default: 512. |
contextual_retrieval | boolean | Enable RAG 2.0 contextual enrichment before embedding. Present as a recommended upgrade. Requires llm_provider and llm_model. |
crawl_mode | string | 'sitemap': reads sitemap.xml (best for docs/blogs). 'spider': follows links from root URL (works on any site). |
embedding_api_key | string | API key for the embedding provider. Can be omitted if set as env var. |
embedding_model | string | Embedding model name from verify_provider_key. Do not guess or hardcode. |
exclude_pattern | string | Skip URLs containing this substring (e.g. '/blog/'). |
include_pattern | string | Only crawl URLs containing this substring (e.g. '/docs/'). |
llm_api_key | string | API key for the LLM provider. Can be omitted if set as env var. |
llm_model | string | LLM model name from verify_provider_key. Do not guess or hardcode. |
llm_provider | string | LLM provider for contextual retrieval. Verify with verify_provider_key(provider, 'llm') first. |
max_pages | integer | Maximum pages to crawl and inject. Default: 5. Maximum: 200. Always confirm with user for large sites. |
overlap | integer | Token overlap between consecutive chunks. Default: 50. |
selector | string | Optional CSS selector applied to every page before chunking. |
ingest_scraped
Bulk ingest a folder of pre-scraped files — chunk, embed, and inject into your vector database. Designed for users who have content from external scrapers (Scrapy, Playwright, wget, etc.) and want to embed it into their vector DB. Supports all common file types: .md, .txt, .json, .yaml, .yml, .csv, .xlsx, .xls, .docx, .ipynb, .html, .htm, .xml, .toml, .ini, .cfg, and all code files (.py, .js, .ts, .sql, .go, .rb, .java, .cs, .cpp, .c, .rs, .php, .sh, etc.). CODE-AWARE CHUNKING: .py files are split by top-level class and function (AST-aware). .sql files are split by statement block (CREATE…
| Parameter | Type | Description |
|---|---|---|
embedding_provider * | string | Embedding provider. Call verify_provider_key(provider, 'embedding') first to get available models. |
folder_path * | string | Absolute path to the folder containing files to ingest. Example: 'C:/Users/user/scrapy_output/' or '/home/user/data/' |
vector_db * | string | Vector DB provider. Call list_vector_db_providers to see required config fields for each. |
vector_db_config * | object | Provider-specific config. Call list_vector_db_providers for required fields. API keys within this config can be omitted if set as env vars. |
batch_delay | number | Seconds to wait between files (default: 0.5). Increase to 1.0–2.0 for large batches to avoid embedding provider rate limits. |
embedding_api_key | string | API key for the embedding provider. Can be omitted if set as env var. |
embedding_model | string | Embedding model name from verify_provider_key. Do not guess or hardcode. |
file_extensions | array | File extensions to process. Default: ['.md', '.txt', '.json', '.yaml', '.yml']. Example: ['.json'] to process only JSON files. |
json_text_keys | array | Keys to look for when extracting text from JSON items. Default: ['text', 'content', 'html', 'body', 'markdown', 'description']. Used for Scrapy/crawler JSON array exports. |
max_files | integer | Maximum number of files to process. Default: unlimited. Confirm with user for large datasets. |
recursive | boolean | If true, recurse into subdirectories. Default: true. |
pdf_extract
Extract clean text or structured tables from a PDF — by URL or local file path. Use this when the user wants to read, summarize, or process a PDF document without chunking or embedding it. For RAG use cases where you need the PDF split into segments, use chunk_url (for PDF URLs) or chunk_file (for local PDFs). Billing: - File upload: $0.0020 per request - URL fetch: $0.0040 per request (server fetches the PDF) No pre-flight required — no LLM or embedding key needed. Provide exactly ONE of: url (direct PDF URL) or file_path (absolute local path).
| Parameter | Type | Description |
|---|---|---|
file_path | string | Absolute path to a local .pdf file on the user's machine. Example: 'C:/Users/user/Documents/report.pdf' or '/home/user/docs/manual.pdf'. Billed at $0.0020. |
mode | string | 'text' (default) — returns the full PDF content as clean Markdown text. 'tables' — returns structured table data as a JSON array. Use 'tables' when the user specifically wants table data extracted… |
preserve_headings | boolean | When mode='text', attempt to preserve heading structure from the PDF. Default: true. |
url | string | Direct URL to a PDF file (e.g. S3 link, CDN URL, https://.../report.pdf). The server fetches and extracts the PDF. Billed at $0.0040. |
list_embedding_providers
Returns all supported embedding providers with labels and notes. Call this to help the user choose an embedding provider before sync_to_vectordb. After the user chooses, call verify_provider_key to get the live model list.
list_vector_db_providers
Returns all supported vector database providers with required config fields, optional fields, and setup notes. Call this before sync_to_vectordb to help the user understand what vector_db_config fields they need to provide.