Stock Image MCP

io.github.Hasilt由 GitHub 账号 Hasilt 发布v0.1.6更新于 Oct 24, 2026

Search and download stock images from Unsplash, Pexels, Pixabay, Freepik, StockVault, and Burst

概览

AI 生成的概览

一个本地 MCP 服务器,让助手从 Unsplash、Pexels、Pixabay、Freepik、StockVault 和 Burst 搜索并下载图库图片。

可以做什么
在指定图库服务商上搜索图片,或同时向所有已配置的服务商并发搜索,支持方向和分页参数,并可为查询挑选最佳图片。将选中的图片下载到本地路径,若图片来自先前搜索则一并返回署名文本。查询指定服务商与图片 ID 的署名信息。查看各服务商剩余的速率限制状态。
适用场景
适合撰写博客、SEO 内容或其他材料时,让助手在不离开对话的情况下查找并保存真实图库照片。也适合需要跨多个图片服务商比较结果或跟踪各服务商请求限额的场景。
运行要求
通过 uvx 从 PyPI 包在本地运行(需要 Python/uv 工具链,首次运行会拉取)。用户需自行以环境变量提供各服务商 API 密钥:UNSPLASH_ACCESS_KEY、PEXELS_API_KEY、PIXABAY_API_KEY、FREEPIK_API_KEY 和 STOCKVAULT_API_KEY;只有已配置的服务商会被查询。可选调优变量包括 DEFAULT_PROVIDER 和 DOWNLOAD_DIR。需要访问各服务商 API 的网络。
安装前请注意
服务器环境中保存多个第三方 API 密钥,建议只设置需要的服务商。下载会把文件写入你指定的本地路径。Unsplash 和 Pexels 公开使用图片时要求署名,服务器只返回署名文本,需你自行放置。Burst 为无公开 API 的非官方网页抓取,可能失败或返回空结果。各服务商有速率限制和随套餐变化的配额。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Stock Image MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

stock-image-mcp

An MCP server that lets Claude Code (or any MCP-compatible agent) search and download stock images by tool call — useful for sourcing images while writing SEO blog posts or other content.

Providers

ProviderAPI typeRequires keyDefault rate limit
UnsplashOfficialYes50/hr demo, 5000/hr production
PexelsOfficialYes200/hr
PixabayOfficialYes100 req/60s
FreepikOfficialYesconfigurable (plan-dependent)
StockVaultOfficialYesconfigurable (undocumented, conservative default)
Burst (Shopify)Unofficial scrapeNoself-imposed, polite default

Burst has no public API. It's included as a best-effort HTML scraper, clearly marked unsupported in code — any failure there is caught and reported as an empty result rather than breaking search_all_images.

Install

Each user runs the server locally and supplies their own provider API keys — there's no shared hosting or centrally-held keys.

With Claude Code:

bash
claude mcp add stock-image-mcp \  -e UNSPLASH_ACCESS_KEY=... \  -e UNSPLASH_TIER=demo \  -e PEXELS_API_KEY=... \  -e PIXABAY_API_KEY=... \  -e FREEPIK_API_KEY=... \  -e FREEPIK_REQUESTS_PER_MINUTE=60 \  -e STOCKVAULT_API_KEY=... \  -e STOCKVAULT_REQUESTS_PER_HOUR=60 \  -e BURST_REQUESTS_PER_MINUTE=10 \  -e DEFAULT_PROVIDER=pexels \  -e DOWNLOAD_DIR=./downloads \  -- uvx stock-image-mcp

With OpenAI Codex CLI:

bash
codex mcp add stock-image-mcp \  --env UNSPLASH_ACCESS_KEY=... \  --env UNSPLASH_TIER=demo \  --env PEXELS_API_KEY=... \  --env PIXABAY_API_KEY=... \  --env FREEPIK_API_KEY=... \  --env FREEPIK_REQUESTS_PER_MINUTE=60 \  --env STOCKVAULT_API_KEY=... \  --env STOCKVAULT_REQUESTS_PER_HOUR=60 \  --env BURST_REQUESTS_PER_MINUTE=10 \  --env DEFAULT_PROVIDER=pexels \  --env DOWNLOAD_DIR=./downloads \  -- uvx stock-image-mcp

With Gemini CLI:

bash
gemini mcp add stock-image-mcp \  -e UNSPLASH_ACCESS_KEY=... \  -e UNSPLASH_TIER=demo \  -e PEXELS_API_KEY=... \  -e PIXABAY_API_KEY=... \  -e FREEPIK_API_KEY=... \  -e FREEPIK_REQUESTS_PER_MINUTE=60 \  -e STOCKVAULT_API_KEY=... \  -e STOCKVAULT_REQUESTS_PER_HOUR=60 \  -e BURST_REQUESTS_PER_MINUTE=10 \  -e DEFAULT_PROVIDER=pexels \  -e DOWNLOAD_DIR=./downloads \  -- uvx stock-image-mcp

Or add it to your MCP config manually with uvx (no clone or install step required — uvx fetches the package from PyPI on first run):

json
{  "mcpServers": {    "stock-image-mcp": {      "command": "uvx",      "args": ["stock-image-mcp"],      "env": {        "UNSPLASH_ACCESS_KEY": "...",        "UNSPLASH_TIER": "demo",        "PEXELS_API_KEY": "...",        "PIXABAY_API_KEY": "...",        "FREEPIK_API_KEY": "...",        "FREEPIK_REQUESTS_PER_MINUTE": "60",        "STOCKVAULT_API_KEY": "...",        "STOCKVAULT_REQUESTS_PER_HOUR": "60",        "BURST_REQUESTS_PER_MINUTE": "10",        "DEFAULT_PROVIDER": "pexels",        "DOWNLOAD_DIR": "./downloads"      }    }  }}

Only UNSPLASH_ACCESS_KEY, PEXELS_API_KEY, PIXABAY_API_KEY, FREEPIK_API_KEY, and STOCKVAULT_API_KEY are actual secrets — set only the ones for providers you want enabled and drop the rest; any provider key you omit is simply skipped by search_all_images and rejected if queried directly via search_stock_images. The remaining variables are optional tuning knobs shown above with their defaults — see .env.example for the full list.

Tools

  • search_stock_images(query, provider="default", orientation=None, per_page=10, page=1)
  • search_all_images(query, orientation=None, per_page=5) — fans out to every configured provider concurrently
  • get_best_image(query, provider="default")
  • download_image(url, dest_path, provider=None) — saves locally, returns attribution text if the image came from a prior search
  • get_attribution(provider, image_id)
  • get_rate_limit_status(provider=None)

Usage

You don't call these tools directly — you just talk to your agent, and it decides when to reach for one based on what you asked and the tool descriptions above. A few things worth knowing:

  • Just ask in plain English. "Find me 3 landscape photos of mountains for a blog post" is enough to trigger search_all_images (or search_stock_images if you name a provider). "Download that first Unsplash result to ./images/hero.jpg" triggers download_image. "How many Pexels requests do I have left this hour?" triggers get_rate_limit_status.
  • search_stock_images needs a specific provider (or "default"); search_all_images just queries everything you've configured keys for and merges the results. Say "search Pexels only" or similar if you care which one gets used.
  • Several providers (Unsplash and Pexels in particular) require attribution if you actually use the image somewhere public. download_image returns the attribution text alongside the file when it applies — it's on you to paste it wherever the image ends up, the server won't do that part for you.
  • Want to call tools by hand instead of through a conversation? See the MCP Inspector section under Development below.

Developing locally

Working from a clone instead of the published package:

bash
uv synccp .env.example .env   # fill in the API keys for providers you want enableduv run stock-image-mcp

Point your Claude config at the local checkout instead of uvx:

json
{  "mcpServers": {    "stock-image-mcp": {      "command": "uv",      "args": [        "--directory",        "/absolute/path/to/stock-image-mcp",        "run",        "stock-image-mcp"      ],      "env": {        "UNSPLASH_ACCESS_KEY": "...",        "UNSPLASH_TIER": "demo",        "PEXELS_API_KEY": "...",        "PIXABAY_API_KEY": "...",        "FREEPIK_API_KEY": "...",        "FREEPIK_REQUESTS_PER_MINUTE": "60",        "STOCKVAULT_API_KEY": "...",        "STOCKVAULT_REQUESTS_PER_HOUR": "60",        "BURST_REQUESTS_PER_MINUTE": "10",        "DEFAULT_PROVIDER": "pexels",        "DOWNLOAD_DIR": "./downloads"      }    }  }}

Development

bash
uv run pytest              # test suite (mocked HTTP, no live keys needed)uv run ruff check .         # lintuv run ruff format .        # formatuv run mypy src             # type check

To try it against real providers, use the MCP Inspector:

bash
npx @modelcontextprotocol/inspector uv run stock-image-mcp

来源:README.md,提交 38b4ebf

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分