# Stock Images MCP

Search and fetch stock photography from Pexels, Unsplash, and Pixabay directly inside your coding agent. Ideal for seeding mockups and UI assets.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: jeanpfs
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jeanpfs/stock-images-mcp
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/stock-images-mcp

## What it does

The server exposes two tools to your agent: `search_images` and `download_image`. You can search across several photo providers simultaneously or pick just one, with filtering available for landscape or portrait layouts. The tool returns resolutions, thumbnail previews, direct download URLs, and photographer credits for proper attribution.

Local file operations include strict safety rules. File downloads are capped at 50 MiB with a 30-second timeout, and existing files are never overwritten. Download paths default to `./downloads` or `STOCK_IMAGES_DOWNLOAD_DIR`. Any attempt to escape the designated directory through relative paths or symlinks is blocked.

Node.js 22 or higher is required. You must provide an API key for at least one service among Pexels, Unsplash, or Pixabay. Queries to providers without configured keys will fail.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PEXELS_API_KEY`, `UNSPLASH_API_KEY`, `PIXABAY_API_KEY`, `STOCK_IMAGES_DOWNLOAD_DIR` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env PEXELS_API_KEY=<PEXELS_API_KEY> --env UNSPLASH_API_KEY=<UNSPLASH_API_KEY> --env PIXABAY_API_KEY=<PIXABAY_API_KEY> --env STOCK_IMAGES_DOWNLOAD_DIR=<STOCK_IMAGES_DOWNLOAD_DIR> --transport stdio stock-images-mcp -- npx -y stock-images-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add stock-images-mcp --env PEXELS_API_KEY=<PEXELS_API_KEY> --env UNSPLASH_API_KEY=<UNSPLASH_API_KEY> --env PIXABAY_API_KEY=<PIXABAY_API_KEY> --env STOCK_IMAGES_DOWNLOAD_DIR=<STOCK_IMAGES_DOWNLOAD_DIR> -- npx -y stock-images-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "stock-images-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "stock-images-mcp"
            ],
            "env": {
                "PEXELS_API_KEY": "<PEXELS_API_KEY>",
                "UNSPLASH_API_KEY": "<UNSPLASH_API_KEY>",
                "PIXABAY_API_KEY": "<PIXABAY_API_KEY>",
                "STOCK_IMAGES_DOWNLOAD_DIR": "<STOCK_IMAGES_DOWNLOAD_DIR>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "stock-images-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "stock-images-mcp"
            ],
            "env": {
                "PEXELS_API_KEY": "<PEXELS_API_KEY>",
                "UNSPLASH_API_KEY": "<UNSPLASH_API_KEY>",
                "PIXABAY_API_KEY": "<PIXABAY_API_KEY>",
                "STOCK_IMAGES_DOWNLOAD_DIR": "<STOCK_IMAGES_DOWNLOAD_DIR>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PEXELS_API_KEY=<PEXELS_API_KEY> -e UNSPLASH_API_KEY=<UNSPLASH_API_KEY> -e PIXABAY_API_KEY=<PIXABAY_API_KEY> -e STOCK_IMAGES_DOWNLOAD_DIR=<STOCK_IMAGES_DOWNLOAD_DIR> stock-images-mcp npx -y stock-images-mcp
```
Replace <…> with your own values

## When to use it
- search multiple stock photo services with a single query
- fetch mockup images into a local directory automatically
- filter stock results by portrait or landscape orientation
- collect photographer attribution metadata for project assets

## Example prompts
- Find three landscape photos of modern architecture on Unsplash and download the best one into ./assets.
- Search Pexels for portrait shots of a software engineer and show photographer credits.
- Download this Pixabay picture directly to our images folder under the name hero.jpg.

## Similar
- [Next AI Draw.io](https://affpapa.org/en/nevibecode/mcp/next-ai-drawio.md) — MCP server · ★ 36427
- [tldraw](https://affpapa.org/en/nevibecode/mcp/tldraw.md) — MCP server · ★ 51104
- [Figma-Context-MCP](https://affpapa.org/en/nevibecode/mcp/figma-context-mcp.md) — MCP server · ★ 16073
- [Agent-Native Assets](https://affpapa.org/en/nevibecode/mcp/agent-native-assets.md) — MCP server · ★ 7527
- [Remove AI Watermarks](https://affpapa.org/en/nevibecode/mcp/remove-ai-watermarks.md) — MCP server · ★ 6144
- [Dembrandt](https://affpapa.org/en/nevibecode/mcp/dembrandt.md) — MCP server · ★ 3851

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
