Pollinations MCP server

Provides text-to-audio API capabilities for dynamic audio generation through a TypeScript-based server implementation, enabling developers to create programmatic audio experiences.
Back to servers
Provider
Ben Dusy
Release date
Mar 07, 2025
Language
TypeScript
Stats
7 stars

The Pollinations MCP Server allows AI models to access Pollinations.ai's image and text generation capabilities through the Model Context Protocol (MCP). With this server, you can seamlessly integrate powerful image and text generation features into MCP-compatible AI applications.

Installation

Prerequisites

To install and use the Pollinations MCP Server, you'll need:

  1. Clone the repository:
git clone https://github.com/bendusy/pollinations-mcp.git
cd pollinations-mcp
  1. Install the dependencies:
npm install
  1. Build the project:
npm run build

Usage

Starting the Server

To run the server in standalone mode:

npm start

The server will start and listen for MCP client connections via standard input/output (stdio).

Setting Up with Cline (Recommended)

Cline is an AI terminal that supports the MCP protocol and works well with this server. To set it up:

  1. Install and start Cline

  2. Open Cline's configuration file, typically located at:

    • Windows: %APPDATA%\Cline\config.json
    • Mac: ~/Library/Application Support/Cline/config.json
    • Linux: ~/.config/Cline/config.json
  3. Add the following configuration to the mcpServers section:

"mcpServers": {
  "pollinations-mcp": {
    "command": "node",
    "args": [
      "/full/path/to/your/pollinations-mcp/dist/index.js"
    ],
    "disabled": false,
    "autoApprove": [
      "download_image",
      "generate_image",
      "generate_text"
    ]
  }
}

For example, on Windows:

"mcpServers": {
  "pollinations-mcp": {
    "command": "node",
    "args": [
      "C:\\Users\\username\\path\\to\\pollinations-mcp\\dist\\index.js"
    ],
    "disabled": false,
    "autoApprove": [
      "download_image",
      "generate_image",
      "generate_text"
    ]
  }
}
  1. Save the configuration file and restart Cline
  2. You can now use Pollinations image generation in Cline with commands like:
Use Pollinations to generate an image: beautiful sunset over ocean with palm trees

Available Tools

Generate Image

The generate_image tool creates images using Pollinations.ai and returns a URL.

Parameters:

  • prompt (required): Description of the image to generate
  • width (optional): Image width in pixels (default: 1024)
  • height (optional): Image height in pixels (default: 1024)
  • seed (optional): Random seed value for consistent generation
  • model (optional): Model to use (default: 'flux')
  • nologo (optional): Remove watermark if true (default: true)
  • enhance (optional): Apply enhancement filter (default: false)
  • safe (optional): Enable safety filtering (default: false)
  • private (optional): Make image private (default: false)

Prompt Best Practices:

  • Use English for best results
  • Keep prompts concise and specific
  • Use concrete adjectives and nouns rather than abstract concepts
  • Example: "beautiful sunset over ocean with palm trees" works better than "a picture of sunset"

Download Image

The download_image tool downloads a Pollinations.ai generated image to a local file.

Parameters:

  • url (required): URL of the image to download
  • output_path (optional): Path to save the image (default: 'image.jpg')

Generate Text

The generate_text tool creates text content using Pollinations.ai.

Parameters:

  • prompt (required): Text prompt for generation
  • model (optional): Model to use (default: 'openai')
  • seed (optional): Random seed value
  • system (optional): System prompt for setting AI behavior
  • json (optional): Return JSON-formatted response if true (default: false)
  • private (optional): Make response private (default: false)

Supported Models

Image Models

  • flux (default): All-purpose text-to-image model
  • variation: For generating image variations
  • dreamshaper: Dreamy style images
  • anything: Anime-style images
  • pixart: High-quality illustration style

Text Models

  • openai (default): OpenAI's language models
  • mistral: Mistral language models
  • gemini: Google's Gemini models

API Examples

Image Generation URL Format

https://image.pollinations.ai/prompt/{prompt}?{parameters}

Example:

https://image.pollinations.ai/prompt/beautiful%20sunset?width=1024&height=1024&nologo=true

Text Generation URL Format

https://text.pollinations.ai/{prompt}?{parameters}

Example:

https://text.pollinations.ai/Tell%20me%20about%20artificial%20intelligence?model=openai

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