Search and download free stock images from Pexels, Unsplash, and Pixabay.
io.github.jeanpfs/stock-images-mcp Model Context Protocol (MCP) Server
The io.github.jeanpfs/stock-images-mcp server provides capabilities to search and download free stock images sourced from Pexels, Unsplash, and Pixabay. It is focused on retrieving image results across these platforms based on the server’s described functionality.
🛠️ Key Features
Search free stock images
Download free stock images
Uses Pexels, Unsplash, and Pixabay as sources
🚀 Use Cases
Find stock images from multiple providers in one workflow
Download selected images after searching across supported platforms
⚡ Developer Benefits
Consolidated access to three stock image sources (Pexels, Unsplash, Pixabay)
Straightforward focus on search and download operations
⚠️ Limitations
The description only specifies search and download; no additional features are detailed
No configuration, authentication details, or rate-limit behavior are provided
git clone https://github.com/jeanpfs/stock-images-mcp.git
cd stock-images-mcp
npm ci && npm run build
PEXELS_API_KEY=xxx node dist/index.js
Tools
search_images
Search for stock images across configured providers.
Parameters:
query (required): search term
provider: "pexels", "unsplash", "pixabay", or "all" (default: "all")
count: results per provider (default 5, max 20)
orientation: "landscape", "portrait", or "square"
Each result has id, provider, url, thumbnail, description, author, authorUrl, downloadUrl, width, height. Pass downloadUrl to download_image.
download_image
Download an image into the download directory.
Parameters:
url (required): https image URL on pexels.com, unsplash.com or pixabay.com (use downloadUrl from search_images)
filename: output name — letters, digits, _, -, . only; the extension is added from the content-type if missing (auto-generated if omitted)
folder: subfolder inside the download directory
Behavior and limits:
Download directory is ./downloads, or STOCK_IMAGES_DOWNLOAD_DIR if set. Paths that escape it (including via symlinks) are rejected.
Only image/* responses are saved; max 50 MiB; 30 s timeout; redirects are followed only to allowed hosts.
Existing files are never overwritten.
Unsplash downloads require UNSPLASH_API_KEY: the tool calls Unsplash's download endpoint, as their API guidelines require.
Errors
Failures return isError: true. search_images also returns a per-provider errors list when some providers fail but others succeed. Provider requests time out after 10 s and are retried on network errors, 429 and 502/503/504.
Attribution and licensing
Images stay under each provider's license. Credit the photographer where the provider requires it (author and authorUrl are returned for that purpose) and review the terms: Pexels, Unsplash, Pixabay.
Development
bash
npm ci
npm run lint && npm run format:check && npm run typecheck && npm test