MCP Connector

Access Pexels Photos and Videos

Pexels MCP Server searches and retrieves Pexels photos, videos, and collections through eight API-backed tools.

Works with pexels

91
Spark score
out of 100
Updated 10 months ago
Source checked Sep 19, 2026
Version 0.0.3
Models
universal

Add to Favorites

Why it matters

Integrate with the Pexels API to programmatically search, retrieve, and list photos, videos, and collections. This asset enables seamless access to a vast library of visual media for various applications.

Outcomes

What it gets done

01

Search for photos and videos using the Pexels API.

02

Retrieve specific photos and videos by their unique IDs.

03

Access curated and popular media, as well as featured collections.

04

List media content within specific collections.

Install

Add it to your toolbox

Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-pexels | bash

After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

photos_search

Search for photos on Pexels

photos_curated

List of curated photos from Pexels

photo_get

Get a photo by ID from Pexels

videos_search

Search for videos on Pexels

videos_popular

List of popular videos from Pexels

video_get

Get a video by ID from Pexels

collections_featured

List of featured collections from Pexels

collections_media

List of media in a Pexels collection

Overview

Pexels MCP Server

Pexels MCP Server exposes eight tools for searching and retrieving Pexels photos, videos, and collections through the Pexels API. Use it when an AI assistant needs to search or browse Pexels stock photos, videos, or collections, given a Pexels API key.

What it does

Pexels MCP Server is an MCP server that provides access to the Pexels API for searching and retrieving photos, videos, and collections. It exposes the core Pexels API surface as MCP tools so an AI assistant can search or browse stock media directly.

When to use - and when NOT to

Use it when you want an AI assistant to search or browse Pexels for stock photos and videos, pull curated or popular media, fetch a specific photo or video by id, or list featured collections and their media, instead of searching the Pexels website manually. It requires your own Pexels API key, supplied as the PEXELS_API_KEY environment variable, so it's a fit for anyone who already has, or is willing to get, a Pexels API key rather than a keyless tool. It is scoped strictly to Pexels' own photo, video, and collection catalog, not a general image-search or stock-media aggregator covering other providers.

Capabilities

photos_search searches photos, photos_curated lists curated photos, and photo_get retrieves a specific photo by id. videos_search searches videos, videos_popular lists popular videos, and video_get retrieves a specific video by id. collections_featured lists featured collections, and collections_media lists the media within a given collection.

How to install

With uv, the recommended approach, add the server to your MCP client configuration or Claude's claude_desktop_config.json:

{
    "mcpServers": {
        "pexels": {
            "command": "uvx",
            "args": ["pexels-mcp-server"],
            "env": {
                "PEXELS_API_KEY": "<Your Pexels API key>"
            }
        }
    }
}

uv downloads the server automatically from PyPI via uvx. Alternatively, add pexels-mcp-server to a requirements.txt and pip install it, running it with python3 -m pexels_mcp_server, or install it globally with pip or pip3 and configure the client the same way. To debug, run the MCP Inspector against a uvx install with npx @modelcontextprotocol/inspector uvx pexels-mcp-server, or against a cloned checkout, git clone https://github.com/garylab/pexels-mcp-server.git, with npx @modelcontextprotocol/inspector uv run pexels-mcp-server -e PEXELS_API_KEY=<the key>, useful when developing on the server locally rather than installing the published package.

Who it's for

Developers who want an AI assistant to search or browse Pexels photos, videos, and collections directly, provided they have a Pexels API key. It is licensed under the MIT License, so it is free to use, modify, and distribute under the license's terms, and it is published on PyPI as pexels-mcp-server for straightforward installation.

Source README

Pexels MCP Server

PyPI version
PyPI downloads
Total downloads
Python version

A Model Context Protocol server that provides access to the Pexels API for searching and retrieving photos, videos, and collections.

Available Tools

  • photos_search - Search photos
  • photos_curated - List curated photos
  • photo_get - Get a photo by id
  • videos_search - Search videos
  • videos_popular - List popular videos
  • video_get - Get a video by id
  • collections_featured - List featured collections
  • collections_media - List media in a collection

Usage

Using uv (recommended)

  1. Install uv.

  2. In your MCP client code configuration or Claude settings (file claude_desktop_config.json) add pexels mcp server:

    {
        "mcpServers": {
            "pexels": {
                "command": "uvx",
                "args": ["pexels-mcp-server"],
                "env": {
                    "PEXELS_API_KEY": "<Your Pexels API key>"
                }
            }
        }
    }
    

    uv will download the MCP server automatically using uvx from pypi.org and apply to your MCP client.

Using pip for a project

  1. Add pexels-mcp-server to your MCP client code requirements.txt file.

    pexels-mcp-server
    
  2. Install the dependencies.

    pip install -r requirements.txt
    
  3. Add the configuration for your client:

    {
        "mcpServers": {
            "pexels": {
                "command": "python3",
                "args": ["-m", "pexels_mcp_server"],
                "env": {
                    "PEXELS_API_KEY": "<Your Pexels API key>"
                }
            }
        }
    }
    

Using pip globally

  1. Ensure pip or pip3 is available on your system.

    pip install pexels-mcp-server
    # or
    pip3 install pexels-mcp-server
    
  2. MCP client code configuration or Claude settings, add pexels mcp server:

    {
        "mcpServers": {
            "pexels": {
                "command": "python3",
                "args": ["pexels-mcp-server"],
                "env": {
                    "PEXELS_API_KEY": "<Your Pexels API key>"
                }
            }
        }
    }
    

Debugging

You can use the MCP inspector to debug the server. For uvx installations:

npx @modelcontextprotocol/inspector uvx pexels-mcp-server

Or if you've installed the package in a specific directory or are developing on it:

git clone https://github.com/garylab/pexels-mcp-server.git
cd pexels-mcp-server
npx @modelcontextprotocol/inspector uv run pexels-mcp-server -e PEXELS_API_KEY=<the key>

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.