MCP server for web scraping using Camoufox stealth browser with XPath selector generation and scraper template writing
This server has significant definition quality issues across all dimensions. All 4 tools are explicitly registered via @mcp.tool() decorators in xpath_server.py, but definitions are severely incomplete. Tool names lack action verbs (3 of 4 start with verbs, but naming is inconsistent). Descriptions exist but are vague and lack actionable context. Input schemas are present with type information but parameter descriptions are minimal or absent. Output schemas are either missing or returned as unstructured dicts. Error handling is ad-hoc with no recovery guidance. The server appears designed to delegate core logic to an LLM (Cursor) rather than implement tool behaviors, which violates the principle that tools should be self-contained and executable.
Fetch page HTML using Camoufox stealth browser.Save the HTML code in the PATH specified.
Write XPATH selectors for the requested fields using the downloaded HTML file.
Removes style tags, CSS emotion attributes, and CSS class references from HTML file and saves cleaned version to output file
Reads file Camoufox_template.py and uses it to write a new Camoufox scraper with the requested fields and starting from the url. Save the HTML code in the PATH specified.
Vague, incomplete tool descriptions that do not guide LLM selection. generate_xpaths description ('Write XPATH selectors for the requested fields using the downloaded HTML file') fails to explain WHAT it returns, WHEN to use it, or dependencies. Description is only 12 words; baseline A+ tools average 194 chars.
Missing or minimal parameter descriptions. The 'template' parameter in generate_xpaths and write_camoufox_scraper has no description explaining valid values ('plp' vs 'pdp'). LLMs cannot infer parameter meaning from names alone.
Output schemas are undocumented and inconsistent. generate_xpaths returns a dict with 'message' and 'requested_fields' keys, no schema declaration. write_camoufox_scraper returns {'message': ...} with no declared structure. strip_css returns a malformed set ('{f"...'}') instead of a dict. LLMs cannot plan downstream calls without knowing what fields are returned.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 39 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 25 | - | v1 |
Tools delegate execution logic to the LLM rather than being self-contained. generate_xpaths returns a message asking Cursor to 'Print the XPath expressions using the variable latest_html', the tool doesn't generate XPaths, it asks the LLM to do it. write_camoufox_scraper similarly returns 'Using this template, write a working scraper', again, delegation rather than execution. This violates the tool composition principle: tools must be standalone executors, not workflow orchestrators.
Error handling is absent or non-actionable. generate_xpaths returns {'error': '...'} but does not suggest what the LLM should do next (e.g., 'Call fetch_page_content() first to generate HTML'). fetch_page_content catches exceptions but returns generic 'Error fetching page: ...' with no recovery path. Agents need to know: is this retryable? Should I ask the user? Or is it fatal?
Parameter constraints not declared as enums. Both generate_xpaths and write_camoufox_scraper accept 'template' with values 'plp' or 'pdp', but these are free-form strings with only informal description. No enum constraint forces LLMs to guess valid options. Baseline best practice: declare enums for constrained inputs.
Global state management and undocumented dependencies. fetch_page_content sets a global 'latest_html' variable that generate_xpaths and write_camoufox_scraper depend on. This coupling is fragile, not declared in parameter descriptions, and breaks tool idempotency. Tools should be stateless; dependencies should be explicit parameters.
Hardcoded file paths and undefined constants. CAMOUFOX_FILE_PATH points to '/PATH/TO/camoufox_template.py' and HTML_FILE_PATH is referenced but not defined. This makes the server non-functional without manual configuration. Configuration should be environment-based or passed via parameters.
No pagination or result limiting. fetch_page_content writes unbounded HTML files. No indication of file size limits, timeouts, or truncation. Large pages could exhaust resources or context windows. Tools returning bulk data must support limits and pagination.
Async/await without proper timeout or cancellation. fetch_page_content uses AsyncCamoufox but has no timeout guard. A slow or hung page load could block indefinitely. Tools calling external services must set explicit timeouts.