- Leonardo AI MCP Server
Leonardo AI MCP Server
MCP server for Leonardo AI API - Free daily credits for AI image generation
Content
Leonardo AI MCP Server
An MCP (Model Context Protocol) server that provides access to Leonardo AI's image generation API with 150 free daily credits.
Features
- Generate high-quality images using various AI models
- 150 free credits daily (refreshes at midnight)
- Support for multiple art styles and models
- Batch generation (1-4 images at once)
- Save images locally or get URLs
- Check remaining credits
Available Models
- Leonardo Diffusion XL: High-quality general purpose model
- Leonardo Vision XL: Photorealistic and artistic styles
- Leonardo Anime XL: Anime and manga style images
- DreamShaper v7: Fantasy and dreamlike images
- Realistic Vision v5: Highly realistic photographs
Installation
- Clone this repository:
git clone https://github.com/nikolausm/leonardo-ai-mcp-server.git
cd leonardo-ai-mcp-server
- Install dependencies:
npm install
-
Get your Leonardo AI API key:
- Sign up at https://leonardo.ai (free)
- Go to API settings
- Generate an API key
- Copy the key
-
Set up environment variable:
export LEONARDO_API_KEY="your_api_key_here"
Configuration in Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"leonardo-ai": {
"command": "node",
"args": ["/path/to/leonardo-ai-mcp-server/index.js"],
"env": {
"LEONARDO_API_KEY": "your_api_key_here"
}
}
}
}
Usage
Generate an Image
// Basic usage
generate_image({
prompt: "a majestic castle on a hilltop at sunset"
})
// Advanced usage
generate_image({
prompt: "cute cartoon guinea pig with big eyes",
model: "leonardo-anime-xl",
negative_prompt: "realistic, scary, dark",
num_images: 2,
width: 768,
height: 768,
guidance_scale: 10,
save_path: "/tmp/guinea_pig.png"
})
Check Remaining Credits
check_credits()
List Available Models
list_models()
Free Credits System
- 150 credits daily (resets at midnight UTC)
- Each image costs approximately 2 credits
- That's about 75 images per day for free!
- No credit card required
Tips for Better Results
-
Use specific models:
leonardo-anime-xlfor anime/cartoon stylerealistic-vision-v5for photorealistic imagesdreamshaper-v7for fantasy art
-
Optimize dimensions:
- Use multiples of 8 (512, 768, 1024)
- Square images often work best
-
Negative prompts are powerful:
- Use them to avoid unwanted elements
- Example: "blurry, low quality, distorted"
Examples
Children's Book Illustration
generate_image({
prompt: "friendly guinea pig reading a book, children's illustration, soft pastel colors",
model: "leonardo-diffusion-xl",
negative_prompt: "realistic, dark, scary",
width: 768,
height: 768
})
Educational Poster
generate_image({
prompt: "educational poster showing guinea pig care, clean design, infographic style",
model: "leonardo-vision-xl",
num_images: 3,
guidance_scale: 12
})
Error Handling
The server handles common errors:
- Invalid API key
- Insufficient credits
- Generation failures
- Timeout issues
License
MIT
Author
Michael Nikolaus
Links
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
DeepChatYour AI Partner on Desktop
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.