npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-pexels-photos

v1.0.0

Published

MCP server for searching photos using Pexels API

Readme

MCP Pexels Photo Search Server

MCP (Model Context Protocol) сервер для поиска фотографий с использованием Pexels API. Сервер предоставляет инструмент для поиска высококачественных изображений по текстовому описанию.

Особенности

  • 🔍 Поиск фотографий через Pexels API
  • ✅ Валидация поискового запроса (максимум 3 слова)
  • 📄 Пагинация результатов
  • 🎨 Возврат различных размеров изображений
  • 🔒 Безопасная обработка ошибок
  • 📦 Готов к публикации на npm

Установка

Через npm (после публикации)

npm install -g mcp-pexels-photos

Локальная разработка

git clone <repository-url>
cd mcp-pexels-photos
npm install
npm run build

Настройка

  1. Получите API ключ от Pexels
  2. Установите переменную окружения:
export PEXELS_API_KEY="your_api_key_here"

Или создайте файл .env:

PEXELS_API_KEY=your_api_key_here

Использование

Запуск через npx (после публикации)

npx mcp-pexels-photos

Локальный запуск без компиляции

npx tsx src/index.ts

Запуск скомпилированной версии

npm run build
npm start

Конфигурация MCP клиента

Claude Desktop

Добавьте в claude_desktop_config.json:

{
  "mcpServers": {
    "pexels-photos": {
      "command": "npx",
      "args": ["mcp-pexels-photos"],
      "env": {
        "PEXELS_API_KEY": "your_api_key_here"
      }
    }
  }
}

Локальная разработка

{
  "mcpServers": {
    "pexels-photos": {
      "command": "npx",
      "args": ["tsx", "/path/to/your/project/src/index.ts"],
      "env": {
        "PEXELS_API_KEY": "your_api_key_here"
      }
    }
  }
}

API

Инструмент: search_photos

Поиск фотографий по текстовому запросу.

Параметры:

  • query (обязательный): Поисковый запрос (максимум 3 слова)
  • per_page (опциональный): Количество результатов (1-80, по умолчанию 10)
  • page (опциональный): Номер страницы (по умолчанию 1)

Пример использования:

{
  "name": "search_photos",
  "arguments": {
    "query": "sunset mountains",
    "per_page": 5,
    "page": 1
  }
}

Ответ:

{
  "query": "sunset mountains",
  "total_results": 1250,
  "page": 1,
  "per_page": 5,
  "photos": [
    {
      "id": 123456,
      "width": 1920,
      "height": 1080,
      "photographer": "John Doe",
      "photographer_url": "https://www.pexels.com/@johndoe",
      "avg_color": "#FF6B35",
      "alt": "Beautiful sunset over mountains",
      "urls": {
        "original": "https://images.pexels.com/photos/123456/pexels-photo-123456.jpeg",
        "large": "https://images.pexels.com/photos/123456/pexels-photo-123456.jpeg?auto=compress&cs=tinysrgb&h=650&w=940",
        "medium": "https://images.pexels.com/photos/123456/pexels-photo-123456.jpeg?auto=compress&cs=tinysrgb&h=350",
        "small": "https://images.pexels.com/photos/123456/pexels-photo-123456.jpeg?auto=compress&cs=tinysrgb&h=130",
        "tiny": "https://images.pexels.com/photos/123456/pexels-photo-123456.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&h=200&w=280"
      },
      "pexels_url": "https://www.pexels.com/photo/beautiful-sunset-over-mountains-123456/"
    }
  ]
}

Разработка

Структура проекта

src/
  index.ts          # Основной файл сервера
package.json         # Конфигурация npm
tsconfig.json        # Конфигурация TypeScript
README.md           # Документация

Скрипты

  • npm run build - Компиляция TypeScript
  • npm run dev - Запуск в режиме разработки
  • npm start - Запуск скомпилированной версии
  • npm run prepublishOnly - Автоматическая компиляция перед публикацией

Требования

  • Node.js >= 18.0.0
  • API ключ от Pexels

Ограничения

  • Поисковый запрос ограничен 3 словами
  • Максимум 80 результатов на страницу
  • Соблюдение лимитов API Pexels

Лицензия

MIT

Поддержка

Для получения поддержки создайте issue в репозитории проекта.