Stock photo search: by description, by example image, or more like this.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Stock photo search for AI assistants. An MCP server that lets Claude, ChatGPT or any MCP client search a library of royalty-free images β by describing a scene in plain language, from an example image, or "more like this" β and render the results as a thumbnail grid inside the conversation.
Remote MCP, OAuth, no API key to paste, 3 tools, images rendered inline.
The product page, with the same steps in twenty-three languages, is at pexafy.com/mcp.

A hosted server runs at:
It speaks Streamable HTTP and authenticates with OAuth 2.1 β you sign in to Pexafy in a browser window and the connector receives its own credentials. There is no API key to generate, paste into a JSON file, or rotate later.
https://mcp.pexafy.com/mcp and confirm.Point it at the same URL with the streamable-http transport. Clients that don't
implement OAuth can authenticate instead with a Pexafy API key sent as
Authorization: Bearer <key> or x-api-key: <key> β get one from the
dashboard.
Liveness: GET /health (public, no auth).
Also listed in the official MCP registry
as com.pexafy/pexafy-mcp, and on
Smithery β where a hosted
gateway URL is available for clients that prefer it.
The Free plan covers 5,000 searches a month with one connector β enough for regular use, no card required. Higher tiers are on the pricing page. When you hit a limit, the assistant tells you in-chat instead of failing with an opaque error.
Three read-only tools. No write scope, no account mutation.
search_photos β semantic text searchDescribe the scene in a full sentence; Pexafy is semantic, so sentences beat
keywords. All parameters are optional, but pass either q or at least one filter.
| Parameter | Type | Notes |
|---|---|---|
q | string | The scene, in natural language. Max 500 characters. |
color_name | string | One of: red, orange, yellow, green, blue, purple, pink, brown, black, white, gray, teal, beige, gold, navy. Excludes color_hex. |
color_hex | string | e.g. #1E90FF. Excludes color_name. |
color_tolerance | integer | 0 (exact) to 255 (loose). Default 20. Only with color_hex. |
orientation | string[] | landscape, portrait, square. |
source | string[] | Unsplash, Pexels, Pixabay, Kaboompics, Burst, StockSnap, Picjumbo, Skitterphoto, NegativeSpace. |
license_type | string[] | free, cc0. |
photographer | string | Exact username. |
after_date | string | YYYY-MM-DD. Published on or after. |
cursor | string | pagination.next_cursor from a previous response. |
search_photos_by_image β visual search from an exampleFinds photos that look like a reference image, optionally tweaked in words ("like this, but at night").
| Parameter | Type | Notes |
|---|---|---|
image_url | string | Public http(s) URL of the reference image. |
image_file | object | Auto-filled by hosts that support uploads (e.g. ChatGPT). |
image_base64 | string | Raw base64 bytes, for programmatic clients. |
q | string | Text to combine with the image ("but with hands raised"). |
text_alpha | number | Weight of q against the image. |
orientation, source, color_name, license_type, photographer, after_date | string | Same filters as above. |
cursor | string | Pagination token. |
One of image_url, image_file or image_base64 is required. Images are fetched
server-side; max 20 MB.
get_similar_photos β more like this| Parameter | Type | Notes |
|---|---|---|
photo_id | string | Required. A photo's UUID, taken from a previous result. |
cursor | string | Pagination token. |
Every photo carries its id, URLs at several sizes, dimensions, dominant colour,
orientation, source, licence, photographer, and an attribution string to display
as credit β enough for the assistant to reason about the results rather than just
list them.
Results are numbered #1, #2, β¦, so you refer to a photo the way you would in
conversation. No ids to copy around:

In clients that support MCP Apps, clicking a thumbnail opens a detail panel with the full metadata β no extra call, it is all in the tool result already:

You don't need to β the hosted server above is the intended way in. But the server is a thin, plain client of the Pexafy API, so you can run your own against your own key.
Requires Python 3.12+.
With the installed console script (pip install .):
Claude Desktop / Claude Code, over stdio:
Docker, over HTTP β see docker-compose.example.yml:
The image itself defaults to stdio, the transport an MCP client uses to drive a container, so it also works directly:
That answers initialize and tools/list with no API key and no network β the
tools come from the vendored OpenAPI snapshot. A key is only needed to run a search.
Serving over HTTP is a matter of setting the transport, which both compose files do.
Every setting is an environment variable, and every one of them is optional: with
none set, pexafy-mcp starts on stdio and answers initialize and tools/list
offline. Two are worth knowing about.
| Variable | Default | Purpose |
|---|---|---|
PEXAFY_MCP_TRANSPORT | stdio | stdio for a local client, http to serve remotely |
PEXAFY_API_BASE_URL | http://localhost:8000 | Pexafy API root β point it at https://api.pexafy.com, or at your own deployment |
The rest belongs to a deployment rather than to someone running the container, and
lives in .env.example: a fallback PEXAFY_API_KEY for stdio use
when the client sends no key of its own, PEXAFY_THUMB_BASE_URL and
PEXAFY_THUMB_HMAC_SECRET to sign the thumbnails behind the inline grid, and
PEXAFY_OAUTH_* with MCP_RESOLVE_SECRET to run the HTTP transport as an OAuth
resource server. None of them is needed to start the server.
FastMCP.from_openapi(),
so the API stays the single source of truth; tooling.py then reshapes them for an
LLM β narrowing the surface to the search core, dropping parameters that mislead a
model, and inlining the closed value sets so no facet lookup is ever needed.build_server() assembles everything. Importing the package has no side effects and
does no network I/O: it reads the vendored assets/openapi.json and assets/facets.json.
prepare.sh regenerates those.search_photos_by_image is hand-written: a chat assistant cannot upload a binary file
to an MCP tool, so the tool takes an image URL and fetches it server-side.Contributions welcome β see CONTRIBUTING.md.
MIT β see LICENSE.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/pexafy)<a href="https://allmcps.com/mcp/pexafy"><img src="https://allmcps.com/api/badge/pexafy?style=directory" alt="Pexafy on AllMCPs" /></a>