Last Updated: September 26, 2025
MCPollinations is a comprehensive Model Context Protocol (MCP) server that enables AI assistants to generate multimodal content through the Pollinations APIs. It serves as a bridge between AI applications and advanced generative AI capabilities for images, text, and audio.
- Project Name: MCPollinations
- Package Name:
@pinkpixel/mcpollinations - Current Version: 1.3.0
- Maintainer: Pink Pixel (pinkpixel.dev)
- License: MIT
- Repository: https://github.com/pinkpixel-dev/mcpollinations
MCPollinations democratizes access to multimodal AI generation by providing:
- 🖼️ Professional Image Generation - Create high-quality images from text prompts
- 🎨 Advanced Image Editing - Modify existing images with natural language instructions
- 📝 Intelligent Text Generation - Generate contextual text responses with fine-tuned parameters
- 🎵 Voice Synthesis - Convert text to natural-sounding speech with multiple voice options
- 🔧 MCP Protocol Compliance - Seamless integration with AI applications like Claude Desktop
- 🎛️ Flexible Configuration - Customizable parameters and optional authentication for enhanced features
MCPollinations follows a service-oriented architecture with a thin proxy design, providing minimal abstraction over the Pollinations API while adding valuable MCP protocol compliance and enhanced functionality.
MCPollinations/
├── pollinations-mcp-server.js # 🚀 Main MCP server entry point
├── src/
│ ├── index.js # 📦 Service exports and API client
│ ├── schemas.js # 🔧 Centralized MCP tool definitions
│ └── services/ # 🎯 Modular service architecture
│ ├── imageService.js # 🎨 Image generation & editing
│ ├── imageSchema.js # 📋 Image tool schemas
│ ├── audioService.js # 🎵 Audio generation
│ ├── audioSchema.js # 📋 Audio tool schemas
│ ├── textService.js # 📝 Text generation
│ └── textSchema.js # 📋 Text tool schemas
├── generate-mcp-config.js # ⚙️ Interactive configuration generator
└── tests/ # 🧪 Testing suite
├── test-mcp-client.js # Basic MCP functionality test
├── test-image-save.js # Image saving test
└── test-list-tools.js # Tool enumeration test
- Service-Schema Pairing: Each service module has a corresponding schema module ensuring consistency between implementation and MCP API contract
- Thin Proxy Design: Minimal abstraction over Pollinations API while adding MCP compliance and enhanced features
- Modular Architecture: Clear separation of concerns between image, text, and audio services
- Configuration-Driven: Comprehensive configuration system supporting various deployment patterns
- Error-First Design: Robust error handling with MCP-compliant error responses
- Node.js: Version 14.0.0+ (16.0.0+ recommended for best performance)
- AbortController: Built-in polyfill for Node.js < 16
- ES Modules: Project uses
"type": "module"
@modelcontextprotocol/sdk: MCP protocol implementationnode-fetch: HTTP client for API requestsplay-sound: Audio playback functionalitynode-abort-controller: AbortController polyfill
- Optional token-based auth for enhanced API access
- Environment variables supported:
token,referrer(preferred for MCPenv)POLLINATIONS_TOKEN,POLLINATIONS_REFERRER(also accepted)
- Graceful fallback to free tier if unset
MCPollinations provides 9 specialized MCP tools across three categories:
-
generateImageUrl- Generate image URLs from text prompts- Models: flux (default), turbo, kontext, nanobanana, seedream
- Customizable dimensions, seeds, enhancement options
-
generateImage- Generate images with file saving- Returns base64 data AND saves to file (PNG default)
- Unique filename generation prevents overwrites
- Supports PNG, JPEG, JPG, WebP formats
-
editImage⭐ New in v1.2.0- Edit existing images with natural language instructions
- Perfect for: removing objects, adding elements, changing backgrounds
- Supports models: kontext (default), nanobanana, seedream
-
generateImageFromReference⭐ New in v1.2.0- Generate new images using existing images as reference
- Perfect for: style transfer, artistic interpretations, format changes
- Supports models: kontext (default), nanobanana, seedream
-
listImageModels- Enumerate available image generation models
-
respondText- Advanced text generation with fine-tuning parameters- Models: openai (default), and others via
listTextModels - Parameters: temperature (randomness), top_p (diversity), system prompts
- Privacy-first: always includes
private=true
- Models: openai (default), and others via
-
listTextModels- Dynamic model listing from Pollinations API
-
respondAudio- Text-to-speech generation- 13 available voices: alloy, echo, fable, onyx, nova, shimmer, coral, verse, ballad, ash, sage, amuch, dan
- Customizable voice instructions for character/style
- Returns base64 audio data
-
listAudioVoices- Enumerate all available voice options
- Auto-Save: Images are automatically saved to disk by default
- Output Directory:
./mcpollinations-output(configurable) - Format Support: PNG (default), JPEG, JPG, WebP
- Unique Naming: Automatic collision avoidance with timestamp and random suffixes
// Default pattern
`${sanitized_prompt}_${timestamp}_${random_suffix}.${format}`
// Custom filename collision handling
`${custom_name}.png` → `${custom_name}_1.png` → `${custom_name}_2.png`- Relative Paths: Default for portability
- Windows Guidance: Absolute paths recommended for reliability
- Directory Creation: Automatic recursive directory creation
-
Direct Usage (No installation required)
npx @pinkpixel/mcpollinations
-
Global Installation
npm install -g @pinkpixel/mcpollinations mcpollinations
-
Smithery Integration (Claude Desktop)
npx -y @smithery/cli install @pinkpixel-dev/mcpollinations --client claude
-
Repository Clone (Development)
git clone https://github.com/pinkpixel-dev/mcpollinations.git
The interactive configuration generator (generate-mcp-config.js) outputs an env-only MCP config and provides:
- ⚙️ Custom output directory (
OUTPUT_DIR) - 🔐 Optional authentication (
token,referrer) - 🎛️ Default parameters for image/text/audio via env keys
- 📁 Platform-specific path guidance
MCPollinations integrates seamlessly with MCP-compatible clients:
{
"mcpServers": {
"mcpollinations": {
"command": "npx",
"args": ["-y", "@pinkpixel/mcpollinations"],
"env": {
"token": "optional-token",
"referrer": "optional-referrer",
"OUTPUT_DIR": "./mcpollinations-output"
}
}
}
}# Start the MCP server
npm start
# Generate MCP configuration interactively
npm run generate-config
# Run tests
npm test # Basic MCP client test
npm run test:image-save # Test image saving functionality
npm run test:list-tools # Test tool listing
# Install globally for system-wide use
npm install -g .- MCP Inspector: Compatible for interactive testing and debugging
- Test Suite: Comprehensive testing for core functionality
- Error Handling: Robust error reporting with detailed messages
- Logging: Structured logging for debugging and monitoring
- Create service function in appropriate
src/services/*Service.jsfile - Define schema in corresponding
src/services/*Schema.jsfile - Export schema from
src/schemas.js - Add tool handler in
pollinations-mcp-server.jsCallToolRequestSchema handler - Update default configuration in
generate-mcp-config.js
Recent Breaking Changes:
- 🚫 Removed
gptimagemodel - No longer supported by Pollinations API - 🚫 Removed transparent background support - Feature discontinued
- ✅ Updated image-to-image operations - Now use
kontextmodel as default
- v1.2.0 (July 2025): Added image-to-image generation tools
- v1.1.3 (July 2025): Enhanced text generation with fine-tuning parameters
- v1.1.2 (July 2025): Optional authentication support added
- v1.0.7 (April 2025): Major update with file saving and comprehensive improvements
- v1.0.6 (April 2025): Node.js compatibility improvements
- v1.0.5 (April 2025): Initial public release
- ✅ Smithery: Official listing and automated installation
- ✅ MCP Clients: Full compatibility with Claude Desktop and other MCP clients
- ✅ CI/CD: GitHub Actions for automated testing and publishing
- ✅ Docker: Containerization support for deployment flexibility
- ✅ NPM: Published package for easy distribution
- 📏 Semantic Versioning: Strict adherence to SemVer principles
- 📝 Comprehensive Documentation: README, CHANGELOG, CONTRIBUTING guides
- 🧪 Testing Suite: Automated tests for core functionality
- 🔍 Error Handling: Robust error management with detailed reporting
- 🔐 Optional Authentication: Token-based enhanced access
- 🛡️ Privacy-First: Default
private=trueparameters - ⚡ Rate Limiting: Graceful handling of API rate limits
- 🔒 Secure Defaults: Safe parameter defaults for content filtering
- 📋 MIT License: Open source with permissive licensing
- 🌐 Cross-Platform: Linux, Windows, macOS compatibility
- 📦 Dependency Management: Minimal, well-maintained dependencies
- 🔄 Backward Compatibility: Careful handling of breaking changes with migration guides
While no formal roadmap exists, potential areas for future development include:
- 🔄 Enhanced Model Support: Integration with new Pollinations models as they become available
- 🎛️ Advanced Configuration: More granular control over generation parameters
- 📊 Usage Analytics: Optional usage tracking for optimization insights
- 🌐 Multi-Language Support: Internationalization for broader adoption
- 🔧 Plugin Architecture: Extensibility for custom functionality
Made with ❤️ by Pink Pixel
"Dream it, Pixel it" ✨