Skip to main content
Glama
Serbyte-Development

Image Search MCP

MCP Image Search Server for Unsplash, Pexels & Pixabay

CI CodeQL Python 3.10+ MCP Python SDK 2.x License: MIT

Image Search MCP is a Model Context Protocol server for searching Unsplash, Pexels, and Pixabay from one MCP client. Search one provider or all configured providers concurrently, return normalized image metadata, inspect image details, and download results.

Use it as an Unsplash MCP server, Pexels MCP server, Pixabay MCP server, or one unified MCP image search tool.

Features

  • Search Unsplash, Pexels, and Pixabay through one MCP server

  • Query multiple configured providers concurrently

  • Filter searches to specific providers

  • Normalize results into one consistent image schema

  • Fetch detailed metadata for individual images

  • Download images or return base64 image data

  • Run locally over stdio or deploy with Streamable HTTP

  • Fail clearly when a requested provider is invalid or not configured

Related MCP server: unsplash-mcp

Getting Started

Have an AI agent install and connect it

Copy the short setup prompt from docs/agent-setup-prompt.md into your coding agent or AI assistant.

For agents that support reusable skills, the full install workflow is also available at skills/install-mcp/SKILL.md.

1. Install locally

One command with pipx:

pipx install --backend pip git+https://github.com/Serbyte-Development/image-search-mcp.git

After the Homebrew formula is published, macOS/Linux users can instead install with:

brew install Serbyte-Development/tap/image-search-mcp

Both install the image-search-mcp command.

2. Get provider API keys

Configure one or more of these environment variables:

PEXELS_API_KEY
UNSPLASH_ACCESS_KEY
PIXABAY_API_KEY

API keys are available from:

You only need keys for the providers you want to use.

3. Add the MCP server to your client

{
  "mcpServers": {
    "image-search": {
      "command": "image-search-mcp",
      "env": {
        "PEXELS_API_KEY": "your_pexels_key",
        "UNSPLASH_ACCESS_KEY": "your_unsplash_key",
        "PIXABAY_API_KEY": "your_pixabay_key"
      }
    }
  }
}

Restart your MCP client after saving the configuration.

Local installs use stdio. Provider keys belong in the MCP client's environment configuration, not in the package manager or repository.

MCP Tools

search_stock_images

Search one or more configured providers.

Parameters:

  • query - search query

  • providers - optional list containing pexels, unsplash, and/or pixabay

  • per_page - results per provider, clamped to 1-50

  • page - page number

  • sort_by - relevant or newest

  • include_attribution - include provider attribution links when available

Example:

{
  "query": "modern office interior",
  "providers": ["unsplash", "pexels"],
  "per_page": 10
}

get_image_details

Fetch detailed metadata for a provider-prefixed image ID such as pexels_123456.

download_image

Download an image by ID. Supported size values are thumbnail, small, medium, large, and original.

If output_path is omitted, the tool returns base64 image data instead of writing a file.

Result Format

Search results are normalized across providers and include fields such as:

{
  "id": "pexels_123456",
  "title": "Example image",
  "url": "https://...",
  "thumbnail": "https://...",
  "width": 1920,
  "height": 1080,
  "photographer": "Photographer Name",
  "source": "Pexels",
  "license": "Provider license",
  "tags": []
}

Run from the CLI

After installing, run:

image-search-mcp

Deploy with Streamable HTTP

app.py exposes a stateless Streamable HTTP MCP endpoint suitable for Vercel.

Deploy with Vercel

This creates the user's own deployment from the public repository. It does not connect to or reuse the maintainer's private deployment.

After deployment, add one or more provider keys as Vercel environment variables:

PEXELS_API_KEY
UNSPLASH_ACCESS_KEY
PIXABAY_API_KEY

The deployment automatically uses Vercel's generated host environment variables for MCP host validation when those system variables are exposed. If you disable Vercel system environment variables or attach a custom domain, set IMAGE_SEARCH_MCP_ALLOWED_HOSTS to the host(s) you serve.

Then connect MCP clients to:

https://your-project.vercel.app/mcp

The example deployment does not add authentication. If you expose an MCP endpoint publicly, add appropriate access controls or expect requests to consume your provider API quotas.

Optional transport security settings:

IMAGE_SEARCH_MCP_ALLOWED_HOSTS
IMAGE_SEARCH_MCP_ALLOWED_ORIGINS

Both accept comma-separated values.

Development

Install development dependencies:

pip install -r requirements-dev.txt

Run lint, type checks, and unit tests:

make check PYTHON=.venv/bin/python

The repository also runs CI and CodeQL on pushes and pull requests to main.

Image Licensing

This project is MIT licensed, but images returned by the providers are governed by each provider's own current license and API terms. Review the applicable provider terms before using downloaded content in production.

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md for vulnerability reporting.

License

MIT - see LICENSE.

Developed & maintained by Serbyte Development.

Available Tools

3 tools
download_imageA

Download an image to local storage or return base64 encoded data.

Args: image_id: Image ID in format provider_id (e.g., pexels_123456) size: Image size variant to download Options: thumbnail, small, medium, large, original output_path: Optional path to save the image locally. NOTE: If a relative path is provided, it will be resolved from the Image Search MCP server's current working directory, which may not be the project directory. To ensure the file is saved in a specific location, use an absolute path (e.g., /home/user/image-search-mcp/downloads/image.jpg).

Returns: Path to downloaded file or base64 data

Example: download_image("pexels_123456", size="medium", output_path="/absolute/path/to/save.jpg")

ParametersJSON Schema
NameRequiredDescriptionDefault
sizeNooriginal
image_idYes
output_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

As no annotations are provided, the description carries the full burden of behavioral disclosure. It clearly explains return modes (file path or base64), the important relative-path resolution behavior tied to the server's cwd, and default size behavior. This is meaningful context beyond basic write intent, though error handling and permissions are not covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear Args, Returns, and Example sections. The relative-path warning is essential and the example adds practical value. Every sentence contributes, with no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a moderately simple tool, the description covers parameter details, return type, and a concrete example. The absence of error handling and explicit tool-selection guidance is a minor gap, but the information provided is sufficient for typical usage, especially given the output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite the input schema having 0% description coverage, the description thoroughly documents all three parameters: image_id format with an example, size options with valid values, and output_path with a critical warning about absolute versus relative paths. This fully compensates for the schema's absence of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Download an image to local storage or return base64 encoded data,' using a specific verb and resource. This distinguishes the tool from sibling tools like search_stock_images and get_image_details.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides usage details for parameters but does not explicitly state when to use this tool versus alternatives. The intended use is implied by the tool name and purpose, but no explicit when-to-use or when-not-to-use guidance is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_image_detailsA

Get detailed information about a specific image.

Args: image_id: Provider-prefixed image ID (e.g., 'pexels_12345') include_attribution: Whether to include attribution links (defaults to value from ENABLE_ATTRIBUTION_LINKS env var)

Returns: Detailed image information or None if not found

ParametersJSON Schema
NameRequiredDescriptionDefault
image_idYes
include_attributionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states the return behavior ('Detailed image information or None if not found') and documents the default behavior of include_attribution via an environment variable. This adds useful context beyond the input schema. However, it does not mention any side effects, permissions, or rate limits, though for a read-only 'get' operation this is likely acceptable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, using an Args/Returns format. It is front-loaded with the primary purpose, includes a concrete example for the main parameter, and has no wasted words. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (two parameters, one required), the presence of an output schema, and the lack of annotations, the description is sufficiently complete. It covers the core purpose, both parameters, the default behavior of the optional parameter, and the special return case (None if not found). This gives the agent enough context to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does thoroughly. Each parameter is explained with meaning: image_id gets an example ('pexels_12345') and clarification that it is provider-prefixed, while include_attribution is explained with its purpose and default behavior. This adds significant value over the bare schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get detailed information about a specific image.' This uses a specific verb ('Get') and resource ('detailed information' for 'a specific image'), which naturally distinguishes it from sibling tools like search_stock_images and download_image. The 'specific image' phrasing indicates this is for retrieving details on an already-identified image, not for discovery or file retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool by requiring an image_id and describing it as a lookup operation, but it does not explicitly contrast with alternatives. While it's clear from the name and parameters that you need an existing image ID, there is no explicit 'use this instead of search_stock_images when you have an ID' guidance. The context is clear enough, but exclusions/alternatives are not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_stock_imagesA

Search for royalty-free stock images across multiple providers.

Args: query: Search query string providers: Providers to search. Valid values are pexels, unsplash, and pixabay. Names are case-insensitive. If a provider is requested but invalid or unavailable, the search returns an error instead of silently substituting. per_page: Number of results per page page: Page number for pagination sort_by: Sort order ('relevant', 'newest') include_attribution: Whether to include attribution links (defaults to value from ENABLE_ATTRIBUTION_LINKS env var)

Returns: Search results with metadata

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
queryYes
sort_byNorelevant
per_pageNo
providersNo
include_attributionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds value by specifying that invalid or unavailable providers return an error instead of silently substituting, and that include_attribution defaults to an environment variable. However, it omits potential auth requirements, rate limits, or side effects, keeping it slightly below a perfect score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with a clear first sentence stating the purpose, followed by structured Args and Returns sections. Every line adds essential detail without unnecessary verbosity. It is appropriately sized and front-loaded, making it easy for an agent to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (6 parameters, multi-provider integration), the description covers all parameters and notes error handling and defaults, which is substantial. The presence of an output schema means return values need not be explained in detail. It misses a few nuances, such as the behavior when providers is omitted (default null likely means all providers) and potential authentication prerequisites, so it isn't fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides only types and titles with zero description coverage, so the description must compensate. It fully explains each parameter: query string, providers with valid values and case-insensitivity, per_page, page, sort_by with allowed values, and include_attribution with its env-var default. This is comprehensive parameter documentation that far exceeds the schema's minimal information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Search for royalty-free stock images across multiple providers.' This is a specific verb (search) plus a resource (stock images) and scope (multiple providers). It effectively distinguishes from sibling tools get_image_details and download_image, which handle post-search operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description communicates the basic intent of searching images but provides no explicit guidance on when to prefer this tool over alternatives. It neither names sibling tools nor instructs the agent to use get_image_details for specific image metadata or download_image for fetching. Usage is implied by the function name rather than explicitly stated, earning a mid-range score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a distinctly different purpose: searching for images, retrieving metadata for a specific image, and downloading an image. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: search_stock_images, get_image_details, download_image. The naming is uniform and predictable.

Tool Count5/5

Three tools is well-scoped for an image search server, covering the essential operations of discovery, inspection, and retrieval. Each tool earns its place in the set.

Completeness5/5

The tool surface covers the complete image search workflow: search, get details, and download. For the stated purpose of searching stock images, there are no obvious missing operations.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Serbyte-Development/image-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server