stock-image-mcp
Search and download stock images and graphics from Freepik.
Search and download stock images from Pexels, with rate limit tracking and attribution support.
Search and download stock images from Pixabay.
Search and download stock images from Burst, a free stock photo service by Shopify, via an unofficial scraper.
Search and download stock images from Unsplash, with rate limit tracking and attribution support.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stock-image-mcp Find me 3 landscape photos of mountains for a blog post"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
stock-image-mcp
An MCP server that lets Claude Code (or any MCP-compatible agent) search and download stock images by tool call — useful for sourcing images while writing SEO blog posts or other content.
Providers
Provider | API type | Requires key | Default rate limit |
Unsplash | Official | Yes | 50/hr demo, 5000/hr production |
Pexels | Official | Yes | 200/hr |
Pixabay | Official | Yes | 100 req/60s |
Freepik | Official | Yes | configurable (plan-dependent) |
StockVault | Official | Yes | configurable (undocumented, conservative default) |
Burst (Shopify) | Unofficial scrape | No | self-imposed, polite default |
Burst has no public API. It's included as a best-effort HTML scraper, clearly
marked unsupported in code — any failure there is caught and reported as an
empty result rather than breaking search_all_images.
Related MCP server: unsplash-mcp
Install
Each user runs the server locally and supplies their own provider API keys — there's no shared hosting or centrally-held keys.
With Claude Code:
claude mcp add stock-image-mcp \
-e UNSPLASH_ACCESS_KEY=... \
-e UNSPLASH_TIER=demo \
-e PEXELS_API_KEY=... \
-e PIXABAY_API_KEY=... \
-e FREEPIK_API_KEY=... \
-e FREEPIK_REQUESTS_PER_MINUTE=60 \
-e STOCKVAULT_API_KEY=... \
-e STOCKVAULT_REQUESTS_PER_HOUR=60 \
-e BURST_REQUESTS_PER_MINUTE=10 \
-e DEFAULT_PROVIDER=pexels \
-e DOWNLOAD_DIR=./downloads \
-- uvx stock-image-mcpWith OpenAI Codex CLI:
codex mcp add stock-image-mcp \
--env UNSPLASH_ACCESS_KEY=... \
--env UNSPLASH_TIER=demo \
--env PEXELS_API_KEY=... \
--env PIXABAY_API_KEY=... \
--env FREEPIK_API_KEY=... \
--env FREEPIK_REQUESTS_PER_MINUTE=60 \
--env STOCKVAULT_API_KEY=... \
--env STOCKVAULT_REQUESTS_PER_HOUR=60 \
--env BURST_REQUESTS_PER_MINUTE=10 \
--env DEFAULT_PROVIDER=pexels \
--env DOWNLOAD_DIR=./downloads \
-- uvx stock-image-mcpWith Gemini CLI:
gemini mcp add stock-image-mcp \
-e UNSPLASH_ACCESS_KEY=... \
-e UNSPLASH_TIER=demo \
-e PEXELS_API_KEY=... \
-e PIXABAY_API_KEY=... \
-e FREEPIK_API_KEY=... \
-e FREEPIK_REQUESTS_PER_MINUTE=60 \
-e STOCKVAULT_API_KEY=... \
-e STOCKVAULT_REQUESTS_PER_HOUR=60 \
-e BURST_REQUESTS_PER_MINUTE=10 \
-e DEFAULT_PROVIDER=pexels \
-e DOWNLOAD_DIR=./downloads \
-- uvx stock-image-mcpOr add it to your MCP config manually with uvx
(no clone or install step required — uvx fetches the package from PyPI on
first run):
{
"mcpServers": {
"stock-image-mcp": {
"command": "uvx",
"args": ["stock-image-mcp"],
"env": {
"UNSPLASH_ACCESS_KEY": "...",
"UNSPLASH_TIER": "demo",
"PEXELS_API_KEY": "...",
"PIXABAY_API_KEY": "...",
"FREEPIK_API_KEY": "...",
"FREEPIK_REQUESTS_PER_MINUTE": "60",
"STOCKVAULT_API_KEY": "...",
"STOCKVAULT_REQUESTS_PER_HOUR": "60",
"BURST_REQUESTS_PER_MINUTE": "10",
"DEFAULT_PROVIDER": "pexels",
"DOWNLOAD_DIR": "./downloads"
}
}
}
}Only UNSPLASH_ACCESS_KEY, PEXELS_API_KEY, PIXABAY_API_KEY,
FREEPIK_API_KEY, and STOCKVAULT_API_KEY are actual secrets — set only the
ones for providers you want enabled and drop the rest; any provider key you
omit is simply skipped by search_all_images and rejected if queried
directly via search_stock_images. The remaining variables are optional
tuning knobs shown above with their defaults — see .env.example for the
full list.
Tools
search_stock_images(query, provider="default", orientation=None, per_page=10, page=1)search_all_images(query, orientation=None, per_page=5)— fans out to every configured provider concurrentlyget_best_image(query, provider="default")download_image(url, dest_path, provider=None)— saves locally, returns attribution text if the image came from a prior searchget_attribution(provider, image_id)get_rate_limit_status(provider=None)
Usage
You don't call these tools directly — you just talk to your agent, and it decides when to reach for one based on what you asked and the tool descriptions above. A few things worth knowing:
Just ask in plain English. "Find me 3 landscape photos of mountains for a blog post" is enough to trigger
search_all_images(orsearch_stock_imagesif you name a provider). "Download that first Unsplash result to./images/hero.jpg" triggersdownload_image. "How many Pexels requests do I have left this hour?" triggersget_rate_limit_status.search_stock_imagesneeds a specific provider (or"default");search_all_imagesjust queries everything you've configured keys for and merges the results. Say "search Pexels only" or similar if you care which one gets used.Several providers (Unsplash and Pexels in particular) require attribution if you actually use the image somewhere public.
download_imagereturns the attribution text alongside the file when it applies — it's on you to paste it wherever the image ends up, the server won't do that part for you.Want to call tools by hand instead of through a conversation? See the MCP Inspector section under Development below.
Developing locally
Working from a clone instead of the published package:
uv sync
cp .env.example .env # fill in the API keys for providers you want enabled
uv run stock-image-mcpPoint your Claude config at the local checkout instead of uvx:
{
"mcpServers": {
"stock-image-mcp": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/stock-image-mcp",
"run",
"stock-image-mcp"
],
"env": {
"UNSPLASH_ACCESS_KEY": "...",
"UNSPLASH_TIER": "demo",
"PEXELS_API_KEY": "...",
"PIXABAY_API_KEY": "...",
"FREEPIK_API_KEY": "...",
"FREEPIK_REQUESTS_PER_MINUTE": "60",
"STOCKVAULT_API_KEY": "...",
"STOCKVAULT_REQUESTS_PER_HOUR": "60",
"BURST_REQUESTS_PER_MINUTE": "10",
"DEFAULT_PROVIDER": "pexels",
"DOWNLOAD_DIR": "./downloads"
}
}
}
}Development
uv run pytest # test suite (mocked HTTP, no live keys needed)
uv run ruff check . # lint
uv run ruff format . # format
uv run mypy src # type checkTo try it against real providers, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv run stock-image-mcpAvailable Tools
6 toolsdownload_imageA
Download an image URL to a local path so it can be embedded directly in a blog post's asset folder. Returns the saved path and, if the image was previously returned by a search call, its attribution text.
Inputs: url (required), dest_path (required), provider. Returns: object
get_attributionA
Return formatted credit/attribution text for a previously-returned image.
Inputs: image_id (required), provider (required). Returns: result
get_best_imageB
Return the single top-ranked result for a query from one provider.
Inputs: query (required), provider. Returns: result
get_rate_limit_statusA
Inspect remaining request quota per provider before deciding where to search.
Inputs: provider. Returns: result
search_all_imagesA
Search every configured provider concurrently; unconfigured or rate-limited providers are skipped with a note rather than failing the whole call.
Inputs: query (required), per_page, orientation. Returns: object
search_stock_imagesA
Search a single stock image provider (or the configured default) for a query.
Inputs: query (required), page, per_page, provider, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Tools are mostly distinct, but search_stock_images, search_all_images, and get_best_image all deal with searching and could be confused. However, descriptions clearly differentiate single-provider vs. multi-provider vs. single-result behavior. download_image and get_attribution also overlap slightly since download_image returns attribution text.
All tool names follow a consistent verb_noun snake_case pattern (download_image, get_attribution, search_stock_images, search_all_images, get_best_image, get_rate_limit_status). The pattern is predictable and easy to navigate.
Six tools is well-scoped for a stock image MCP. Each tool serves a distinct function in the search-download-attribution workflow without unnecessary bloat.
The tool set covers the core lifecycle: searching (single and all providers), selecting the best image, downloading locally, retrieving attribution, and checking rate limits. No obvious dead ends; agents can complete the full workflow.
Maintenance
Related MCP Connectors
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
MCP server for Qwen Image 3 AI image generation
MCP server for Flux AI image generation
AI tool directory MCP server, live since July 2026. Tools, agents, models, companies, services.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server to search and download stock images from Pexels, Unsplash, and Pixabay21,127 npm5MIT
- AlicenseAqualityDmaintenanceAn MCP server for searching and retrieving photos from Unsplash with proper attribution, designed for LLMs building content pages.338MIT
- AlicenseAqualityAmaintenanceAn MCP server that enables AI agents to search, retrieve, and curate free stock photos and videos from Pexels, with tools, resources, and prompts for easy integration.8MIT
- AlicenseAqualityDmaintenanceMCP server that allows AI coding agents to search, download, and convert stock photos from Pexels, Unsplash, and Pixabay into WebP format for direct use in web development projects.334 npm5MIT