- Home
- MCP servers
- Stock Images
Stock Images
- javascript
1
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jeanpfs-stock-images-mcp": {
"command": "npx",
"args": [
"-y",
"stock-images-mcp"
],
"env": {
"PEXELS_API_KEY": "YOUR_PEXELS_API_KEY",
"PIXABAY_API_KEY": "YOUR_PIXABAY_API_KEY",
"UNSPLASH_API_KEY": "YOUR_UNSPLASH_API_KEY"
}
}
}
}This MCP server lets you search and download stock images from Pexels, Unsplash, and Pixabay by querying across providers and saving selected images to your local machine. It simplifies integrating stock image search into your workflows and clients that support MCP endpoints.
How to use
You can perform searches across the configured stock image providers using the search_images tool. Specify a search term and optionally choose a provider, number of results per provider, and image orientation. After you find images you want, use the download_image tool to save an image to your local filesystem.
How to install
Prerequisites: you need Node.js and npm installed on your system. If you prefer Docker, you can run the server in a container.
Option A: Run locally with Node using npx. Ensure you have the required API keys from the stock image providers, then start the MCP server with the following configuration and command.
# Start the MCP server using npx
npx -y stock-images-mcp
Option B: Run with Docker. Build and run the image, providing your API keys as environment variables.
docker build -t stock-images-mcp .
docker run -e PEXELS_API_KEY=your-key -e UNSPLASH_API_KEY=your-key -e PIXABAY_API_KEY=your-key stock-images-mcp
Configuration and keys
The MCP server requires API keys from each stock image provider. You can supply these keys through environment variables when starting the server. The following configuration shows how to wire the MCP into your client setup and pass the keys.
To use this MCP with Claude Code or Cursor, add the following to your MCP config file (for example at ~/.claude/mcp.json or ~/.cursor/mcp.json). This example defines a single MCP server named stock-images and passes the provider API keys via environment variables.
{
"mcpServers": {
"stock-images": {
"command": "npx",
"args": ["-y", "stock-images-mcp"],
"env": {
"PEXELS_API_KEY": "your-key-here",
"UNSPLASH_API_KEY": "your-key-here",
"PIXABAY_API_KEY": "your-key-here"
}
}
}
}
Notes and troubleshooting
If you encounter missing API keys, obtain them from the provider developer portals and retry starting the MCP server with the keys in place.
The server exposes two main tools: search_images to query images across providers and download_image to save chosen images locally. Ensure you pass valid URLs or search results when using download operations.
Available tools
search_images
Search stock images across configured providers. Parameters include query, provider (pexels, unsplash, pixabay, or all), count per provider, and orientation (landscape, portrait, square).
download_image
Download a specific image to a local folder. Parameters include url, filename (optional), and folder (default: ./downloads).