Pexels

Provides access to the Pexels API for searching and retrieving photos, videos, and collections via an MCP server.
  • python

9

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

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

The Pexels MCP Server lets you access the Pexels API through a Model Context Protocol (MCP) server, enabling you to search and retrieve photos, videos, and collections from your MCP-enabled clients. It centralizes API interactions and simplifies integration with your MCP workflows.

How to use

You connect your MCP client to the Pexels MCP Server to perform common media actions. You will provide your Pexels API key to authorize requests. Once connected, you can search for photos and videos, list curated or popular items, and fetch individual media or collections. Use the MCP client’s standard configuration to reference the pexels MCP server, and ensure the API key is available as an environment variable.

Typical usage patterns include configuring the MCP client to route requests through the Pexels MCP Server, then issuing search or retrieval actions like photos_search, photos_curated, photo_get, videos_search, videos_popular, video_get, collections_featured, and collections_media. Each action translates to equivalent endpoints on the Pexels API via the MCP server, returning media metadata and URLs suitable for display in your application.

How to install

Prerequisites: you need Python and your preferred package management tool. You will run the MCP server locally using either a UV-based runtime or by invoking the Python module directly.

Using uv (recommended)

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

Using pip for a project

Add the MCP server to your project dependencies and configure the client to run the server module.

# add to your requirements.txt
pexels-mcp-server
pip install -r requirements.txt
{
  "mcpServers": {
    "pexels": {
      "command": "python3",
      "args": ["-m", "pexels_mcp_server"],
      "env": {
        "PEXELS_API_KEY": "<Your Pexels API key>"
      }
    }
  }
}

Using pip globally

Install the MCP server package globally and configure your client to run it directly.

Install the package and set up the client configuration.

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

Available tools

photos_search

Search photos and return results matching a query, including metadata like URLs, license, and photographer details.

photos_curated

List curated photos as curated collections or feeds from Pexels.

photo_get

Retrieve a single photo by its ID, including detailed metadata and URLs.

videos_search

Search videos with query parameters such as duration, category, and keywords.

videos_popular

List popular or trending videos from Pexels.

video_get

Retrieve a single video by its ID, with metadata and playback URLs.

collections_featured

List featured collections from Pexels.

collections_media

List media items within a specific collection.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational