An MCP server for silkworm, a web scraping framework. Provides tools for fetching pages, inspecting HTML structure, testing selectors, running crawls, and generating spider code.
silkworm-mcp provides 20 tools with complete input schemas and descriptions for all parameters. Naming follows verb_noun convention (store_html_document, query_selector, etc.). However, descriptions are often generic and lack LLM-optimized guidance on WHEN to use each tool vs. alternatives. Output schemas are not documented in the source. Error handling is minimal, most tools lack recovery guidance or actionable error messages. Tool composition is reasonable but some tools conflate multiple concerns (e.g., query_selector accepts both CSS and XPath, forcing LLMs to reason about mode selection). Parameter descriptions are present but often lack constraints, ranges, or format specifications. No tool annotations (readOnlyHint, destructiveHint) despite clear risk classifications in the spec.
Analyze CSS selectors in a document's stylesheets and their matching elements.
Clear every cached document from the in-memory store.
Compare multiple CSS or XPath selectors against a document.
Delete a cached document handle.
Extract links from a document using CSS or XPath selectors.
Find CSS and XPath selectors that match text content in a document.
Generate a regular expression from sample strings using grex.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk classifications. Tools like clear_documents and delete_document are marked DESTRUCTIVE but lack schema hints to guide agent behavior.
Output schemas not documented. Tool descriptions state what they return (e.g., 'return a scraper_rs summary') but the actual response structure is not visible in the source. LLMs cannot plan downstream calls without knowing output fields.
query_selector and compare_selectors accept both CSS and XPath via separate parameters, forcing LLMs to reason about mode selection. Should split into separate tools (query_selector_css, query_selector_xpath) or use a mode enum with clearer guidance.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | <=2025-11-25 | v2 |
Generate starter spider code from a CrawlBlueprint.
Build a high-level summary for stored HTML or an inline HTML snippet.
List cached documents that can be reused by handle in later tool calls.
Parse HTML into a tree structure for structural analysis.
Parse an HTML fragment (not a full document) into a tree structure.
Return prettified HTML for visual inspection.
Query a document with CSS or XPath selectors and return matching elements.
Run a configurable silkworm spider without writing code, useful for validating a scraping plan.
Return runtime status, cache metrics, and optional CDP readiness information.
Fetch a URL using silkworm's HTTP client and optionally store the result.
Fetch a URL using a Chrome DevTools Protocol browser session for JavaScript rendering.
Store raw HTML in the server's in-memory document cache and return a scraper_rs summary.
Validate generated or user-provided spider code for syntax and structure errors.
Parameter descriptions lack constraints and ranges. E.g., max_size_bytes, max_matches, max_links have no documented min/max bounds. Unbounded numeric parameters let LLMs pass absurd values.
Error handling is minimal. No recovery guidance in tool descriptions. E.g., if silkworm_fetch fails with a timeout, the description does not suggest retry or timeout_seconds adjustment. Agents cannot self-correct.