webfetch
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**The license-first image layer for AI agents and humans.**
One MCP server, one CLI, and one HTTP server that federate across 25 image
providers, rank results license-first, and reject UNKNOWN results by default.
Any agent that speaks MCP (Claude Code, Cursor, Cline,
Continue, Roo Code, Codex) wires up from one config line. Landing page,
pricing, and hosted usage live at **getwebfetch.com**.
Install
| Surface | One-liner |
| ------------- | --------- |
| npm | npm i -g getwebfetch |
| Homebrew | brew tap ashlrai/webfetch && brew install webfetch |
| Docker | docker run --rm ghcr.io/ashlrai/webfetch cli help |
| curl \| bash | curl -fsSL https://raw.githubusercontent.com/ashlrai/webfetch/main/install/install.sh \| bash |
The curl | bash installer also wires webfetch into Claude Code's
~/.claude/settings.json idempotently. Re-run any time to update.
Surfaces
| Surface | Best for | Entry point |
| ------- | -------- | ----------- |
| CLI | scripts, shell work, agent handoff | webfetch search ... |
| MCP server | Claude Code, Cursor, Cline, Continue, Roo Code, Codex | npx -y getwebfetch-mcp |
| HTTP server | local integrations and extensions | npx -y webfetch-server |
| Core library | TypeScript apps and custom tooling | npm i webfetch-core |
| Browser layer | fallback extraction and managed-browser flows | npm i webfetch-browser |
| Hosted cloud | pooled keys, usage tracking, team controls | app.getwebfetch.com |
Package-level API notes live in packages/core/README.md,
packages/browser/README.md, and the other
package READMEs under packages/.
30-second usage
CLI:
MCP (from inside any MCP-speaking agent):
TypeScript library:
What problem this solves
Manually sourcing an image has four failure modes:
1. **You don't know the license**, so you can't safely ship the result.
2. **You can't script it** — every new site means another afternoon.
3. **Google's Image Search API is retired**; scraping is brittle and ToS-grey.
4. **No shared cache** — you re-download the same file dozens of times.
webfetch fixes all four by federating across direct-source APIs that have
stable terms and structured license metadata, ranking candidates
license-first, and exposing the result as a single MCP tool.
Providers
| Provider | Covers | License default | Auth | Opt-in |
| ---------------- | ---------------------------------------- | -------------------- | ---------------------------- | ------ |
| wikimedia | portraits, events, logos, history | CC_BY_SA (metadata) | — | no |
| openverse | any CC-licensed content | CC_BY (metadata) | — | no |
| unsplash | high-quality photography | UNSPLASH_LICENSE | UNSPLASH_ACCESS_KEY | no |
| pexels | stock photography | PEXELS_LICENSE | PEXELS_API_KEY | no |
| pixabay | stock photos + illustrations | PIXABAY_LICENSE | PIXABAY_API_KEY | no |
| itunes | album covers, artist portraits | EDITORIAL_LICENSED | — | no |
| musicbrainz-caa | canonical album art | EDITORIAL_LICENSED | — | no |
| spotify | artist + album images | EDITORIAL_LICENSED | SPOTIFY_CLIENT_ID/SECRET | no |
| youtube-thumb | video thumbnails | EDITORIAL_LICENSED | — | yes |
| brave | general web image search | UNKNOWN (+heuristic) | BRAVE_API_KEY | no |
| bing | general web image search | UNKNOWN (+heuristic) | BING_API_KEY | yes |
| serpapi | Google Images + reverse lookup | UNKNOWN (+heuristic) | SERPAPI_KEY | yes |
| browser | headless fallback vs images.google.com | UNKNOWN | — | yes |
| managed-browser | Bright Data managed browser fallback | UNKNOWN | BRIGHTDATA_API_TOKEN | yes |