feat: implement webfetch library, CLI, MCP server, and Python bindings#1
Merged
feat: implement webfetch library, CLI, MCP server, and Python bindings#1
Conversation
Implements the webfetch specification with: Library (webfetch crate): - WebFetchRequest/WebFetchResponse types with JSON schema support - HTTP client with async fetch, timeout handling, and partial content - HTML to markdown/text conversion with entity decoding - Tool builder pattern with URL allow/block lists - Comprehensive unit tests CLI (webfetch-cli crate): - Binary name: webfetch - Flags: --url, --method, --as-markdown, --as-text, --user-agent, --llmtxt MCP Server (webfetch-mcp crate): - JSON-RPC 2.0 over stdio - Exposes webfetch tool with proper schemas Python Bindings (webfetch-python crate): - PyO3-based bindings - WebFetchRequest, WebFetchResponse, WebFetchTool classes - Convenience fetch() function CI: - GitHub Actions workflow for check, fmt, clippy, test, build, and docs All tests pass (29 unit tests, 19 integration tests).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- Add `webfetch mcp` subcommand to run MCP server - Add `webfetch fetch` subcommand (optional, --url also works) - Remove separate webfetch-mcp crate - Update CI workflow to remove webfetch-mcp artifact Usage: webfetch --url <URL> # Fetch directly webfetch fetch --url <URL> # Explicit fetch subcommand webfetch mcp # Run MCP server over stdio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What
Implements the webfetch spec (specs/initial.md) including:
Library (webfetch crate):
CLI (webfetch-cli crate):
MCP Server (webfetch-mcp crate):
Python Bindings (webfetch-python crate):
CI:
Why
Implements the spec defined in specs/initial.md to provide a reusable webfetch tool.
How
Risk
Checklist