Skip to content

refactor: remove fetch subcommand, keep only mcp#2

Closed
chaliy wants to merge 3 commits into
mainfrom
claude/implement-spec-tests-ci-n32Cu
Closed

refactor: remove fetch subcommand, keep only mcp#2
chaliy wants to merge 3 commits into
mainfrom
claude/implement-spec-tests-ci-n32Cu

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Jan 14, 2026

Summary

  • Remove the explicit fetch subcommand
  • Simplify CLI to just use top-level flags for fetching

What

Simplify CLI by removing the redundant fetch subcommand. Users can fetch directly with --url flag.

Why

As requested - "No need to have webfetch fetch"

How

Remove the Fetch variant from Commands enum and its associated handling.

Risk

  • Low - This is a simplification

Checklist

  • Unit tests are passed
  • Formatting passes (cargo fmt)
  • Linting passes (cargo clippy)

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).
- 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
Simplify CLI by removing the explicit `fetch` subcommand.
Top-level flags (--url, --method, etc.) handle fetching directly.

Usage:
  webfetch --url <URL>  # Fetch directly
  webfetch mcp          # Run MCP server
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chaliy chaliy closed this Jan 26, 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.

2 participants