UM

unlock-mcp/pixabay-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 4 forks 质量 66 趋势 18MIT

MCP Server for Pixabay API - Search and retrieve royalty-free images and videos

概览

A Model Context Protocol (MCP) server that provides access to the Pixabay API for searching and retrieving royalty-free images and videos. 📖 - Step-by-step tutorial with examples and troubleshooting - : Search through millions of royalty-free images - : Find high-quality stock videos - : Filter by category, orientation, color, size, and more - : Get specific images or videos by ID - : Access different image sizes and video qualities You'll need a Pixabay API key to use this server: 1. Sign up at Pixabay 2. Go to Pixabay API page 3. Get your API key 4. (recommended for security): (add to ~/.bashrc, ~/.zshrc, or ~/.bash_profile): After setting the environment variable, restart your terminal or run: Add the server to your Claude Desktop configuration file:

README

以下为原文 README 节选,完整内容请查看原文。

Pixabay MCP Server

A Model Context Protocol (MCP) server that provides access to the Pixabay API for searching and retrieving royalty-free images and videos.

📖 Complete Setup and Usage Guide - Step-by-step tutorial with examples and troubleshooting

Features

  • Image Search: Search through millions of royalty-free images
  • Video Search: Find high-quality stock videos
  • Advanced Filtering: Filter by category, orientation, color, size, and more
  • Individual Lookup: Get specific images or videos by ID
  • Multiple Formats: Access different image sizes and video qualities

Installation

  1. Clone this repository:
git clone 
cd pixabay-mcp-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

API Key Setup

You’ll need a Pixabay API key to use this server:

  1. Sign up at Pixabay
  2. Go to Pixabay API page
  3. Get your API key
  4. Set the system environment variable (recommended for security):

For bash/zsh (add to ~/.bashrc, ~/.zshrc, or ~/.bash_profile):

export PIXABAY_API_KEY="your-api-key-here"

For fish (add to ~/.config/fish/config.fish):

set -gx PIXABAY_API_KEY "your-api-key-here"

For Windows (Command Prompt):

setx PIXABAY_API_KEY "your-api-key-here"

After setting the environment variable, restart your terminal or run:

source ~/.zshrc  # or your shell's config file

Claude Desktop Configuration

Add the server to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

Recommended (using system environment variable):

{
  "mcpServers": {
    "pixabay": {
      "command": "node",
      "args": ["/path/to/pixabay-mcp-server/dist/index.js"]
    }
  }
}

Alternative (less secure - API key in config file):

{
  "mcpServers": {
    "pixabay": {
      "command": "node",
      "args": ["/path/to/pixabay-mcp-server/dist/index.js"],
      "env": {
        "PIXABAY_API_KEY": "your-api-key-here"
      }
    }
  }
}

Security Note: The recommended approach uses your system environment variable, keeping the API key out of configuration files.

Available Tools

search_images

Search for royalty-free images with various filters:

  • q: Search term (max 100 characters)
  • lang: Language code (default: “en”)
  • image_type: “all”, “photo”, “illustration”, “vector”
  • orientation: “all”, “horizontal”, “vertical”
  • category: Category filter (nature, business, etc.)
  • min_width/min_height: Minimum dimensions
  • colors: Color filter (red, blue, grayscale, etc.)
  • editors_choice: Editor’s Choice awards only
  • safesearch: Safe for all ages
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "pixabay": { "command": "node", "args": ["/path/to/pixabay-mcp-server/dist/index.js"] } } }