Image Search MCP
You can search, inspect, and download royalty-free stock images from Unsplash, Pexels, and Pixabay through one MCP server.
Search one or more configured providers for stock images by query.
Filter searches to specific providers such as
unsplash,pexels, orpixabay.Paginate results and sort by
relevantornewest.Include provider attribution links when available.
Fetch detailed metadata for an image using a provider-prefixed ID like
pexels_123456.Download images in
thumbnail,small,medium,large, ororiginalsize.Save downloaded images to a specified output path or receive base64 image data.
Allows searching and retrieving stock images from Pexels, including image metadata, details, and downloads.
Allows searching and retrieving stock images from Pixabay, including image metadata, details, and downloads.
Allows searching and retrieving stock images from Unsplash, including image metadata, details, and downloads.
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., "@Image Search MCP search for modern office interior images"
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.
MCP Image Search Server for Unsplash, Pexels & Pixabay
Image Search MCP is a Model Context Protocol server for searching Unsplash, Pexels, and Pixabay from one MCP client. Search one provider or all configured providers concurrently, return normalized image metadata, inspect image details, and download results.
Use it as an Unsplash MCP server, Pexels MCP server, Pixabay MCP server, or one unified MCP image search tool.
Features
Search Unsplash, Pexels, and Pixabay through one MCP server
Query multiple configured providers concurrently
Filter searches to specific providers
Normalize results into one consistent image schema
Fetch detailed metadata for individual images
Download images or return base64 image data
Run locally over stdio or deploy with Streamable HTTP
Fail clearly when a requested provider is invalid or not configured
Related MCP server: unsplash-mcp
Getting Started
Have an AI agent install and connect it
Copy the short setup prompt from docs/agent-setup-prompt.md into your coding agent or AI assistant.
For agents that support reusable skills, the full install workflow is also available at skills/install-mcp/SKILL.md.
1. Install locally
One command with pipx:
pipx install --backend pip git+https://github.com/Serbyte-Development/image-search-mcp.gitAfter the Homebrew formula is published, macOS/Linux users can instead install with:
brew install Serbyte-Development/tap/image-search-mcpBoth install the image-search-mcp command.
2. Get provider API keys
Configure one or more of these environment variables:
PEXELS_API_KEY
UNSPLASH_ACCESS_KEY
PIXABAY_API_KEYAPI keys are available from:
Pexels: https://www.pexels.com/api/
Unsplash: https://unsplash.com/developers
Pixabay: https://pixabay.com/api/docs/
You only need keys for the providers you want to use.
3. Add the MCP server to your client
{
"mcpServers": {
"image-search": {
"command": "image-search-mcp",
"env": {
"PEXELS_API_KEY": "your_pexels_key",
"UNSPLASH_ACCESS_KEY": "your_unsplash_key",
"PIXABAY_API_KEY": "your_pixabay_key"
}
}
}
}Restart your MCP client after saving the configuration.
Local installs use stdio. Provider keys belong in the MCP client's environment configuration, not in the package manager or repository.
MCP Tools
search_stock_images
Search one or more configured providers.
Parameters:
query- search queryproviders- optional list containingpexels,unsplash, and/orpixabayper_page- results per provider, clamped to 1-50page- page numbersort_by-relevantornewestinclude_attribution- include provider attribution links when available
Example:
{
"query": "modern office interior",
"providers": ["unsplash", "pexels"],
"per_page": 10
}get_image_details
Fetch detailed metadata for a provider-prefixed image ID such as pexels_123456.
download_image
Download an image by ID. Supported size values are thumbnail, small, medium, large, and original.
If output_path is omitted, the tool returns base64 image data instead of writing a file.
Result Format
Search results are normalized across providers and include fields such as:
{
"id": "pexels_123456",
"title": "Example image",
"url": "https://...",
"thumbnail": "https://...",
"width": 1920,
"height": 1080,
"photographer": "Photographer Name",
"source": "Pexels",
"license": "Provider license",
"tags": []
}Run from the CLI
After installing, run:
image-search-mcpDeploy with Streamable HTTP
app.py exposes a stateless Streamable HTTP MCP endpoint suitable for Vercel.
This creates the user's own deployment from the public repository. It does not connect to or reuse the maintainer's private deployment.
After deployment, add one or more provider keys as Vercel environment variables:
PEXELS_API_KEY
UNSPLASH_ACCESS_KEY
PIXABAY_API_KEYThe deployment automatically uses Vercel's generated host environment variables for MCP host validation when those system variables are exposed. If you disable Vercel system environment variables or attach a custom domain, set IMAGE_SEARCH_MCP_ALLOWED_HOSTS to the host(s) you serve.
Then connect MCP clients to:
https://your-project.vercel.app/mcpVercel also serves the MCP server icons from public/icon.png and
public/icon.webp. Their URLs are advertised in the MCP initialization
response; self-hosted Vercel deployments use VERCEL_PROJECT_PRODUCTION_URL
when available.
The example deployment does not add authentication. If you expose an MCP endpoint publicly, add appropriate access controls or expect requests to consume your provider API quotas.
Optional transport security settings:
IMAGE_SEARCH_MCP_ALLOWED_HOSTS
IMAGE_SEARCH_MCP_ALLOWED_ORIGINSBoth accept comma-separated values.
Development
Install development dependencies:
pip install -r requirements-dev.txtRun lint, type checks, and unit tests:
make check PYTHON=.venv/bin/pythonThe repository also runs CI and CodeQL on pushes and pull requests to main.
Image Licensing
This project is MIT licensed, but images returned by the providers are governed by each provider's own current license and API terms. Review the applicable provider terms before using downloaded content in production.
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md for vulnerability reporting.
License
MIT - see LICENSE.
Developed & maintained by Serbyte Development.
Available Tools
3 toolsdownload_imageA
Download an image to local storage or return base64 encoded data.
Args: image_id: Image ID in format provider_id (e.g., pexels_123456) size: Image size variant to download Options: thumbnail, small, medium, large, original output_path: Optional path to save the image locally. NOTE: If a relative path is provided, it will be resolved from the Image Search MCP server's current working directory, which may not be the project directory. To ensure the file is saved in a specific location, use an absolute path (e.g., /home/user/image-search-mcp/downloads/image.jpg).
Returns: Path to downloaded file or base64 data
Example: download_image("pexels_123456", size="medium", output_path="/absolute/path/to/save.jpg")
Inputs: image_id (required), size, output_path. Returns: result
get_image_detailsA
Get detailed information about a specific image.
Args: image_id: Provider-prefixed image ID (e.g., 'pexels_12345') include_attribution: Whether to include attribution links (defaults to value from ENABLE_ATTRIBUTION_LINKS env var)
Returns: Detailed image information or None if not found
Inputs: image_id (required), include_attribution. Returns: result
search_stock_imagesA
Search for royalty-free stock images across multiple providers.
Args: query: Search query string providers: Providers to search. Valid values are pexels, unsplash, and pixabay. Names are case-insensitive. If a provider is requested but invalid or unavailable, the search returns an error instead of silently substituting. per_page: Number of results per page page: Page number for pagination sort_by: Sort order ('relevant', 'newest') include_attribution: Whether to include attribution links (defaults to value from ENABLE_ATTRIBUTION_LINKS env var)
Returns: Search results with metadata
Inputs: query (required), page, sort_by, per_page, +2 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 3 tools
Each tool has a distinctly different purpose: searching for images, retrieving metadata for a specific image, and downloading an image. There is no overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern: search_stock_images, get_image_details, download_image. The naming is uniform and predictable.
Three tools is well-scoped for an image search server, covering the essential operations of discovery, inspection, and retrieval. Each tool earns its place in the set.
The tool surface covers the complete image search workflow: search, get details, and download. For the stated purpose of searching stock images, there are no obvious missing operations.
Related MCP Connectors
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
MCP server for Pixapi: check live credit pricing and balance, then generate images and video.
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
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
- 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
- AlicenseAqualityDmaintenanceMCP server that enables searching and downloading Unsplash photos and collections.4MIT