pexels
MCP server from CaullenOmdahl/pexels-mcp-server
claude mcp add --transport stdio caullenomdahl-pexels-mcp-server node server.js \ --env PEXELS_API_KEY="your_pexels_api_key"
How to use
This MCP server provides access to the Pexels API, exposing tools to search and retrieve photos, videos, and collections from Pexels. Clients can call photo tools such as searchPhotos, downloadPhoto, getCuratedPhotos, and getPhoto to discover and fetch imagery, as well as video tools like searchVideos, getPopularVideos, getVideo, and downloadVideo for motion content. Collection tools include getFeaturedCollections and getCollectionMedia to explore curated groups of media. Each operation returns metadata including IDs, URLs, and attribution details, along with the current API rate limit status. Resources are exposed as URIs (pexels-photo://{id}, pexels-video://{id}, pexels-collection://{id}) to enable direct referencing in workflows and tools.
To use the server, provide your Pexels API key in the environment (PEXELS_API_KEY) when starting the server. Tools can then be invoked by your AI agent or client, and downloaded assets can be retrieved using the supplied direct links. The server emphasizes proper attribution per Pexels requirements, and error messages include rate-limit status and guidance for common issues.
How to install
Prerequisites:
- Node.js 18 or higher
- PNPM or npm
- Access to a Pexels API key
Installation steps:
-
Clone the repository git clone https://github.com/caullenomdahl/pexels-mcp-server.git cd pexels-mcp-server
-
Install dependencies
- If using PNPM: pnpm install
- If using npm: npm install
-
Build the project (if applicable) pnpm build
or with npm
npm run build
-
Run in development mode (set your API key) PEXELS_API_KEY=your_api_key pnpm dev
or with npm
PEXELS_API_KEY=your_api_key npm run dev
Note: Replace your_api_key with your actual Pexels API key. The server expects the key in the PEXELS_API_KEY environment variable at runtime.
Additional notes
Environment and configuration tips:
- The server requires a valid Pexels API key (set via PEXELS_API_KEY).
- For deployment, ensure the key is injected through your hosting environment or deployment configuration (e.g., Smithery settings).
- If you encounter rate-limit issues, monitor the rate-limit fields returned with API responses and implement backoff in your client.
- The server exposes URI resources (pexels-photo://, pexels-video://, pexels-collection://) for easy referencing in tools and pipelines.
- When using downloadPhoto or downloadVideo, leverage your local download capabilities (curl, Invoke-WebRequest, etc.) to fetch the asset from the provided direct link.
- If you modify or expand tools, update the corresponding documentation to reflect new capabilities and required parameters.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud