A Model Context Protocol server that provides access to the Pexels API for searching and retrieving photos, videos, and collections.
photos_search
– Search photosphotos_curated
– List curated photosphoto_get
– Get a photo by idvideos_search
– Search videosvideos_popular
– List popular videosvideo_get
– Get a video by idcollections_featured
– List featured collectionscollections_media
– List media in a collection
-
Install
uv
. -
In your MCP client code configuration or Claude settings (file
claude_desktop_config.json
) addpexels
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 usinguvx
from pypi.org and apply to your MCP client.
-
Add
pexels-mcp-server
to your MCP client coderequirements.txt
file.pexels-mcp-server
-
Install the dependencies.
pip install -r requirements.txt
-
Add the configuration for your client:
{ "mcpServers": { "pexels": { "command": "python3", "args": ["-m", "pexels_mcp_server"], "env": { "PEXELS_API_KEY": "<Your Pexels API key>" } } } }
-
Ensure
pip
orpip3
is available on your system.pip install pexels-mcp-server # or pip3 install pexels-mcp-server
-
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>" } } } }
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>
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.