Skip to content

fix(fetch): make Readability.js extraction opt-in - #4233

Closed
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/fetch-readability-opt-in
Closed

fix(fetch): make Readability.js extraction opt-in#4233
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/fetch-readability-opt-in

Conversation

@he-yufeng

Copy link
Copy Markdown

Summary

  • default mcp-server-fetch HTML extraction to readabilipy's Python parser instead of always enabling Readability.js
  • add --use-readability for operators who explicitly want the Node-backed Readability.js path
  • document the new opt-in and cover both default and opt-in paths in tests

Closes #4199.

To verify

  • uv run pytest -q --basetemp .tmp\pytest -p no:cacheprovider
  • uv run ruff check src tests
  • uv run pyright src tests
  • uv run python -m py_compile src\mcp_server_fetch\server.py src\mcp_server_fetch\__init__.py

@he-yufeng

Copy link
Copy Markdown
Author

Quick follow-up: this still has the fetch package tests/build green and is scoped to making Readability.js extraction opt-in instead of changing plain fetch behavior by default.

Could a maintainer take a look when convenient?

@LuuOW LuuOW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical audit: Verified MCP server implementation for consistency with current SDK patterns.

@he-yufeng

Copy link
Copy Markdown
Author

Folding this into #4281, which covers the same Readability.js-vs-Python issue (#4199). I ended up preferring an automatic fallback when Node isn't available over flipping the default, since it's a smaller behavior change for existing users. Keeping that PR and closing this one to avoid three competing approaches on the same files.

@he-yufeng he-yufeng closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp-server-fetch hard-codes use_readability=True which requires Node.js (undeclared); fails silently when Node is unavailable or misconfigured

2 participants