MCP server connecting Claude to Leonardo AI for image generation, img2img, animation, upscaling, and model discovery. Deploys to Railway (same pattern as Higgsfield MCP).
| Tool | What it does |
|---|---|
leonardo_get_user_info |
Account info + API credit balance |
leonardo_list_models |
List all platform models + IDs |
leonardo_generate_image |
Text-to-image with polling |
leonardo_get_generation |
Poll / fetch a generation by ID |
leonardo_image_to_image |
img2img with init image + prompt |
leonardo_upload_init_image_from_url |
Create S3 upload slot for init images |
leonardo_image_to_video |
Animate an image (Leonardo Motion) |
leonardo_upscale_image |
Upscale a generated image |
leonardo_delete_generation |
Delete a generation |
| Name | Required | Description |
|---|---|---|
LEONARDO_API_KEY |
✅ | Your Leonardo API key |
TRANSPORT |
✅ | http for Railway, stdio for local |
PORT |
✅ | 3000 |
- Go to app.leonardo.ai
- Left menu → API Access
- Click Create New Key
- Copy the key
git init
git add .
git commit -m "leonardo mcp"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/leonardo-mcp.git
git push -u origin main- Go to railway.app → log in
- New Project → Deploy from GitHub repo
- Pick
leonardo-mcp - Wait ~1 minute for build
In Railway → Variables tab:
| Name | Value |
|---|---|
LEONARDO_API_KEY |
your-api-key-here |
TRANSPORT |
http |
PORT |
3000 |
Railway → Settings → Networking → Generate Domain
You'll get a URL like: https://leonardo-mcp-production.up.railway.app
claude.ai → Settings → Integrations → Add MCP server
URL: https://your-domain.up.railway.app/mcp
"Check my Leonardo AI credit balance"
"List available Leonardo models"
"Generate a cinematic pharma lab image with Leonardo, dark moody lighting, teal accents"
"Generate a product shot with Leonardo: floating VR headset on dark background, cyan holographic effect"
Claude can now orchestrate both in the same conversation:
- Leonardo: Superior image quality, fine-tuned models, img2img, alchemy pipeline
- Higgsfield: Cinematic video generation, DoP camera movements, lip-sync
Example flow:
leonardo_generate_image→ get a perfect product shothiggsfield_image_to_video→ animate it with cinematic camera movement