Repository navigation
Conversation
3c736c0 to
77e23fe
Compare
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Verified MCP server implementation for consistency with current SDK patterns.
Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>
77e23fe to
5c3d999
Compare
|
extract_content_from_html still lacks a python-only fallback on main, so the failure path this fixes is still live. Any chance of getting eyes on this? |
…-python-fallback Re-express the readability fallback over main's SSRF-guard rework: allow_private_ips and use_readability_js now thread side by side through serve/fetch_url, the CLI gains --no-readability-js next to --allow-private-ips, and the characterization tests moved onto the in-process harness (MockTransport + FakeWeb) with the forwarding pinned through serve(use_readability_js=False).
|
|
Thank you for this pull request, and apologies for the long wait for a response. Since it was opened, the reference servers have been rebuilt for the 2026-07-28 MCP specification (#4857) and released as v2, so this diff no longer applies to the code as it stands. This repository also now accepts issues, not pull requests, from anyone but its maintainers: design and implementation are done by the maintainers through a prompt-driven workflow, so outside PRs are closed rather than reviewed. The policy is in This is not a judgment on the change or on you. The problem it addresses still applies to v2 and is tracked in #4199, which links back to this PR as a prototype and credits you. Please add anything further there. This is part of the backlog triage in #4875. |
Fixes #4199.
Summary
mcp-server-fetchalways called readabilipy withuse_readability=True. That path shells out through Node.js, but the server is installed and documented as a Python package. If Node is missing or the Node readability path is slow/misconfigured, HTML fetches can hang until the MCP client times out.This patch keeps the stronger Node.js readability path when
nodeis available, but avoids making it an undeclared hard runtime requirement:nodebefore choosing the readability backend--no-readability-jsfor hosts that have Node installed but want the Python-only backendValidation
python -m py_compile src/fetch/src/mcp_server_fetch/server.py src/fetch/tests/test_server.pysrc/fetch/.venv/Scripts/python.exe -m pip install -e src/fetchsrc/fetch/.venv/Scripts/python.exe -m pytest tests -qfromsrc/fetchsrc/fetch/.venv/Scripts/python.exe -m py_compile src/mcp_server_fetch/server.py tests/test_server.pyfromsrc/fetchsrc/fetch/.venv/Scripts/python.exe -m ruff check src/mcp_server_fetch/server.py tests/test_server.pyfromsrc/fetchgit diff --check origin/main..HEAD