{"openapi":"3.1.0","info":{"title":"Image MCP Server API","description":"Image MCP is a Model Context Protocol (MCP) server for AI-powered image generation.\n\n## Overview\n\nThis API provides image generation capabilities through the standardized MCP protocol. \nIt is designed to be used by AI agents and LLM applications that support MCP.\n\n## Protocol\n\nThis API uses the Model Context Protocol (MCP) over Streamable HTTP transport.\nSend MCP JSON-RPC requests to the /api/mcp endpoint.\n\n## Authentication\n\nNo authentication required. This is a public API.\n\n## Available Capabilities\n\n### Tools\n- **generate_image**: Generate images from text prompts\n\n### Resources  \n- **mcp://image-mcp/models**: List available models\n\n### Prompts\n- **generate-image**: Basic image generation\n- **generate-image-detailed**: Detailed generation with style parameters","version":"0.1.0","contact":{"email":"support@imagemcp.io","url":"https://imagemcp.io"}},"servers":[{"url":"https://imagemcp.io","description":"Production server"}],"paths":{"/api/mcp":{"post":{"operationId":"mcpRequest","summary":"MCP Protocol Endpoint","description":"Send MCP JSON-RPC requests to interact with the image generation server.\n\n## Supported MCP Methods\n\n### initialize\nInitialize the MCP connection.\n\n### tools/list\nList available tools.\n\n### tools/call\nCall a tool. For image generation, call the `generate_image` tool.\n\n### resources/list\nList available resources.\n\n### resources/read\nRead a resource (e.g., model list).\n\n### prompts/list\nList available prompts.\n\n### prompts/get\nGet a prompt template.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPRequest"},"examples":{"initialize":{"summary":"Initialize connection","value":{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"example-client","version":"1.0.0"}}}},"listTools":{"summary":"List available tools","value":{"jsonrpc":"2.0","id":2,"method":"tools/list"}},"generateImage":{"summary":"Generate an image","value":{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"generate_image","arguments":{"prompt":"A majestic mountain landscape at sunset with dramatic clouds","model":"google/gemini-3-pro-image-preview"}}}},"listModels":{"summary":"Read available models","value":{"jsonrpc":"2.0","id":4,"method":"resources/read","params":{"uri":"mcp://image-mcp/models"}}}}}}},"responses":{"200":{"description":"MCP response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPResponse"},"examples":{"toolsListResponse":{"summary":"Tools list response","value":{"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"generate_image","description":"Generate an image from a text prompt","inputSchema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text prompt describing the image to generate"},"model":{"type":"string","description":"Model ID to use for generation (default: google/gemini-3-pro-image-preview)"}},"required":["prompt"]}}]}}},"generateImageResponse":{"summary":"Image generation response","value":{"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"{\"url\":\"https://cdn.example.com/generated/1234-abc.png\",\"model\":\"google/gemini-3-pro-image-preview\",\"prompt\":\"A majestic mountain...\",\"filename\":\"1234-abc.png\"}"}]}}}}}}}}},"options":{"operationId":"mcpOptions","summary":"CORS Preflight","description":"Handles CORS preflight requests","responses":{"204":{"description":"CORS headers returned"}}}},"/llms.txt":{"get":{"operationId":"getLlmsTxt","summary":"LLM-readable documentation (summary)","description":"Returns a summary of the API for LLM consumption in plain text format","responses":{"200":{"description":"LLM documentation","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms-full.txt":{"get":{"operationId":"getLlmsFullTxt","summary":"LLM-readable documentation (full)","description":"Returns complete API documentation for LLM consumption in plain text format","responses":{"200":{"description":"Full LLM documentation","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"MCPRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"],"description":"JSON-RPC version"},"id":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Request ID"},"method":{"type":"string","description":"MCP method name","enum":["initialize","initialized","tools/list","tools/call","resources/list","resources/read","prompts/list","prompts/get"]},"params":{"type":"object","description":"Method parameters"}}},"MCPResponse":{"type":"object","required":["jsonrpc"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]},"result":{"type":"object","description":"Successful response data"},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object"}}}}},"GenerateImageParams":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"Text prompt describing the image to generate","examples":["A serene Japanese garden with cherry blossoms","Cyberpunk cityscape at night with neon lights","Professional product photo of wireless earbuds"]},"model":{"type":"string","description":"Model ID for image generation","default":"google/gemini-3-pro-image-preview","enum":["google/gemini-3-pro-image-preview","openai/gpt-5-image","black-forest-labs/flux.2-flex","black-forest-labs/flux.2-pro","google/gemini-2.5-flash-image"]}}},"GenerateImageResult":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public CDN URL of the generated image"},"model":{"type":"string","description":"Model used for generation"},"prompt":{"type":"string","description":"Original prompt"},"filename":{"type":"string","description":"Generated filename"}}},"AvailableModels":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Model identifier"},"name":{"type":"string","description":"Human-readable model name"}}}}}}}},"tags":[{"name":"MCP","description":"Model Context Protocol operations"},{"name":"Documentation","description":"API documentation endpoints"}]}