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.
To install and use the Pollinations MCP Server, you'll need:
git clone https://github.com/bendusy/pollinations-mcp.git
cd pollinations-mcp
npm install
npm run build
To run the server in standalone mode:
npm start
The server will start and listen for MCP client connections via standard input/output (stdio).
Cline is an AI terminal that supports the MCP protocol and works well with this server. To set it up:
Install and start Cline
Open Cline's configuration file, typically located at:
%APPDATA%\Cline\config.json
~/Library/Application Support/Cline/config.json
~/.config/Cline/config.json
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"
]
}
}
Use Pollinations to generate an image: beautiful sunset over ocean with palm trees
The generate_image
tool creates images using Pollinations.ai and returns a URL.
Parameters:
prompt
(required): Description of the image to generatewidth
(optional): Image width in pixels (default: 1024)height
(optional): Image height in pixels (default: 1024)seed
(optional): Random seed value for consistent generationmodel
(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:
The download_image
tool downloads a Pollinations.ai generated image to a local file.
Parameters:
url
(required): URL of the image to downloadoutput_path
(optional): Path to save the image (default: 'image.jpg')The generate_text
tool creates text content using Pollinations.ai.
Parameters:
prompt
(required): Text prompt for generationmodel
(optional): Model to use (default: 'openai')seed
(optional): Random seed valuesystem
(optional): System prompt for setting AI behaviorjson
(optional): Return JSON-formatted response if true (default: false)private
(optional): Make response private (default: false)flux
(default): All-purpose text-to-image modelvariation
: For generating image variationsdreamshaper
: Dreamy style imagesanything
: Anime-style imagespixart
: High-quality illustration styleopenai
(default): OpenAI's language modelsmistral
: Mistral language modelsgemini
: Google's Gemini modelshttps://image.pollinations.ai/prompt/{prompt}?{parameters}
Example:
https://image.pollinations.ai/prompt/beautiful%20sunset?width=1024&height=1024&nologo=true
https://text.pollinations.ai/{prompt}?{parameters}
Example:
https://text.pollinations.ai/Tell%20me%20about%20artificial%20intelligence?model=openai
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.
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"
]
}
}
}
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.
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.