Emperor MCP
Let your agent generate images itself.
A real Model Context Protocol server. Connect Claude Code, Claude Desktop, Cursor, or any MCP-speaking agent directly to Emperor's image models.
01. Connect
One command, from Claude Code.
Create a key from /developers first, then register the server:
claude mcp add --transport http emperor https://emperor.tools/api/mcp \
--header "Authorization: Bearer $EMPEROR_API_KEY"The endpoint is https://emperor.tools/api/mcp, authenticated with the same Bearer key as the REST API. One key works for both.
02. Tools
Two tools, same pipeline as the app.
Every call runs through the exact same generation, billing, and moderation path as the web app and the REST API. Nothing agent-specific diverges.
generate_image
{
"name": "generate_image",
"description": "Generate an image from a text prompt using Emperor's image models. Returns a temporary URL to the generated image (or a needs_review status if it was held for moderation).",
"inputSchema": {
"prompt": "string, required: text description of the image to generate",
"model": "string, optional: one of the six models from /api; defaults to grok-imagine-image-quality",
"resolution": "\"1K\" | \"2K\", optional: defaults to 1K; 2K requires a paid plan"
}
}list_models
{
"name": "list_models",
"description": "List Emperor's available image models with their credit cost at 1K and 2K resolution.",
"inputSchema": {}
}03. Current scope
Same v1 cuts as the REST API.
- ✓Image generation and the live model/pricing list: everything the web app's Generate page can do.
- –Batch, video, and enhance aren't exposed as tools yet. Coming in a future version, see /api for the same limits on the REST side.
- –Server-side / agent use only. Your API key is a Bearer secret. Never configure it inside a browser-based or client-side agent.
