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 分