Skip to main content
Glama
Image Search MCP
by EngDawood

image-search-mcp

MCP server for Wikimedia Commons photo search — freely-licensed raster images with attribution, on Cloudflare Workers. Public and keyless: no API key, no signup, no auth.

This fills the gap next to Dawood's design-mcp-server, whose Wikimedia provider is SVG-only. Here the default is photos (jpg, png, webp, gif); SVG is opt-in.

Result shape

Every search result always carries the same fields — title, file_page_url, file_url, thumbnail_url, width, height, mime, license, artist, credit, attribution — with null where the API gave nothing (instead of the key being absent). file_page_url always resolves, falling back to a constructed Commons wiki URL when the API omits it. The attribution line uses the artist, falling back to the credit field when no artist is recorded.

Paging: next_offset steps by the requested limit, and total_count is the API's total before the client-side mime filter (a page can hold fewer than limit images when non-matching mimes are filtered out).

Related MCP server: wikipedia-mcp-image-crawler

Tools

Tool

What it does

wikimedia_search_images

Search Commons for photos. Params: query (required), limit (default 12, max 50), offset, filetype (photos default, svg, all). Every result carries the file URL, a 640px thumbnail, dimensions, licence, author, and a ready attribution line.

wikimedia_get_image

Full info for one file by title (with or without the File: prefix): URLs, dimensions, description, and the complete attribution block (artist, credit, licence, usage terms). Returns an error result when the file is missing.

Both tools call the official MediaWiki Action API on commons.wikimedia.org/w/api.php (generator=search, gsrnamespace=6, prop=imageinfo, iiprop=url|size|mime|extmetadata) with a descriptive User-Agent. No upstream key is needed.

Use it

Once deployed, point any MCP client at the /mcp endpoint:

# Claude Code
claude mcp add --transport http image-search https://image-search-mcp.<your-subdomain>.workers.dev/mcp
// Claude Desktop / Cursor (.cursor/mcp.json, claude_desktop_config.json)
{
  "mcpServers": {
    "wikimedia-images": {
      "type": "http",
      "url": "https://image-search-mcp.<your-subdomain>.workers.dev/mcp"
    }
  }
}

Develop

npm install
npm test          # vitest
npm run typecheck # tsc --noEmit
npm run dev       # wrangler dev on :8787

Deploy

npx wrangler login   # one-time browser OAuth
npx wrangler deploy  # → https://image-search-mcp.<your-subdomain>.workers.dev

Optional: set a custom domain in the Cloudflare dashboard, or a route in wrangler.toml. No secrets are needed — the Commons API is keyless.

Attribution

Borrowed patterns (all MIT) are credited in THIRD_PARTY.md: iolab-mcp-collection's wikimedia-mcp (Commons API shape, attribution reader), wikipedia-recent-changes-mcp (plain-fetch Worker skeleton and hand-rolled JSON-RPC handler), and wikimedia-image-search-mcp (search + metadata pattern). The thumbnail-composite idea from the last one is intentionally not built — compositing images is not practical inside a Worker.

License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      This MCP server enables AI assistants to search for images on Wikimedia Commons, providing detailed metadata and optional thumbnail combinations to assist AI models in visual comparisons.
      1
      2
      Apache 2.0
    • F
      license
      B
      quality
      D
      maintenance
      Enables searching and retrieving images from Wikipedia Commons with detailed metadata including licenses and authors.
      2
      11
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to search seven open media collections for reusable images, artworks, HDRIs, textures and 3D models, keeping only items whose own licence record clearly permits reuse. Returns ready-to-use attribution credit lines and can download the selected files with a generated credits file.
      MIT