Pixabay MCP server

Provides a bridge to the Pixabay image search API, enabling dynamic image retrieval with flexible filtering options like image type, orientation, and result count.
Back to servers
Provider
zym
Release date
Mar 26, 2025
Language
TypeScript
Stats
2 stars

This MCP server provides access to the Pixabay image API, allowing you to search for images and receive formatted results with image URLs and metadata. It's packaged as a Model Context Protocol (MCP) server that can be integrated with compatible AI systems like Claude.

Installation and Setup

Prerequisites

You'll need to obtain a Pixabay API key from the Pixabay API Documentation page.

Install the Server

npm install
npm run build

Configure API Key

Set your Pixabay API key as an environment variable:

# On Windows
set PIXABAY_API_KEY=your_api_key_here

# On macOS/Linux
export PIXABAY_API_KEY=your_api_key_here

Integrate with Claude Desktop

  1. Locate your Claude Desktop configuration file:

    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the server configuration:

{
  "mcpServers": {
    "pixabay-mcp": {
      "command": "/path/to/pixabay-mcp/build/index.js",
      "env": {
        "PIXABAY_API_KEY": "your_api_key_here"
      }
    }
  }
}

Using the Server

Available Tools

The server provides one main tool:

  • search_pixabay_images: Search for images on Pixabay

Search Parameters

When using the search_pixabay_images tool, you can specify:

  • query (required): The search term for images
  • image_type (optional): Type of image (all, photo, illustration, vector)
  • orientation (optional): Image orientation (all, horizontal, vertical)
  • per_page (optional): Number of results to return (max 200)

Example Usage

When the server is properly configured with Claude, you can ask Claude to search for images using natural language requests like:

  • "Search Pixabay for sunset images"
  • "Find high-quality vector illustrations of cats"
  • "Show me horizontal photos of mountains"

Response Format

The server returns structured results including:

  • Image URLs
  • Image dimensions
  • Photographer information
  • Tags
  • Download counts

Troubleshooting

If you encounter issues:

  1. Verify your API key is correctly set
  2. Ensure the build process completed successfully
  3. Check the configuration path in your Claude Desktop settings

For advanced debugging, you can use the built-in MCP Inspector:

npm run inspector

This will provide a browser interface for inspecting server communications.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later