Recommended for exposing the local server to the internet when running in HTTP mode, allowing remote clients to connect to the Leonardo AI integration.
The server includes a video demo hosted on YouTube that showcases its functionality.
Leonardo MCP Server
A Model Context Protocol (MCP) server for Leonardo AI, supporting both HTTP
and stdio
modes.
Features
- Create image generation jobs with Leonardo AI
- See available models
- Check the status of image generation jobs
- Get all the user's image generation jobs
- Supports both
HTTP
andstdio
transports
Installation
JSON Config
Support for Claude Desktop, Cursor and other MCP clients that use JSON config files.
Important
You will need to generate a Leonardo API key and set it in the environment variable LEONARDO_API_KEY
before running the server.
Demo
Running Modes
This server supports two modes:
- HTTP mode (default):
- Suitable for remote clients (e.g., ChatGPT Playground, browser-based tools).
- The server runs an HTTP endpoint. You must expose it to the internet if your client is remote.
- Stdio mode:
- Suitable for local clients that communicate over standard input/output (stdio).
- No network port is opened.
HTTP Mode (for remote clients)
Start the server in HTTP mode (default):
If your client is remote (e.g., ChatGPT Playground), you must expose your local server to the internet. You can use ngrok or a similar tunneling tool:
Copy the public URL from ngrok and use it as the endpoint in your client.
Stdio Mode (for local clients)
Start the server in stdio mode:
Environment Variables
LEONARDO_API_KEY
(required): Your Leonardo AI API key.
Development
- Edit
main.py
to add or modify MCP tools. - Run using
python main.py
and test with a compatible MCP client. I prefer to use 5ire MCP client for testing. - See python-sdk documentation for more info.
This server cannot be installed
A Model Context Protocol server that enables AI assistants to generate images using Leonardo AI, supporting both HTTP and stdio communication modes.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that provides image generation capabilities using the Ideogram API, allowing users to create images from text prompts with customizable parameters.Last updated -1973TypeScript
- AsecurityFlicenseAqualityA Model Context Protocol server that provides an image generation tool using Templated.io, allowing users to create customized images based on templates with text and image layers.Last updated -TypeScript
- -securityAlicense-qualityA server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.Last updated -6PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server enabling AI assistants to generate images through OpenAI's DALL-E API with full support for all available options and fine-grained control.Last updated -141JavaScriptMIT License