@pollinations/mcp
v2.1.0
Published
Model Context Protocol (MCP) server for pollinations.ai - image, text, audio & video generation
Readme
pollinations.ai MCP Server
A Model Context Protocol server for pollinations.ai. Lets MCP-capable hosts (Claude Desktop, Cursor, Windsurf, …) generate images, videos, text, and audio, plus check the authenticated key's Pollen balance and usage.
All calls go through https://gen.pollinations.ai. Models, voices, and pricing are read live from the registry — no hardcoded enums.
Quick Start
# Run directly with npx (no installation required)
npx @pollinations/mcpOr install globally:
npm install -g @pollinations/mcp
pollinations-mcpAuthentication
Get your API key at enter.pollinations.ai, or use BYOP to let users bring their own pollen (supports web redirects and device flow for CLIs).
Key types:
pk_(publishable) — client-safe, rate-limited (1 pollen per IP per hour)sk_(secret) — server-side only, no rate limits, can spend Pollen
Set your key via environment variable or the setApiKey tool:
export POLLINATIONS_API_KEY=sk_your_key_here
npx @pollinations/mcpAvailable Tools
Image & Video Generation
| Tool | Description |
| -------------------- | ---------------------------------------------------------- |
| generateImageUrl | Generate a shareable image URL from a text prompt |
| generateImage | Generate an image and return base64 data |
| generateImageBatch | Generate multiple images in parallel (best with sk_ keys)|
| generateVideo | Generate a video and return base64 data |
| generateVideoUrl | Generate a shareable video URL from a text prompt |
| describeImage | Vision analysis of an image URL |
| analyzeVideo | Analyze YouTube videos or video URLs |
| listImageModels | List available image & video models (live) |
Common image parameters: prompt, model, width, height, seed, enhance, negative_prompt, quality, image (for image-to-image), transparent. Common video parameters: model, duration, aspectRatio, audio. Call listImageModels for the current model set and per-model capabilities.
Text Generation
| Tool | Description |
| ---------------- | ------------------------------------------------- |
| generateText | Simple text generation from a prompt |
| chatCompletion | OpenAI-compatible chat completions + tool calling |
| webSearch | Web-grounded answers (perplexity, gemini-search) |
| listTextModels | List available text models (live) |
| getPricing | Per-model pricing (text / image / audio) |
Call listTextModels for the current model set, aliases, and capabilities (reasoning, tools, audio output, etc.).
Audio
| Tool | Description |
| ------------------ | ---------------------------------------- |
| respondAudio | AI responds to a prompt with speech |
| sayText | Text-to-speech (verbatim) |
| transcribeAudio | Transcribe audio (gemini-large) |
| listAudioVoices | List available voices (live) |
Call listAudioVoices for the current voice list. Output formats: mp3, wav, flac, opus, pcm16.
Auth Tools
| Tool | Description |
| ------------- | ------------------------------------ |
| setApiKey | Set the API key for this session |
| getKeyInfo | Check stored key type/prefix (local) |
| clearApiKey | Remove the stored key |
Account
| Tool | Description |
| ------------ | ---------------------------------------------------------------------------- |
| getBalance | Remaining Pollen for the authenticated key (requires account:usage) |
| getUsage | Per-request history, or daily aggregate when daily: true (account:usage) |
Claude Desktop Integration
npx @pollinations/mcp install-claude-mcpOr manually add to your Claude Desktop config:
{
"mcpServers": {
"pollinations": {
"command": "npx",
"args": ["@pollinations/mcp"],
"env": {
"POLLINATIONS_API_KEY": "sk_your_key_here"
}
}
}
}Examples
Generate an image of a sunset over mountains using the flux model.
Create a 6-second video of waves crashing on a beach using veo.
Have a chatCompletion conversation about the weather, with the ability to call a weather API.
Say "Hello, welcome to pollinations.ai!" using the nova voice.Testing
POLLINATIONS_API_KEY=sk_… npm run testSpawns the server over stdio, lists tools, and exercises a small live slice (auth, text, image URL, balance). Skips authenticated calls when the env var is unset.
System Requirements
- Node.js 18.0.0 or higher
API Reference
All requests go through https://gen.pollinations.ai. Full API docs: gen.pollinations.ai/docs.
License
MIT
