pexels-mcp-pro
Provides tools for searching, previewing, and downloading stock photos and videos from the Pexels API, including inline thumbnails, video storyboards, batch search, and attribution generation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pexels-mcp-pro search photos of a sunset beach"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pexels-mcp-pro
A Model Context Protocol server for the Pexels API, built for fast, low-token stock media selection in Claude and other MCP clients.
Most Pexels MCP servers return raw JSON and leave the model to guess from alt text whether a photo fits. This one is designed around how an agent actually picks stock media: look at the candidates, judge, download the winner.
What it does differently
Inline visual previews. Search results include small thumbnails as images in the tool response, so the model sees every candidate and judges fit immediately. A thumbnail costs about 75 tokens of vision input; a wrong download costs far more.
Video storyboards. video_storyboard returns a clip's poster plus frames sampled evenly across its runtime. An agent can check the motion and framing of a 30-second video for a few hundred tokens instead of downloading 50 MB to find out it pans the wrong way.
Compact results. One line per item: #id 4000x6000 portrait | Photographer | "alt text" | #avgcolor. Search results contain no URLs. The #id drives previews, downloads, and attribution, and get_media returns full URLs on the rare occasion you need them.
Careful with quota. API responses are cached, and every media object seen in a search is remembered for the session, so previews, storyboards, downloads, and attribution for seen items cost no further API calls. Thumbnail and file fetches never count against the Pexels rate limit. api_status reports remaining quota and reset time.
Batch operations. batch_search runs up to 6 queries in parallel in one call and dedupes results across them, which suits multi-scene videos and article layouts. download_media streams up to 20 files to disk with selectable quality and returns paths with ready-to-paste attribution.
Related MCP server: imagebank-mcp
Tools
Tool | What it does |
| Search photos: compact lines plus inline thumbnails, with orientation/size/color/locale filters |
| Search videos: compact lines plus inline posters, with duration filters |
| Up to 6 queries in parallel, one call, deduped |
| Re-inspect specific |
| Poster plus sampled in-clip frames as inline images |
| Pexels' hand-curated feed |
| Popular videos with minimum-resolution and duration constraints |
| Browse featured collections |
| Media inside a collection |
| Full metadata and all URLs for one item |
| Stream up to 20 photos/videos to disk, returns paths and attribution |
| Attribution lines in plain text, Markdown, or HTML |
| Remaining quota and session cache stats |
A typical session
search_photos "cozy cabin interior warm light"
→ 6 result lines + 6 thumbnails; the model looks and picks #2932401
download_media [{"type": "photo", "id": 2932401}]
→ ✓ pexels-photo-2932401.jpg (4.1 MB) — Photo by Jane Doe — https://www.pexels.com/photo/...Setup
Requires Node 18+ and a free Pexels API key.
git clone https://github.com/fkilter/pexels-mcp-pro.git
cd pexels-mcp-pro
npm install && npm run buildClaude Code
claude mcp add pexels --env PEXELS_API_KEY=your_key -- node /path/to/pexels-mcp-pro/dist/index.jsClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"pexels": {
"command": "node",
"args": ["/path/to/pexels-mcp-pro/dist/index.js"],
"env": {
"PEXELS_API_KEY": "your_key"
}
}
}
}You can also put the key in a .env file next to the package (see .env.example); .env is gitignored. The optional PEXELS_DOWNLOAD_DIR variable sets the default target directory for download_media.
Debugging
npm run inspectThis opens the MCP Inspector against the built server.
License
MIT for this server. Media from Pexels is covered by the Pexels license: free to use, attribution appreciated but not required. get_attribution generates the credit line.
Available Tools
13 toolsapi_statusAPI statusA
Pexels quota remaining, reset time, and this session's cache stats. Thumbnails and downloads never consume quota.
Inputs: no named parameters.
batch_searchBatch searchA
Run up to 6 search queries in parallel in a single call (photos or videos), deduplicated across queries. Ideal for gathering candidates for a multi-scene piece of content in one shot.
Inputs: queries (required), media, previews, per_query, +2 more.
collection_mediaCollection mediaB
List media inside a collection (photos and/or videos), compact format + inline thumbnails.
Inputs: id (required), page, type, per_page, +2 more.
curated_photosCurated photosB
Pexels' hand-curated photo feed (fresh, high quality). Same compact format + inline thumbnails as search_photos.
Inputs: page, per_page, previews, preview_height.
download_mediaDownload mediaA
Download one or more photos/videos by #id to a local directory (default ./pexels-media, override with directory or the PEXELS_DOWNLOAD_DIR env var). Streams to disk, returns file paths, sizes, and ready-to-use attribution lines. Downloads don't consume API quota.
Inputs: items (required), directory, photo_size, video_quality.
featured_collectionsFeatured collectionsB
List Pexels featured collections (themed sets of media). Use collection_media with a collection id to browse one.
Inputs: page, per_page.
get_attributionGet attributionA
Generate attribution lines for used media (Pexels license: free to use, attribution appreciated but not required). Styles: plain, markdown, html.
Inputs: items (required), style.
get_mediaGet full media detailsA
Full metadata for one photo or video by #id: all source/download URLs, video files with fps and resolutions, Pexels page URL. Use only when you need URLs or exact file variants — search lines + previews are enough for choosing.
Inputs: id (required), type (required).
popular_videosPopular videosB
Pexels' current popular videos, with optional min-resolution/duration constraints. Compact format + inline poster thumbnails.
Inputs: page, per_page, previews, min_width, +4 more.
preview_photosPreview photos by idA
Fetch inline thumbnails for specific photo #ids (from earlier searches — costs no API quota for already-seen ids). Use a larger height for a closer look at finalists.
Inputs: ids (required), height.
search_photosSearch photosA
Search Pexels photos. Returns one compact line per photo (#id, dimensions, photographer, alt, avg color) plus inline thumbnails by default so you can visually validate matches immediately without downloading anything.
Inputs: query (required), page, size, color, +5 more.
search_videosSearch videosA
Search Pexels videos. Returns one compact line per video (#id, dimensions, duration, qualities, frame count) plus inline poster thumbnails by default. Use video_storyboard on a candidate to see frames from inside the clip before downloading.
Inputs: query (required), page, size, locale, +6 more.
video_storyboardVideo storyboardA
Return the poster plus evenly-sampled preview frames from inside a video as inline images — validate motion/content/framing of a clip without downloading it. Costs no API quota for videos already seen in a search.
Inputs: id (required), frames, height.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool has a distinct, non-overlapping purpose: search, batch search, preview, storyboard, curated/popular feeds, collections, metadata retrieval, download, attribution, and status. No ambiguity between tools.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., search_photos, get_media, download_media), making the API predictable and easy to navigate.
13 tools is well-scoped for a media integration server, covering the full discovery-to-download workflow without unnecessary bloat or missing core functionality.
The tool set covers the complete media lifecycle: search (including batch), curation, preview, metadata retrieval, download, and attribution. No obvious gaps for typical usage.
Maintenance
Related MCP Connectors
Holiday photo MCP server: list and fetch personal holiday photos inline in Claude chat.
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
MCP server for Google Veo AI video generation
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that enables AI agents to search, retrieve, and curate free stock photos and videos from Pexels, with tools, resources, and prompts for easy integration.8MIT
- AlicenseAqualityDmaintenanceMCP server that allows AI coding agents to search, download, and convert stock photos from Pexels, Unsplash, and Pixabay into WebP format for direct use in web development projects.334 npm5MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to search for royalty-free images from Pexels and Unsplash using natural language, returning structured results with metadata.574 npm1MIT
- AlicenseAqualityCmaintenanceA 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.9529 npm3MIT