Stock Images MCP

Official registry Search and web

Search and download free stock images from Pexels, Unsplash, and Pixabay.

What can you do with Stock Images MCP?

  • search_images: search one or all configured providers; partial failures are reported per provider
  • download_image: download an image safely into a local folder

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package stock-images-mcp
Claude Code
claude mcp add stock-images-mcp -e 'PEXELS_API_KEY=<your pexels_api_key>' -e 'UNSPLASH_API_KEY=<your unsplash_api_key>' -e 'PIXABAY_API_KEY=<your pixabay_api_key>' -e 'STOCK_IMAGES_DOWNLOAD_DIR=<STOCK_IMAGES_DOWNLOAD_DIR>' -- npx -y stock-images-mcp@2.0.1
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "stock-images-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "stock-images-mcp@2.0.1"
            ],
            "env": {
                "PEXELS_API_KEY": "<your pexels_api_key>",
                "UNSPLASH_API_KEY": "<your unsplash_api_key>",
                "PIXABAY_API_KEY": "<your pixabay_api_key>",
                "STOCK_IMAGES_DOWNLOAD_DIR": "<STOCK_IMAGES_DOWNLOAD_DIR>"
            }
        }
    }
}

Environment variables

  • PEXELS_API_KEY secret API key from pexels.com/api (free). At least one provider key is required.
  • UNSPLASH_API_KEY secret Access key from unsplash.com/developers (free). Required to download Unsplash photos.
  • PIXABAY_API_KEY secret API key from pixabay.com/api/docs (free).
  • STOCK_IMAGES_DOWNLOAD_DIR Directory where download_image saves files (default: ./downloads).

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. Stock Images MCP
  2. Features
  3. Setup
  4. Tools
  5. Attribution and licensing
  6. Development
  7. License

Stock Images MCP

An MCP (Model Context Protocol) server for searching and downloading stock images from Pexels, Unsplash, and Pixabay.

Features

  • search_images: search one or all configured providers; partial failures are reported per provider
  • download_image: download an image safely into a local folder

Setup

Get API keys (at least one required)
ProviderEnv varGet a key
PexelsPEXELS_API_KEYhttps://www.pexels.com/api/
UnsplashUNSPLASH_API_KEYhttps://unsplash.com/developers
PixabayPIXABAY_API_KEYhttps://pixabay.com/api/docs/

Optional: STOCK_IMAGES_DOWNLOAD_DIR — where download_image writes files (default ./downloads).

Claude Code / Cursor / Claude Desktop

Add to your MCP config (~/.claude/mcp.json, ~/.cursor/mcp.json, or claude_desktop_config.json):

{
  "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"
      }
    }
  }
}

Requires Node.js 22+.

Docker
docker build -t stock-images-mcp .
docker run -i --rm -e PEXELS_API_KEY=xxx -v "$PWD/downloads:/downloads" stock-images-mcp
From source
git clone https://github.com/jeanpfs/stock-images-mcp.git
cd stock-images-mcp
npm ci && npm run build
PEXELS_API_KEY=xxx node dist/index.js

Tools

search_images

Search for stock images across configured providers.

Parameters:

  • query (required): search term
  • provider: "pexels", "unsplash", "pixabay", or "all" (default: "all")
  • count: results per provider (default 5, max 20)
  • orientation: "landscape", "portrait", or "square"

Each result has id, provider, url, thumbnail, description, author, authorUrl, downloadUrl, width, height. Pass downloadUrl to download_image.

download_image

Download an image into the download directory.

Parameters:

  • url (required): https image URL on pexels.com, unsplash.com or pixabay.com (use downloadUrl from search_images)
  • filename: output name — letters, digits, _, -, . only; the extension is added from the content-type if missing (auto-generated if omitted)
  • folder: subfolder inside the download directory

Behavior and limits:

  • Download directory is ./downloads, or STOCK_IMAGES_DOWNLOAD_DIR if set. Paths that escape it (including via symlinks) are rejected.
  • Only image/* responses are saved; max 50 MiB; 30 s timeout; redirects are followed only to allowed hosts.
  • Existing files are never overwritten.
  • Unsplash downloads require UNSPLASH_API_KEY: the tool calls Unsplash's download endpoint, as their API guidelines require.
Errors

Failures return isError: true. search_images also returns a per-provider errors list when some providers fail but others succeed. Provider requests time out after 10 s and are retried on network errors, 429 and 502/503/504.

Attribution and licensing

Images stay under each provider's license. Credit the photographer where the provider requires it (author and authorUrl are returned for that purpose) and review the terms: Pexels, Unsplash, Pixabay.

Development

npm ci
npm run lint && npm run format:check && npm run typecheck && npm test

See CONTRIBUTING.md, CODE_OF_CONDUCT.md and SECURITY.md (report vulnerabilities privately, not in public issues).

License

MIT

Frequently asked questions

What is Stock Images MCP?

Search and download free stock images from Pexels, Unsplash, and Pixabay.

How do I install Stock Images MCP?

It runs on your machine. In Claude Code: claude mcp add stock-images-mcp -e 'PEXELS_API_KEY=<your pexels_api_key>' -e 'UNSPLASH_API_KEY=<your unsplash_api_key>' -e 'PIXABAY_API_KEY=<your pixabay_api_key>' -e 'STOCK_IMAGES_DOWNLOAD_DIR=<STOCK_IMAGES_DOWNLOAD_DIR>' -- npx -y stock-images-mcp@2.0.1. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Stock Images MCP need an API key?

Yes. It expects PEXELS_API_KEY, UNSPLASH_API_KEY, PIXABAY_API_KEY, which you set in its configuration.

Is Stock Images MCP open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains Stock Images MCP?

It is published by jeanpfs. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.