pixabay-mcp
v0.3.0
Published
A Model Context Protocol server for Pixabay image search
Downloads
97
Maintainers
Readme
pixabay-mcp MCP Server
A Model Context Protocol server for Pixabay image and video search
This is a TypeScript-based MCP server that provides access to the Pixabay image and video APIs. It demonstrates core MCP concepts by providing:
- Tools for searching images and videos on Pixabay
- Formatted results with image/video URLs and metadata
- Error handling for API requests
Features
Tools
search_pixabay_images- Search for images on Pixabay- Takes a search query as required parameter
- Optional parameters for image type, orientation, and results per page
- Returns formatted list of image results with URLs
search_pixabay_videos- Search for videos on Pixabay- Takes a search query as required parameter
- Optional parameters for video type, orientation, results per page, and min/max duration filters
- Returns formatted list of video results with representative download URLs
Configuration
- Requires a Pixabay API key set as environment variable
PIXABAY_API_KEY - Safe search enabled by default for both image and video requests
- Error handling for API issues and invalid parameters
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchInstallation
Option 1: Using npx (Recommended)
Add this to your Claude Desktop configuration:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"pixabay-mcp": {
"command": "npx",
"args": ["pixabay-mcp@latest"],
"env": {
"PIXABAY_API_KEY": "your_api_key_here"
}
}
}
}Option 2: Local Installation
- Clone and build the project:
git clone https://github.com/zym9863/pixabay-mcp.git
cd pixabay-mcp
npm install
npm run build- Add the server config:
{
"mcpServers": {
"pixabay-mcp": {
"command": "/path/to/pixabay-mcp/build/index.js",
"env": {
"PIXABAY_API_KEY": "your_api_key_here"
}
}
}
}API Key Setup
Get your Pixabay API key from https://pixabay.com/api/docs/ and set it in the configuration above. The same key grants access to both image and video endpoints.
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
