Skip to main content
Glama
pexels-mcp-server

pexels-mcp-server

by garylab

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

Related MCP server: Lorem Ipsum MCP Server

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>

License

pexels-mcp-server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Available Tools

8 tools
collections_mediaC

List collection media

Inputs: id (required), type, per_page, page.

photo_getB

Get a photo by id

Inputs: id (required).

photos_curatedC

List curated photos

Inputs: per_page, page.

video_getB

Get a video by id

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct resource or action: collections, photos, and videos are clearly separated with no overlapping functionality.

    Naming Consistency5/5

    All tool names follow a consistent resource_action pattern (e.g., collections_featured, photos_search) using snake_case and clear verbs.

    Tool Count5/5

    Eight tools cover the essential operations for a media API, providing a balanced set without unnecessary clutter or missing core features.

    Completeness4/5

    The surface includes search, get by ID, and curated/popular lists for photos and videos, and featured collections with media listing. Minor gaps like collection search or photo upload are acceptable given the read-only nature.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables searching for images on Pixabay with query parameters and returns formatted results with image URLs and metadata.
      2
      95 npm
      10
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables image generation and retrieval from picsum.photos with customizable parameters like dimensions, filters, and output formats.
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for the Pexels API that provides inline visual previews, video storyboards, and batch operations for efficient stock media selection in Claude and other MCP clients.
      13
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that exposes Pexels API tools for searching and retrieving free stock photos, videos, and curated collections, enabling AI agents to incorporate royalty-free media directly from chat.
      9
      228 npm
      3
      MIT