Server data from the Official MCP Registry
MCP server for searching Pexels stock photos, videos, and curated collections.
MCP server for searching Pexels stock photos, videos, and curated collections.
Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
9 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: PEXELS_API_KEY
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-developer-ishan-pexels": {
"env": {
"PEXELS_API_KEY": "your-pexels-api-key-here"
},
"args": [
"-y",
"mcp-pexels"
],
"command": "npx"
}
}
}From the project's GitHub README.
A Model Context Protocol server that exposes the Pexels API — free stock photos, videos, and curated collections — as MCP tools that any compatible AI client (Claude Desktop, Claude Code, Cursor, Cline, Continue, etc.) can call directly from a chat.
📦 npm: mcp-pexels · 🏷 Latest release: v1.0.0 · 💻 Source: developer-ishan/mcp-pexels
Photos & videos provided by Pexels.
{
"mcpServers": {
"pexels": {
"command": "npx",
"args": ["-y", "mcp-pexels"],
"env": { "PEXELS_API_KEY": "your_key_here" }
}
}
}
Paste into your MCP client's config, restart, and the nine pexels_* tools are live. Get a free key at https://www.pexels.com/api/.
Once mcp-pexels is connected to an AI client, the agent can pull royalty-free photos and videos straight into its workflow. A few concrete uses:
pexels_popular_videos with size and duration filters.color: "orange".lorem-pixel boxes.Because every response includes a _rateLimit object, the agent can self-throttle and respect the Pexels free-tier quota (200 req/hour, 20 000/month).
| Domain | Tool | What it does |
|---|---|---|
| Photos | pexels_search_photos | Search photos by query with orientation / size / color / locale filters. |
| Photos | pexels_curated_photos | Fetch the Pexels team's real-time curated photo feed. |
| Photos | pexels_get_photo | Retrieve a single photo by its numeric id. |
| Videos | pexels_search_videos | Search videos by query with orientation / size / locale filters. |
| Videos | pexels_popular_videos | Fetch popular videos with optional width / height / duration constraints. |
| Videos | pexels_get_video | Retrieve a single video by its numeric id. |
| Collections | pexels_featured_collections | List Pexels featured collections. |
| Collections | pexels_my_collections | List the authenticated user's own collections. |
| Collections | pexels_collection_media | Retrieve the photos and videos inside a specific collection. |
Each tool response is the raw Pexels JSON merged with a top-level _rateLimit field exposing limit, remaining, and reset (UNIX timestamp).
See docs/tools/ for per-tool parameter tables and example payloads.
All paths below use npx -y mcp-pexels — no global install required. Replace your_key_here with a real Pexels API key.
Option 1 — one-click .mcpb install (recommended). Download the latest mcp-pexels-*.mcpb from the Releases page, double-click the file, paste your Pexels API key when Claude Desktop prompts, and click Install.
Option 2 — manual JSON config. Edit claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"pexels": {
"command": "npx",
"args": ["-y", "mcp-pexels"],
"env": { "PEXELS_API_KEY": "your_key_here" }
}
}
}
Restart Claude Desktop.
claude mcp add pexels -e PEXELS_API_KEY=your_key_here -- npx -y mcp-pexels
Or edit ~/.claude.json directly and add the same mcpServers block as above.
Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):
{
"mcpServers": {
"pexels": {
"command": "npx",
"args": ["-y", "mcp-pexels"],
"env": { "PEXELS_API_KEY": "your_key_here" }
}
}
}
Open the Cline extension settings → MCP Servers → Edit Settings. Add:
{
"mcpServers": {
"pexels": {
"command": "npx",
"args": ["-y", "mcp-pexels"],
"env": { "PEXELS_API_KEY": "your_key_here" }
}
}
}
In ~/.continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-pexels"],
"env": { "PEXELS_API_KEY": "your_key_here" }
}
}
]
}
}
If your client supports stdio MCP servers it just needs command, args, and env. Use the same shape as Cursor / Claude Desktop above. For inspector / debugging:
export PEXELS_API_KEY=your_key_here
npx -y @modelcontextprotocol/inspector npx -y mcp-pexels
This opens a browser UI where you can call each tool interactively.
Once connected, try prompts like:
The agent will pick the appropriate tool, send the right parameters, and include photographer/videographer credit as part of its answer.
| mcp-pexels | Raw Pexels REST API | Image-only general MCP servers | |
|---|---|---|---|
| Photos | ✅ | ✅ | varies |
| Videos | ✅ | ✅ | usually ❌ |
| Collections | ✅ | ✅ | ❌ |
| Rate-limit headers exposed to agent | ✅ | ❌ (raw headers, agent must parse) | ❌ |
| Zod-validated input | ✅ | ❌ | varies |
npx-installable, zero config | ✅ | ❌ | varies |
| Type-safe TS source | ✅ | n/a | varies |
| MIT-licensed | ✅ | n/a | varies |
If you only need photos and you already have a generic image MCP server wired up, that may be enough. If you want first-class video and collection support with rate-limit awareness, this is purpose-built for it.
Sign up at https://www.pexels.com/api/ — keys are issued instantly and the free tier allows 200 requests/hour and 20 000 requests/month.
No. The Pexels API is free, the npm package is free (MIT), and mcp-pexels itself does not call any paid service.
No — the server is a thin wrapper over the Pexels HTTPS API and requires network access.
Yes, per the Pexels license, but you must attribute the platform and (when possible) the photographer. See Attribution.
Claude.ai's web product doesn't yet support stdio MCP servers — only Claude Desktop, Claude Code, and the API do. Anthropic is rolling out browser MCP support, so this should change.
No. Run it locally via npx. Because Pexels API keys are per-user, hosting a shared instance doesn't make sense.
npx always fetches the latest published version. If you've installed globally, run npm update -g mcp-pexels.
The Pexels API surface is fully implemented (9/9 endpoints as of Pexels API v1). New endpoints will be added via PR — see Contributing.
@modelcontextprotocol/inspector?Yes:
export PEXELS_API_KEY=your_key_here
npx -y @modelcontextprotocol/inspector npx -y mcp-pexels
Every tool response includes a _rateLimit object with limit, remaining, and reset (UNIX timestamp). The agent can read this and self-throttle. If Pexels returns 429, the server surfaces it as a PexelsApiError so the agent sees the failure.
It is read from the PEXELS_API_KEY env var on the local process. It never leaves your machine except in Authorization headers to api.pexels.com. Nothing is logged.
fetch and --env-file)git clone https://github.com/developer-ishan/mcp-pexels.git
cd mcp-pexels
npm install
echo "PEXELS_API_KEY=your_key_here" > .env
npm test # 42 mocked vitest cases, no network
npm run build # tsc → dist/
npm run dev # tsx watch
npm run test:watch # vitest in watch mode
npm start # node --env-file=.env dist/index.js
src/
├── index.ts # MCP server entrypoint (stdio)
├── http/
│ ├── client.ts # PexelsClient (injectable fetch for tests)
│ └── types.ts # PexelsApiError, RateLimit, PexelsResponse
├── tools/
│ ├── index.ts # composes the three domain factories
│ ├── photos.ts # 3 photo tools
│ ├── videos.ts # 3 video tools
│ └── collections.ts # 3 collection tools
└── types/
├── tool.ts # defineTool helper + ToolDefinition
├── photos.ts
├── videos.ts
└── collections.ts
tests/
├── helpers/mockClient.ts # makeMockClient() — fake fetch via vitest mocks
├── photos.test.ts # 17 cases
├── videos.test.ts # 13 cases
└── collections.test.ts # 12 cases
Tests construct a PexelsClient with a vi.fn() fetchImpl returned by makeMockClient(responses). No real HTTP is performed. Each tool is exercised for:
Authorization header.PexelsApiError with status and body.This repo uses a tag-driven release workflow (.github/workflows/release.yml):
npm version patch (or minor / major) — creates a commit and tag.git push && git push --tags.NPM_TOKEN repository secret, builds the .mcpb bundle via npm run pack:mcpb, and creates a GitHub release with auto-generated notes that includes the bundle as a downloadable asset.See CHANGELOG.md for version history.
Issues and pull requests welcome. See CONTRIBUTING.md for the development workflow and SECURITY.md to report a vulnerability privately.
If you ship mcp-pexels inside a tool or product, open a PR adding it to the "Used by" list in CONTRIBUTING.md.
smithery.yaml.See docs/MARKETPLACES.md for the submission cheatsheet.
When you use Pexels content, please follow the Pexels API guidelines:
The mcp-pexels package itself is released under the MIT License.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.