Логотип Pollinations Multimodal

Pollinations Multimodal

Организация
pinkpixel-dev

An MCP server that enables AI assistants to generate images, text, and audio through the Pollinations APIs. Please see the newer MCP server, Nectar-MCP. Link below

Издательpinkpixel-dev
РепозиторийMCPollinations
ЯзыкJavaScript
Форки
14
Звёзды
39
Доступные инструменты
9
Тип транспортаstdio
Категории
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    Pollinations Multimodal предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 9

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 39, форки: 14 — в связанном репозитории.

This server is archived as it no longer works with Pollinations newer API. Please see Nectar-MCP for my new Pollinations MCP server, specifically for image generation, image editing, and video generation.

MCPollinations Multimodal MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to generate images, text, and audio through the Pollinations APIs

smithery badge Verified on MseeP

Features

  • Generate image URLs from text prompts
  • Generate images and return them as base64-encoded data AND save as png, jpeg, jpg, or webp (default: png)
  • Generate text responses from text prompts
  • Generate audio responses from text prompts
  • List available image and text generation models
  • No authentication required
  • Simple and lightweight
  • Compatible with the Model Context Protocol (MCP)

System Requirements

  • Node.js: Version 14.0.0 or higher
    • For best performance, we recommend Node.js 16.0.0 or higher
    • Node.js versions below 16 use an AbortController polyfill

Quick Start

Installing via Smithery

To install mcpollinations for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @pinkpixel-dev/mcpollinations --client claude

The easiest way to use the MCP server:

bash
# Run directly with npx (no installation required)
npx @pinkpixel/mcpollinations

If you prefer to install it globally:

bash
# Install globally
npm install -g @pinkpixel/mcpollinations

# Run the server
mcpollinations
# or
npx @pinkpixel/mcpollinations

Or clone the repository:

bash
# Clone the git repository
git clone https://github.com/pinkpixel-dev/mcpollinations.git
# Run the server
mcpollinations
# or
npx @pinkpixel/mcpollinations
# or run directly
node /path/to/MCPollinations/pollinations-mcp-server.js

MCP Integration

To integrate the server with applications that support the Model Context Protocol (MCP):

  1. Generate an MCP configuration file:
bash
# If installed globally
npx @pinkpixel/mcpollinations generate-config

# Or run directly
node /path/to/MCPollinations/generate-mcp-config.js

Quick MCP Config (env)

If you prefer to skip the generator, copy this into your MCP client config:

json
{
  "mcpollinations": {
    "command": "npx",
    "args": ["-y", "@pinkpixel/mcpollinations"],
    "env": {
      "token": "YOUR_TOKEN_OPTIONAL",
      "referrer": "your-app-or-domain-optional",
      "IMAGE_MODEL": "flux",
      "IMAGE_WIDTH": "1024",
      "IMAGE_HEIGHT": "1024",
      "IMAGE_ENHANCE": "true",
      "IMAGE_SAFE": "false",
      "TEXT_MODEL": "openai",
      "TEXT_TEMPERATURE": "0.7",
      "TEXT_TOP_P": "0.9",
      "TEXT_SYSTEM": "",
      "AUDIO_VOICE": "alloy",
      "OUTPUT_DIR": "./mcpollinations-output"
    }
  }
}
  1. Follow the prompts to customize your configuration or use the defaults.

    • Set an output directory (relative paths recommended for portability)
      • Windows users: Consider using absolute paths (e.g., C:\Users\YourName\Pictures\MCPollinations) for more reliable file saving
    • Configure optional authentication (token, referrer) under env
    • Configure default parameters for image generation (with a list of available models, dimensions, etc.)
    • Configure default parameters for text generation (with a list of available models)
    • Configure default parameters for audio generation (voice)
  2. Copy the generated mcp.json file to your application's MCP settings .json file.

  3. Restart your application.

After integration, you can use commands like:

"Generate an image of a sunset over the ocean using MCPollinations"

Authentication (Optional)

MCPollinations supports optional authentication to provide access to more models and better rate limits. The server works perfectly without authentication (free tier), but users with API tokens can get enhanced access.

Configuration Methods

Method 1: Environment Variables (Recommended for security)

bash
# Set environment variables before running the server
export POLLINATIONS_TOKEN="your-api-token"
export POLLINATIONS_REFERRER="https://your-domain.com"

# Then run the server
npx @pinkpixel/mcpollinations

Method 2: MCP Configuration File (env) When generating your MCP configuration, place auth inside env so your MCP client passes them as environment variables to the server process:

json
{
  "mcpollinations": {
    "command": "npx",
    "args": ["-y", "@pinkpixel/mcpollinations"],
    "env": {
      "token": "your-api-token",
      "referrer": "your-app-or-domain"
    }
  }
}

You can also provide POLLINATIONS_TOKEN and POLLINATIONS_REFERRER instead; the server recognizes both forms. Using token and referrer inside env is recommended for MCP configs.

Authentication Parameters

  • token (optional): Your Pollinations API token for enhanced access
  • referrer (optional): Your domain/application referrer URL

Both parameters are completely optional. Leave them empty or unset to use the free tier.

Using Your Configuration Settings

MCPollinations respects your MCP configuration settings placed in env as defaults. When you ask an AI assistant to generate content:

  • Your configured models, output directories, and parameters are used automatically
  • To override: Specifically instruct the AI to use different settings
    • "Generate an image using the kontext model"
    • "Save this image to my Desktop folder"
    • "Use a temperature of 1.2 for this text generation"

Example Instructions:

  • ✅ "Generate a sunset image" → Uses your configured model and output directory
  • ✅ "Generate a sunset image with the flux model" → Overrides model only
  • ✅ "Generate a sunset image and save it to C:\Pictures" → Overrides output path only

This ensures your preferences are always respected unless you specifically want different settings for a particular request.

Troubleshooting

"AbortController is not defined" Error

If you encounter this error when running the MCP server:

ReferenceError: AbortController is not defined

This is usually caused by running on an older version of Node.js (below version 16.0.0). Try one of these solutions:

  1. Update Node.js (recommended):

    • Update to Node.js 16.0.0 or newer
  2. Use Global Installation

    • Update to the latest version of the package:
    bash
    npm install -g @pinkpixel/mcpollinations
    # Run with npx
    npx @pinkpixel/mcpollinations
  3. Install AbortController manually:

    • If for some reason the polyfill doesn't work:
    bash
    npm install node-abort-controller

Check Your Node.js Version

To check your current Node.js version:

bash
node --version

If it shows a version lower than 16.0.0, consider upgrading for best compatibility.

Available Tools

The MCP server provides the following tools:

Image Generation Tools

  1. generateImageUrl - Generates an image URL from a text prompt
  2. generateImage - Generates an image, returns it as base64-encoded data, and saves it to a file by default (PNG format)
  3. editImage - NEW! Edit or modify existing images based on text prompts
  4. generateImageFromReference - NEW! Generate new images using existing images as reference
  5. listImageModels - Lists available models for image generation

Text & Audio Tools

  1. respondText - Responds with text to a prompt using text models (customizable parameters)
  2. respondAudio - Generates an audio response to a text prompt (customizable voice parameter)
  3. listTextModels - Lists available models for text generation
  4. listAudioVoices - Lists all available voices for audio generation

Text Generation Details

Available Parameters

The respondText tool supports several parameters for fine-tuning text generation:

  • model: Choose from available text models (use listTextModels to see current options)
  • temperature (0.0-2.0): Controls randomness in the output
    • Lower values (0.1-0.7) = more focused and deterministic
    • Higher values (0.8-2.0) = more creative and random
  • top_p (0.0-1.0): Controls diversity via nucleus sampling
    • Lower values = more focused on likely tokens
    • Higher values = considers more token possibilities
  • system: System prompt to guide the model's behavior and personality

Customizing Text Generation

javascript
// Example options for respondText
const options = {
  model: "openai",           // Model selection
  temperature: 0.7,          // Balanced creativity
  top_p: 0.9,               // High diversity
  system: "You are a helpful assistant that explains things clearly and concisely."
};

Configuration Examples

In your MCP configuration, set defaults under env so the server uses them automatically:

json
{
  "mcpollinations": {
    "env": {
      "TEXT_MODEL": "openai",
      "TEXT_TEMPERATURE": "0.7",
      "TEXT_TOP_P": "0.9",
      "TEXT_SYSTEM": "You are a helpful coding assistant."
    }
  }
}

Image-to-Image Generation (NEW!)

MCPollinations now supports powerful image-to-image generation with two specialized tools:

editImage Tool

Perfect for modifying existing images:

  • Remove objects: "remove the cat from this image"
  • Add elements: "add a dog to this scene"
  • Change backgrounds: "replace the background with mountains"
  • Style modifications: "make the lighting more dramatic"

generateImageFromReference Tool

Perfect for creating variations and new styles:

  • Style transfer: "make this photo look like a painting"
  • Format changes: "convert this to a cartoon style"
  • Creative variations: "create a futuristic version of this"
  • Artistic interpretations: "make this look like a sketch"

Supported Models

  • kontext: Specialized model optimized for image-to-image tasks
  • nanobanana: New Google model supporting both text-to-image and image-to-image generation
  • seedream: New ByteDance model supporting both text-to-image and image-to-image generation

Multi-reference images: editImage and generateImageFromReference accept imageUrl as a single URL or an array of URLs. The server encodes arrays as the comma-separated image parameter used by the API. Ordering matters; kontext uses only the first image, nanobanana is safe up to ~4 refs, and seedream supports up to 10.

Important: URLs only. The image-to-image tools require publicly accessible HTTP(S) URLs. Local file paths, file uploads, and base64/data URLs are not supported by this MCP server (it does not upload files). If you need to work from a local image, host it somewhere accessible (e.g., a temporary file host, object storage, or a raw link in a repo) and pass the URL.

Example Usage

javascript
// Edit an existing image
const editResult = await editImage(
  "change the background to a sunset beach",
  "https://example.com/photo.jpg",
  "nanobanana"  // or "kontext", "seedream"
);

// Generate from reference
const referenceResult = await generateImageFromReference(
  "make this into a watercolor painting",
  "https://example.com/photo.jpg",
  "seedream"  // or "kontext", "nanobanana"
);

Image Generation Details

Default Behavior

When using the generateImage tool:

  • Images are saved to disk by default as PNG files
  • The default save location is the current working directory where the MCP server is running
  • The 'flux' model is used by default
  • A random seed is generated by default for each image (ensuring variety)
  • Base64-encoded image data is always returned, regardless of whether the image is saved to a file

Customizing Image Generation

javascript
// Example options for generateImage
const options = {
  // Model selection (defaults to 'flux')
  // Available models: "flux", "turbo", "kontext", "nanobanana", "seedream"
  model: "flux",

  // Image dimensions
  width: 1024,
  height: 1024,

  // Generation options
  seed: 12345,  // Specific seed for reproducibility (defaults to random)
  enhance: true,  // Enhance the prompt using an LLM before generating (defaults to true)
  safe: false,  // Content filtering (defaults to false)

  // File saving options
  saveToFile: true,  // Set to false to skip saving to disk
  outputPath: "/path/to/save/directory",  // Custom save location
  fileName: "my_custom_name",  // Without extension
  format: "png"  // png, jpeg, jpg, or webp
};

Where Images Are Saved

When using Claude or another application with the MCP server:

  1. Images are saved in the current working directory of where the MCP server is running, not where Claude or the client application is installed.

  2. If you start the MCP server manually from a specific directory, images will be saved there by default.

  3. If Claude Desktop launches the MCP server automatically, images will be saved in Claude Desktop's working directory (typically in an application data folder).

💡 Windows Users: For reliable file saving on Windows, use absolute paths in your MCP configuration instead of relative paths (e.g., C:\Users\YourName\Pictures\MCPollinations instead of ./mcpollinations-output). Relative paths may not resolve as expected depending on the working directory context.

Finding Your Generated Images

  • The response from Claude after generating an image includes the full file path where the image was saved
  • You can specify a familiar location using the outputPath parameter
  • Best practice: Ask Claude to save images to an easily accessible folder like your Pictures or Downloads directory

Unique Filenames

The MCP server ensures that generated images always have unique filenames and will never overwrite existing files:

  1. Default filenames include:

    • A sanitized version of the prompt (first 20 characters)
    • A timestamp
    • A random suffix
  2. Custom filenames are also protected:

    • If you specify a filename and a file with that name already exists, a numeric suffix will be added automatically
    • For example: sunset.png, sunset_1.png, sunset_2.png, etc.

This means you can safely generate multiple images with the same prompt or filename without worrying about overwriting previous images.

Accessing Base64 Data

Even when saving to a file, the base64-encoded image data is always returned and can be used for:

  • Embedding in web pages (<img src="data:image/png;base64,..." />)
  • Passing to other services or APIs
  • Processing in memory without filesystem operations
  • Displaying in applications that support data URIs

For Developers

If you want to use the package in your own projects:

bash
# Install as a dependency
npm install @pinkpixel/mcpollinations

# Import in your code
import { generateImageUrl, generateImage, repsondText, respondAudio, listTextModels, listImageModels, listAudioVoices } from '@pinkpixel/mcpollinations';

Установка

TypingMind
Требования:

Node.js 18+

{
  "mcpServers": {
    "mcpollinations": {
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/mcpollinations"
      ]
    }
  }
}

Доступные инструменты

  • generateImageUrl

    Generate an image URL from a text prompt. User-configured settings in MCP config will be used as defaults unless specifically overridden.

  • generateImage

    Generate an image, return the base64-encoded data, and save to a file by default. User-configured settings in MCP config will be used as defaults unless specifically overridden.

  • editImage

    Edit or modify an existing image based on a text prompt. User-configured settings in MCP config will be used as defaults unless specifically overridden.

  • generateImageFromReference

    Generate a new image using an existing image as reference. User-configured settings in MCP config will be used as defaults unless specifically overridden.

  • listImageModels

    List available image models

  • respondAudio

    Generate an audio response to a text prompt and play it through the system

  • listAudioVoices

    List all available audio voices for text-to-speech generation

  • respondText

    Respond with text to a prompt using the Pollinations Text API. User-configured settings in MCP config will be used as defaults unless specifically overridden.

  • listTextModels

    List available text models

Используйте MCP Pollinations Multimodal с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения Pollinations Multimodal вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте Pollinations Multimodal как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для Pollinations Multimodal.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "pollinations-multimodal": {
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/mcpollinations"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для Pollinations Multimodal, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для Pollinations Multimodal.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью Pollinations Multimodal?
Pollinations Multimodal
Конечно. Я всё прочитал.
Вот что я нашёл с помощью Pollinations Multimodal.

Часто задаваемые вопросы

Для чего используется сервер MCP Pollinations Multimodal?

Pollinations Multimodal — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP Pollinations Multimodal с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать Pollinations Multimodal с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP Pollinations Multimodal с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив Pollinations Multimodal, вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP Pollinations Multimodal к TypingMind?

Pollinations Multimodal работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP Pollinations Multimodal в TypingMind?

Pollinations Multimodal предоставляет инструменты MCP (9), которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP Pollinations Multimodal?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если Pollinations Multimodal требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇