Get the FREE Ultimate OpenClaw Setup Guide →

MCPollinations

A Model Context Protocol (MCP) server that enables AI assistants to generate images, text, and audio through the Pollinations APIs. Supports customizable parameters, image saving, and multiple model options.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add pinkpixel-dev-mcpollinations

How to use

MCPollinations exposes a multimodal MCP server that can generate images, text, and audio via the Pollinations API set. It offers tools to generate image URLs, create images (with options to save as files and return base64 data), edit or reference images, generate text responses, synthesize audio, and list available models and voices. You can integrate it with MCP-enabled assistants by using the provided MCP configuration; defaults can be overridden per request. Typical usage includes asking the agent to generate a sunset image, create descriptive text, or synthesize a spoken response, all while honoring the configured image/text/audio models and output directory. The server supports optional authentication through environment variables or via an MCP config file, which enables access to additional models and higher rate limits when tokens are supplied.

How to install

Prerequisites:

  • Node.js 14.0.0 or higher (Node 16+ recommended for best compatibility)
  • npm (comes with Node.js) or npx

Install and run (quick start):

  1. Install or run directly via npx (no local install required):
npx @pinkpixel/mcpollinations
  1. If you prefer a local installation, install globally and run:
# Global install (optional)
npm install -g @pinkpixel/mcpollinations

# Run the server
mcpollinations
  1. Generate an MCP config file automatically (optional):
# If installed globally
npx @pinkpixel/mcpollinations generate-config

# Or run directly
node /path/to/MCPollinations/generate-mcp-config.js
  1. If you want to run via a local clone:
git clone https://github.com/pinkpixel-dev/mcpollinations.git
cd mcpollinations
# Run the server
mcpollinations
# or
npx @pinkpixel/mcpollinations
# or directly
node pollinations-mcp-server.js

Prerequisite notes:

  • Ensure your Node.js version is 16.x or newer to avoid AbortController compatibility issues.
  • If you encounter AbortController errors, consider upgrading Node.js or installing a polyfill as described in the Troubleshooting section of the README.

Additional notes

Tips and common considerations:

  • You can customize defaults via the env section of your MCP config (token/referrer, image/text/audio models, dimensions, and output directory).
  • If you enable authentication, ensure tokens are kept secure. Prefer environment variables over hard-coded values.
  • The server supports multiple image models (and other outputs). Use listImageModels/listTextModels/listAudioVoices to discover options.
  • When using relative output paths, prefer relative paths for portability; on Windows, absolute paths may improve reliability for saving files.
  • If you update Node.js, you may need to reinstall the MCPollinations package to ensure compatibility with AbortController usage.
  • If you run into deployment issues, verify your environment variables are correctly passed to the process (env keys in the MCP config).
  • The Quick MCP Config example uses npx to run the package without installation; you can also pin a specific version if needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers