MCP server for searching and downloading stock images (Unsplash, Pexels, Pixabay, Freepik, StockVault, Burst) via LLM tool calls
Project description
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
| Provider | API type | Requires key | Default rate limit |
|---|---|---|---|
| Unsplash | Official | Yes | 50/hr demo, 5000/hr production |
| Pexels | Official | Yes | 200/hr |
| Pixabay | Official | Yes | 100 req/60s |
| Freepik | Official | Yes | configurable (plan-dependent) |
| StockVault | Official | Yes | configurable (undocumented, conservative default) |
| Burst (Shopify) | Unofficial scrape | No | self-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.
Add it to your Claude config with uvx
(no clone or install step required — uvx fetches the package from PyPI on
first run):
{
"mcpServers": {
"stock-image-mcp": {
"command": "uvx",
"args": ["stock-image-mcp"],
"env": {
"PEXELS_API_KEY": "...",
"UNSPLASH_ACCESS_KEY": "..."
}
}
}
}
Any provider env var you omit is simply skipped by search_all_images and
rejected if queried directly via search_stock_images — see .env.example
for the full list of supported keys.
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 concurrentlyget_best_image(query, provider="default")download_image(url, dest_path, provider=None)— saves locally, returns attribution text if the image came from a prior searchget_attribution(provider, image_id)get_rate_limit_status(provider=None)
Developing locally
Working from a clone instead of the published package:
uv sync
cp .env.example .env # fill in the API keys for providers you want enabled
uv run stock-image-mcp
Point your Claude config at the local checkout instead of uvx:
{
"mcpServers": {
"stock-image-mcp": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/stock-image-mcp", "run", "stock-image-mcp"],
"env": {
"PEXELS_API_KEY": "...",
"UNSPLASH_ACCESS_KEY": "..."
}
}
}
}
Development
uv run pytest # test suite (mocked HTTP, no live keys needed)
uv run ruff check . # lint
uv run ruff format . # format
uv run mypy src # type check
To try it against real providers, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv run stock-image-mcp
Releasing
Publishing to PyPI is handled by .github/workflows/publish.yml, triggered by
pushing a v* tag (e.g. v0.1.0). It runs lint/type-check/tests, builds the
package, then publishes via PyPI's trusted-publisher (OIDC) flow — no token
stored in CI.
One-time setup on PyPI (before the first tagged release): add a "pending
publisher" at https://pypi.org/manage/account/publishing/ with PyPI project
name stock-image-mcp, repo owner Hasilt, repo name images-mcp, workflow
filename publish.yml, and environment pypi. PyPI creates the project
automatically on the first successful run of that workflow.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stock_image_mcp-0.1.0.tar.gz.
File metadata
- Download URL: stock_image_mcp-0.1.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ebf56d5899dcecf124d2f53eb7d1ed5b6656305219ffcba5a13f7cf5f50f16f
|
|
| MD5 |
ed5b188f085d02eb9216fdb7894aeaf6
|
|
| BLAKE2b-256 |
e45b41ca29f803531e0cbb1737557d24e4e10db5d572a9fb611f7c94ab7096d6
|
Provenance
The following attestation bundles were made for stock_image_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on Hasilt/images-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stock_image_mcp-0.1.0.tar.gz -
Subject digest:
7ebf56d5899dcecf124d2f53eb7d1ed5b6656305219ffcba5a13f7cf5f50f16f - Sigstore transparency entry: 2229660969
- Sigstore integration time:
-
Permalink:
Hasilt/images-mcp@21b32ed59c7961f3aeb8e90290d9d5f9a11a5344 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Hasilt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21b32ed59c7961f3aeb8e90290d9d5f9a11a5344 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stock_image_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stock_image_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed8a58b13c44fe5bc1d9a94f6d966587bf756ea4a4a4101a57d0cc3ebfc11753
|
|
| MD5 |
c980dbfc8ea731ee0e1645cd37583c7d
|
|
| BLAKE2b-256 |
70330e55047700f0c090b8603e340c8c1cd6a22d61caebe78e487d7b8d52428c
|
Provenance
The following attestation bundles were made for stock_image_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Hasilt/images-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stock_image_mcp-0.1.0-py3-none-any.whl -
Subject digest:
ed8a58b13c44fe5bc1d9a94f6d966587bf756ea4a4a4101a57d0cc3ebfc11753 - Sigstore transparency entry: 2229661475
- Sigstore integration time:
-
Permalink:
Hasilt/images-mcp@21b32ed59c7961f3aeb8e90290d9d5f9a11a5344 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Hasilt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21b32ed59c7961f3aeb8e90290d9d5f9a11a5344 -
Trigger Event:
push
-
Statement type: