leonardo-ai-mcp-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π¨ Leonardo AI MCP Server
A remote Model Context Protocol (MCP) server for Leonardo.ai, powered by Vercel.
Generate images, manage models, check generation status, upscale, create variations β all through MCP from Cursor, Claude Desktop, VS Code, or any MCP-compatible client.
β¨ Features / Tools
Tool | Description |
| Generate images with Leonardo AI. Supports model selection, dimensions, style presets, Alchemy, PhotoReal, and Ultra mode. Polls for completion automatically. |
| Get the status and results of a generation job by ID |
| List all available Leonardo AI platform models with IDs, names and descriptions |
| Get recent generation jobs for a user |
| Get the authenticated user's info (username, tokens, quota) |
| Create a variation, outpaint, inpaint, or unzoom of an existing image |
| Upscale a generated image to higher resolution |
| Permanently delete a generation and its images |
Related MCP server: imagengen
π Deploy to Vercel
One-Click Deploy
Manual Deploy
Fork/clone this repository
Import it in Vercel
Set environment variable
LEONARDO_API_KEYwith your Leonardo AI API keyEnable Fluid Compute in your Vercel project settings for optimal performance
Deploy β your MCP server will be live at
https://your-project.vercel.app/mcp
π Get a Leonardo AI API Key
Go to Leonardo.ai
Sign up / log in
Navigate to API Access in your settings
Generate an API key
π Connect Your MCP Client
Cursor
Add to your Cursor MCP settings (.cursor/mcp.json):
{
"mcpServers": {
"leonardo-ai": {
"url": "https://your-project.vercel.app/mcp",
"headers": {
"x-leonardo-api-key": "YOUR_LEONARDO_API_KEY"
}
}
}
}Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"leonardo-ai": {
"url": "https://your-project.vercel.app/mcp",
"headers": {
"x-leonardo-api-key": "YOUR_LEONARDO_API_KEY"
}
}
}
}VS Code (GitHub Copilot)
Add to your VS Code MCP settings:
{
"mcp": {
"servers": {
"leonardo-ai": {
"url": "https://your-project.vercel.app/mcp",
"headers": {
"x-leonardo-api-key": "YOUR_LEONARDO_API_KEY"
}
}
}
}
}Note: You can also set
LEONARDO_API_KEYas an environment variable on Vercel instead of passing it as a header. If the env var is set, the header is optional.
π Local Development
# Install dependencies
pnpm install
# Set your API key
cp .env.example .env
# Edit .env and add your LEONARDO_API_KEY
# Start local dev server
pnpm devThe MCP server will be available at http://localhost:3000/mcp.
π Project Structure
βββ api/
β βββ server.ts # MCP server with all tool definitions
β βββ leonardo-client.ts # Leonardo AI REST API client
βββ public/
β βββ index.html # Landing page
βββ package.json
βββ tsconfig.json
βββ vercel.json # Vercel deployment config
βββ .env.example
βββ README.mdπ API Key Options
The server resolves the Leonardo API key in this order:
x-leonardo-api-keyheader β passed by the MCP client (recommended for multi-user setups)LEONARDO_API_KEYenv variable β set in Vercel project settings (simpler for single-user)
π§ͺ Example Usage
Once connected, you can use natural language in your MCP client:
"Generate an image of a sunset over mountains in cinematic style"
"List available Leonardo AI models"
"Show me my recent generations"
"Upscale the last generated image"
"Create a variation of image xyz"
π License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Generate AI images and videos from any compatible MCP client.
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models. Up to 4 images per call, SVG vectorization, background removal, upscaling and image-to-video. Remote MCP with OAuth, no API keys.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI photo generation, editing, and video creation from MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.87 npmMIT
- AlicenseAqualityCmaintenanceGenerates and edits images via Gemini, Grok, and GPT-image providers for MCP clients like Claude Code that lack native image generation.316 npmMIT
- AlicenseAqualityBmaintenanceEnables generating, editing, remixing, upscaling, and describing images through the Ideogram V3 API from any MCP client.38149 npmMIT
- AlicenseNot gradedqualityFmaintenanceEnables AI image processing tools such as vectorization, background removal, upscaling, and logo generation from any MCP-compatible client like Claude Code or Cursor.14 npmMIT