MCP server to search and download royalty-free stock photos from Pexels and Unsplash with metadata and caching.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Stocky.

Stocky is an MCP server that lets an AI assistant search, inspect and download royalty-free stock photography from Pexels and Unsplash.
๐ Version 2.0 โ already using Stocky? Read this
Your MCP client config keeps working. If it points at
stocky_mcp.py, that file is still there and still starts the server. Nothing breaks on upgrade.But
pip install -r requirements.txtwill fail โ that file is gone, and so issetup.py. From a source checkout, install withuv syncorpip install -e .instead. See Upgrading from 1.x for the two-minute version, or the CHANGELOG for everything.The headline changes:
pycurlis gone (so no more C build errors), searches actually run concurrently, failed providers now report why instead of returning nothing, and Python 3.10+ is required.

Beautiful stock photography at your fingertips Example image used for demonstration purposes
Stunning landscapes available through multiple providers
Photo by Simon Berger on Unsplash
Both are free:
| Provider | Where | Notes |
|---|---|---|
| Pexels ๐ท | pexels.com/api | 200 requests/hour by default |
| Unsplash ๐ | unsplash.com/developers | 50/hour in demo mode, 1000/hour once your app is approved |
You only need one โ Stocky runs with whichever providers are configured.
The recommended configuration needs no installation at all:
Installed with pip or uv:
From a source checkout โ still supported so existing configurations keep working:
Stocky reads its configuration from the environment its client starts it in.
It does not load a .env file of its own, so keys must go in the env block
above.
| Variable | Default | Purpose |
|---|---|---|
PEXELS_API_KEY | โ | Enables the Pexels provider |
UNSPLASH_ACCESS_KEY | โ | Enables the Unsplash provider |
ENABLE_ATTRIBUTION_LINKS | false | Include attribution details in every result |
STOCKY_CACHE_TTL | 300 | Search cache lifetime in seconds. 0 disables caching |
STOCKY_HTTP_TIMEOUT | 15 | Per-request timeout in seconds |
STOCKY_MAX_DOWNLOAD_BYTES | 26214400 | Refuse downloads larger than this (25 MiB) |
STOCKY_DOWNLOAD_ROOT | โ | If set, confine all downloads to this directory |
STOCKY_LOG_LEVEL | INFO | DEBUG, INFO, WARNING, ERROR |
STOCKY_USER_AGENT | stocky-mcp | User-Agent sent to providers |
STOCKY_DOWNLOAD_ROOT is worth setting. Download paths come from
model-generated tool calls, and this confines writes to one directory. Stocky
always refuses a non-image file extension, and validates that image URLs from a
provider are public HTTP(S) addresses before fetching them, but a download root
is the strongest control available.
Find the perfect image for your project
Stocky exposes three MCP tools. You don't call them directly โ your client invokes them when you ask in natural language.
Search stock photos for a misty pine forest at dawn.
Find 30 landscape-orientation mountain photos from Pexels.
Download
pexels_123456at medium size to ~/Pictures/mountain.jpg
search_stock_images| Parameter | Type | Default | Notes |
|---|---|---|---|
query | str | required | Search terms |
providers | list | all configured | ["pexels", "unsplash"] |
per_page | int | 20 | Clamped per provider: Pexels 80, Unsplash 30 |
page | int | 1 | 1-based |
sort | str | relevant | relevant or latest. Unsplash only โ Pexels has no sort option |
orientation | str | โ | landscape, portrait, square |
color | str | โ | A colour name; Pexels also accepts hex codes |
include_attribution | bool | โ | Overrides ENABLE_ATTRIBUTION_LINKS |
Returns results grouped by provider, plus total_results and โ if any
provider failed โ an errors map explaining which and why.
An invalid orientation or color is dropped rather than forwarded: Pexels
silently ignores bad filters and still returns 200, which would otherwise hide
the mistake, while Unsplash rejects them outright with HTTP 400.
get_image_details| Parameter | Type | Default | Notes |
|---|---|---|---|
image_id | str | required | Prefixed id, e.g. pexels_123456 |
include_attribution | bool | โ | Overrides ENABLE_ATTRIBUTION_LINKS |
download_image| Parameter | Type | Default | Notes |
|---|---|---|---|
image_id | str | required | Prefixed id |
size | str | original | thumbnail, small, medium, large, original |
output_path | str | โ | Omit to receive base64 data instead |
If a provider doesn't offer the requested size, the closest available one is used rather than failing.
stock-images://help โ a usage guide the assistant can read on demand.
Images are free to use, but both providers require attribution as a condition of API access. This is not optional, and the previous version of this document was wrong to imply otherwise for Pexels.
Pexels requires a prominent link back to Pexels wherever API results are shown, and asks that you credit the photographer where possible.
Unsplash requires that you credit both the photographer and Unsplash, with UTM parameters on the links, and that images are hotlinked from the URLs the API returns rather than re-hosted.
Set ENABLE_ATTRIBUTION_LINKS=true and each result gains an attribution
block with ready-made text and html in the correct format for its provider.
Note on
download_image. Saving Unsplash bytes to disk or returning them base64-encoded is in tension with Unsplash's hotlinking requirement. Stocky fires the mandatory download-report endpoint whenever you download an Unsplash image, but if you are displaying images in an application, use the hotlinked URLs from the search results instead of downloading them.
Read the full terms: Pexels ยท Unsplash
Version 2.0 restructured the project. Existing MCP client configurations keep
working โ the root stocky_mcp.py is deliberately retained as a launcher โ
but installation changed, and a few behaviours are intentionally different.
If you run it via uvx or an installed console script, nothing. Upgrade
and carry on.
If you run it from a source checkout, reinstall. requirements.txt,
setup.py and setup.cfg were replaced by pyproject.toml:
pip install -r requirements.txt now fails โ the file no longer exists.
Check your Python version. 2.0 requires Python 3.10+. The old
setup.py claimed 3.8 support, but the mcp SDK has always required 3.10, so
that claim was never actually satisfiable.
Consider switching to uvx. It needs nothing installed and avoids the
whole class of "which interpreter did my editor launch?" startup failures:
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/joelio-stocky)<a href="https://allmcps.com/mcp/joelio-stocky"><img src="https://allmcps.com/api/badge/joelio-stocky?style=directory" alt="Stocky on AllMCPs" /></a>