webfetch

Registre officiel Recherche et web

License-first federated image search with attribution, dimensions, and download tooling.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package getwebfetch-mcp
Claude Code
claude mcp add webfetch -e 'UNSPLASH_ACCESS_KEY=<your unsplash_access_key>' -e 'PEXELS_API_KEY=<your pexels_api_key>' -e 'PIXABAY_API_KEY=<your pixabay_api_key>' -e 'BRAVE_API_KEY=<your brave_api_key>' -e 'SERPAPI_KEY=<your serpapi_key>' -- npx -y getwebfetch-mcp@0.1.5
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "webfetch": {
            "command": "npx",
            "args": [
                "-y",
                "getwebfetch-mcp@0.1.5"
            ],
            "env": {
                "UNSPLASH_ACCESS_KEY": "<your unsplash_access_key>",
                "PEXELS_API_KEY": "<your pexels_api_key>",
                "PIXABAY_API_KEY": "<your pixabay_api_key>",
                "BRAVE_API_KEY": "<your brave_api_key>",
                "SERPAPI_KEY": "<your serpapi_key>"
            }
        }
    }
}

Variables d'environnement

  • UNSPLASH_ACCESS_KEY secret Optional Unsplash API key for Unsplash provider results.
  • PEXELS_API_KEY secret Optional Pexels API key for Pexels provider results.
  • PIXABAY_API_KEY secret Optional Pixabay API key for Pixabay provider results.
  • BRAVE_API_KEY secret Optional Brave Search API key for Brave image search results.
  • SERPAPI_KEY secret Optional SerpApi key for Google Images results.

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. webfetch
  2. Install
  3. Surfaces
  4. 30-second usage
  5. What problem this solves
  6. Providers
  7. Local and cloud modes
  8. Why license-first
  9. webfetch vs alternatives
  10. Architecture
  11. Safety defaults
  12. Roadmap
  13. Contributing
  14. License

webfetch

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

SurfaceOne-liner
npmnpm i -g getwebfetch
Homebrewbrew tap ashlrai/webfetch && brew install webfetch
Dockerdocker 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

SurfaceBest forEntry point
CLIscripts, shell work, agent handoffwebfetch search ...
MCP serverClaude Code, Cursor, Cline, Continue, Roo Code, Codexnpx -y getwebfetch-mcp
HTTP serverlocal integrations and extensionsnpx -y webfetch-server
Core libraryTypeScript apps and custom toolingnpm i webfetch-core
Browser layerfallback extraction and managed-browser flowsnpm i webfetch-browser
Hosted cloudpooled keys, usage tracking, team controlsapp.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:

webfetch search "drake portrait" --limit 5
webfetch artist "Taylor Swift" --kind portrait --min-width 1200
webfetch download <url> --out ./portrait.jpg
printf "drake portrait\nradiohead album\n" | webfetch batch --jsonl --continue-on-error

MCP (from inside any MCP-speaking agent):

search_images({ query: "drake portrait", limit: 5 })
search_artist_images({ artist: "Taylor Swift", kind: "portrait" })
download_image({ url: "..." })

TypeScript library:

import { searchArtistImages, pickBest, downloadImage } from "webfetch-core";

const { candidates } = await searchArtistImages("Drake", "portrait");
const best = pickBest(candidates, { minWidth: 1200 });
if (best) {
  const { cachedPath, sha256 } = await downloadImage(best.url);
  console.log(best.attributionLine, "->", cachedPath);
}

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

ProviderCoversLicense defaultAuthOpt-in
wikimediaportraits, events, logos, historyCC_BY_SA (metadata)—no
openverseany CC-licensed contentCC_BY (metadata)—no
unsplashhigh-quality photographyUNSPLASH_LICENSEUNSPLASH_ACCESS_KEYno
pexelsstock photographyPEXELS_LICENSEPEXELS_API_KEYno
pixabaystock photos + illustrationsPIXABAY_LICENSEPIXABAY_API_KEYno
itunesalbum covers, artist portraitsEDITORIAL_LICENSED—no
musicbrainz-caacanonical album artEDITORIAL_LICENSED—no
spotifyartist + album imagesEDITORIAL_LICENSEDSPOTIFY_CLIENT_ID/SECRETno
youtube-thumbvideo thumbnailsEDITORIAL_LICENSED—yes
bravegeneral web image searchUNKNOWN (+heuristic)BRAVE_API_KEYno
binggeneral web image searchUNKNOWN (+heuristic)BING_API_KEYyes
serpapiGoogle Images + reverse lookupUNKNOWN (+heuristic)SERPAPI_KEYyes
browserheadless fallback vs images.google.comUNKNOWN—yes
managed-browserBright Data managed browser fallbackUNKNOWNBRIGHTDATA_API_TOKENyes
flickrCC / public-domain photographyCC_BY (metadata)FLICKR_API_KEYno
internet-archivepublic-domain / CC archive mediaPUBLIC_DOMAIN—no
smithsonianOpen Access museum mediaCC0SMITHSONIAN_API_KEYno
nasaNASA imageryPUBLIC_DOMAIN—no
met-museumThe Met Open AccessCC0—no
europeanaEuropean cultural heritageCC_BY (metadata)EUROPEANA_API_KEYno
library-of-congressUS historical archivePUBLIC_DOMAIN—no
wellcome-collectionmedical/historical imageryCC_BY (metadata)—no
rawpixelCC0 stock sliceCC0RAWPIXEL_API_KEY optionalno
burstShopify Burst stock photosCC0—no
europeana-archivalEuropeana text/manuscript recordsCC_BY (metadata)EUROPEANA_API_KEYyes

See docs/PROVIDERS.md for gotchas, rate limits, and docs/PROVIDER_TUNING.md for per-use-case picks.

Local and cloud modes

The CLI is local-first: by default webfetch search, artist, album, download, probe, license, and batch call webfetch-core in-process and use provider API keys from your environment. Pass --cloud or set WEBFETCH_MODE=cloud to call https://api.getwebfetch.com/v1/* with WEBFETCH_API_KEY or webfetch config set apiKey wf_live_....

Use local mode when you want direct provider calls and a local cache. Use cloud mode when you want hosted auth, pooled provider keys, managed browser fallback, usage accounting, or team controls.

Why license-first

The only outcome we reject by default is an image we can't justify. A marginally-better photo under an unknown license is worthless to a pipeline that needs to ship without human review. Relevance ties are easy to break; provenance is not.

The ranker sorts by: license tag -> metadata confidence -> resolution -> provider priority. UNKNOWN is rejected by default (Berne Convention: most of the web is all-rights-reserved unless proven otherwise). See docs/LICENSE_POLICY.md.

Migration: CC0 stock providers

Older webfetch builds treated Unsplash, Pexels, and Pixabay as CC0. Current builds expose their platform terms explicitly:

Old tagNew tagWhat to check
CC0 from UnsplashUNSPLASH_LICENSEUnsplash terms; not Creative Commons
CC0 from PexelsPEXELS_LICENSEPexels terms; not Creative Commons
CC0 from PixabayPIXABAY_LICENSEPixabay terms; not Creative Commons

Most callers should keep licensePolicy: "safe-only" because it still allows open, platform, editorial, and press-kit categories while rejecting UNKNOWN. Pipelines that require only Creative Commons or public-domain assets should use licensePolicy: "open-only" and update type guards to handle the three platform tags separately.

webfetch vs alternatives

CapabilitywebfetchRaw Google ImagesUnsplash-onlyBing CSE
Scriptable via APIyesno (retired)yesyes
License metadata per resultyesnoyes (one lic)partial
Covers editorial music artyespartialnopartial
Covers CC / public-domainyesnonono
Safe-by-default (rejects UNKNOWN)yesn/an/ano
Shared content-addressed cacheyesnonono
Attribution line pre-builtyesnonono
One MCP config line across all IDEsyesnonono
No per-query cost on defaultsyesn/ayesno

Architecture

                             +------------------+
                             |  webfetch-core  |
                             |  (ranker, cache, |
                             |   license coerce)|
                             +---------+--------+
                                       |
          +----------------+-----------+-----------+----------------+
          |                |                       |                |
  +-------v------+  +------v-------+       +-------v------+  +------v-------+
  | webfetch     |  | webfetch-mcp |       | webfetch-    |  | browser      |
  | CLI          |  | (stdio)      |       | server (HTTP)|  | extensions   |
  +-------+------+  +------+-------+       +-------+------+  +------+-------+
          |                |                       |                |
          |                |                       |                |
          +----------------+-----------+-----------+----------------+
                                       |
                 +---------------------v---------------------+
                 |              provider adapters            |
                 |  wikimedia  openverse  unsplash  pexels    |
                 |  pixabay    itunes     mb-caa    spotify   |
                 |  youtube    brave      bing      serpapi   |
                 |  flickr     nasa       met       europeana |
                 |  loc        wellcome   rawpixel  burst     |
                 |  browser + managed-browser + archival opt-in|
                 +-------------------------------------------+

Every surface shares ~/.webfetch/cache/ keyed by SHA-256, so a download from the CLI is instantly available to the MCP server and vice versa.

Safety defaults

  • licensePolicy: "safe-only" — open, platform-license, and editorial/press categories are allowed; UNKNOWN is rejected.
  • safeSearch: "strict".
  • Opt-in providers (youtube-thumb, bing, serpapi, browser, managed-browser, europeana-archival) off by default.
  • 20 MB per-download cap, content-type guard, host blocklist.
  • robots.txt respected on generic page probes.

Roadmap

  • webfetch watch — daemon mode for repeated queries / incremental refresh.
  • Bring-your-own-provider plugin API.
  • Hosted tier at getwebfetch.com — pooled provider keys, managed browser fallback, team usage dashboard.

Contributing

Issues and PRs welcome. Run bun install && bun test to get started. See docs/ for per-area reference docs.

License

MIT.

Questions fréquentes

Qu'est-ce que webfetch ?

License-first federated image search with attribution, dimensions, and download tooling.

Comment installer webfetch ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add webfetch -e 'UNSPLASH_ACCESS_KEY=<your unsplash_access_key>' -e 'PEXELS_API_KEY=<your pexels_api_key>' -e 'PIXABAY_API_KEY=<your pixabay_api_key>' -e 'BRAVE_API_KEY=<your brave_api_key>' -e 'SERPAPI_KEY=<your serpapi_key>' -- npx -y getwebfetch-mcp@0.1.5. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour webfetch ?

Oui. Il attend UNSPLASH_ACCESS_KEY, PEXELS_API_KEY, PIXABAY_API_KEY, BRAVE_API_KEY, SERPAPI_KEY, à renseigner dans sa configuration.

webfetch est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient webfetch ?

Il est publié par ashlrai. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.