cd /news/ai-agents/an-mcp-server-that-lets-claude-code-… · home › topics › ai-agents › article
[ARTICLE · art-153198] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

An MCP server that lets Claude Code find and download stock photos

A developer released stock-images-mcp, an open-source MCP server that lets coding agents like Claude Code and Cursor search Pexels, Unsplash and Pixabay for real photos and download them into a project. The server exposes two tools, search_images and download_image, and restricts downloads to HTTPS URLs on the three provider domains with a 50 MiB size limit, 30-second timeout, path-escape and symlink rejection, and no file overwrites. It requires Node.js 22 or newer, at least one free provider API key, and is MIT licensed.

by read2 min views2 publishedOct 19, 2026

Coding agents can write a landing page, but the images are usually

placeholders. stock-images-mcp is a small MCP server that lets the agent find

real photos and save them into your project.

The server has two tools. search_images queries Pexels, Unsplash and Pixabay,

one provider or all of them, and returns each photo's description, size,

photographer, photographer URL and download URL. download_image saves the

chosen photo into a folder in your project.

In the demo I asked for three photos of a rainy city street at night and for

the most atmospheric landscape one to be downloaded. The agent searched, picked

one from the results, saved it into downloads/ and told me which credit to

add. It chose from the descriptions and sizes in the search results. It did not

look at the images.

You need at least one free API key from Pexels, Unsplash or Pixabay. Add the

server to your MCP config for Claude Code, Cursor or Claude Desktop:

{
  "mcpServers": {
    "stock-images": {
      "command": "npx",
      "args": ["-y", "stock-images-mcp"],
      "env": { "PEXELS_API_KEY": "your-key-here" }
    }
  }
}

It needs Node.js 22 or newer, and there is a Docker image too.

A download tool that an agent controls should be strict about what it accepts.

It only takes https URLs on pexels.com, unsplash.com and pixabay.com, and

redirects can only go to those hosts. It saves only image/* responses, with a

50 MiB limit and a 30 second timeout. Paths that escape the download folder are

rejected, symlinks included, and it never overwrites an existing file.

If one provider fails, you still get results from the others, with a

per-provider error list. For Unsplash downloads the tool calls their download

endpoint, which their API guidelines require.

The images stay under each provider's license. The search results include the

photographer's name and URL so you can credit them where the license asks for it.

Repo: https://github.com/jeanpfs/stock-images-mcp

npm: https://www.npmjs.com/package/stock-images-mcp

MIT licensed.

── more in #ai-agents 4 stories · sorted by recency
── more on @stock-images-mcp 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/an-mcp-server-that-l…] indexed:0 read:2min 2026-10-19 · —