Content
# MCP Kandinsky
MCP Kandinsky is an MCP (Model Context Protocol) server that provides a tool for generating images using the [Kandinsky](https://www.sberbank.com/promo/kandinsky/) neural network via the official API. Currently, Kandinsky 3.1 is available via the API.
## Features
- Image generation from a text description (prompt)
- Style selection support (DEFAULT, KANDINSKY, UHD, ANIME)
- Negative prompt support
- Image size adjustment (width, height)
- Saving the result to a file with overwrite control
- Explicit specification of the project folder for saving (project_dir)
## Environment variables
To work with MCP Kandinsky, you will need authorization data, which must be stored in environment variables.
- `KANDINSKY_API_KEY` — your API key
- `KANDINSKY_SECRET_KEY` — your Secret key
You can obtain authorization data after registering on the [FUSION BRAIN](https://fusionbrain.ai/) website, in the API section.
### Tariffs
The Kandinsky API provides a free plan with a limit of **100 requests per month**. More information about tariffs and features can be found on the [developer page](https://fusionbrain.ai/developers/).
## How to connect MCP Kandinsky to an agent (Cursor, Windsurf, etc.)
Add the MCP server to the agent's config, for example, to the `.cursor/mcp.json` file or similar for your IDE:
```json
"mcpServers": {
"mcp-kandinsky": {
"command": "uvx",
"args": [
"--from", "mcp_kandinsky", "mcp-kandinsky"
],
"enabled": true,
"env": {
"KANDINSKY_API_KEY": "ВАШ_API_KEY",
"KANDINSKY_SECRET_KEY": "ВАШ_SECRET_KEY"
}
}
}
```
## Example of using the tool by an agent
**Calling the tool from an agent (e.g., via Cursor):**
```
mcp-kandinsky/kandinsky_generate_image
Arguments
{
"prompt": "Весенняя Москва в мае, сирень, дождь и солнце, в стиле акварельной живописи",
"filename": "moskva_v_mae.png",
"project_dir": "/Users/you/myproject",
"width": 1024,
"height": 1024,
"style": "DEFAULT",
"negative_prompt": "",
"overwrite": false
}
Response
Изображение успешно сгенерировано и сохранено в kandinsky/moskva_v_mae.png.
```
**Explanations:**
- All parameters are passed through the agent interface.
- `project_dir` is the absolute path to the project folder in which the agent is currently running. The `kandinsky` folder will be created inside it.
- The response is a string with the result (success or reason for refusal).
- The file is saved to the `kandinsky` folder in the project's working directory.
## Tool description
**kandinsky_generate_image**
| Parameter | Type | Description |
|------------------|--------|-----------------------------------------------------------------|
| prompt | str | Image description |
| filename | str | File name for saving (e.g., cat.png) |
| project_dir | str | Absolute path to the project folder |
| width | int | Width (default 1024) |
| height | int | Height (default 1024) |
| style | str | Style (DEFAULT, KANDINSKY, UHD, ANIME; default DEFAULT) |
| negative_prompt | str | Negative prompt (optional) |
| overwrite | bool | Overwrite the file if it already exists (default False)|
**Returns:** a result string with a message about success or the reason for refusal.
## Logic of operation
- Checks for the existence of the `kandinsky` folder inside `project_dir`, creates it if necessary.
- If a file with the same name already exists and `overwrite=False`, generation does not occur, and a message about the file's existence is returned.
- If the file does not exist or `overwrite=True`, generation occurs, and the file is saved (or overwritten).
- Returns a message about successful saving or the reason for refusal.
---
API documentation: https://fusionbrain.ai/docs/doc/api-dokumentaciya/
## License
This project is distributed under the MIT license. See the LICENSE file for details.
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
OpenAI Whisper
OpenAI Whisper MCP Server - 基于本地 Whisper CLI 的离线语音识别与翻译,无需 API Key,支持...
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
claude-flow
Claude-Flow v2.7.0 is an enterprise AI orchestration platform.
chatbox
User-friendly Desktop Client App for AI Models/LLMs (GPT, Claude, Gemini, Ollama...)
continue
Continue is an open-source project for seamless server management.