Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ npx mcp-image skills install --path ~/.claude/skills
- **Node.js** 22 or higher
- **Gemini API Key** - Get yours at [Google AI Studio](https://aistudio.google.com/apikey) for the default Gemini provider
- **OpenAI API Key** - Get yours from [OpenAI](https://platform.openai.com/api-keys) when using `IMAGE_PROVIDER=openai`
- **Ideogram API Key** - Get yours from [Ideogram](https://ideogram.ai/manage-api) when using `IMAGE_PROVIDER=ideogram`
- An MCP-compatible AI tool: **Cursor**, **Claude Code**, **Codex**, or others
- Basic terminal/command line knowledge

Expand Down Expand Up @@ -257,9 +258,10 @@ Set `SKIP_PROMPT_ENHANCEMENT=true` to disable automatic prompt optimization and

| Variable | Default | Description |
|----------|---------|-------------|
| `IMAGE_PROVIDER` | `gemini` | `gemini` or `openai` |
| `IMAGE_PROVIDER` | `gemini` | `gemini`, `openai`, or `ideogram` |
| `GEMINI_API_KEY` | - | Required when `IMAGE_PROVIDER=gemini` |
| `OPENAI_API_KEY` | - | Required when `IMAGE_PROVIDER=openai` |
| `IDEOGRAM_API_KEY` | - | Required when `IMAGE_PROVIDER=ideogram` |

### Using the OpenAI provider

Expand All @@ -277,6 +279,27 @@ OpenAI provider behavior:

Prompt enhancement uses a separate OpenAI Responses API call. Set `SKIP_PROMPT_ENHANCEMENT=true` to send prompts directly to the image model.

### Using the Ideogram provider

Set `IMAGE_PROVIDER=ideogram` and `IDEOGRAM_API_KEY` to generate images with Ideogram 4.0 (`ideogram-v4`). Get an API key from [Ideogram](https://ideogram.ai/manage-api).

Ideogram provider behavior:

- Supports text-to-image generation.
- `IMAGE_QUALITY` controls the Ideogram v4 `resolution`: a higher preset selects a larger resolution for the chosen orientation. Because v4 ties resolution to aspect ratio (every v4 resolution is ~4 MP), `aspectRatio` only selects the orientation, and `imageSize` is not used.

| `IMAGE_QUALITY` | Landscape | Portrait | Square |
|-----------------|-----------|----------|--------|
| `fast` | `2560x1440` | `1440x2560` | `2048x2048` |
| `balanced` | `2304x1728` | `1728x2304` | `2048x2048` |
| `quality` | `2496x1664` | `1664x2496` | `2048x2048` |

Square has a single v4 resolution, so the preset has no size effect there.
- `IMAGE_QUALITY` also maps to Ideogram rendering speed as `fast -> TURBO`, `balanced -> DEFAULT`, and `quality -> QUALITY`. (v4 does not yet support its `FLASH` speed.)
- Does not support `useGoogleSearch` or image-to-image editing; use the Gemini or OpenAI provider for those.

Prompt enhancement is handled natively: Ideogram v4 automatically applies magic-prompt to text prompts, so the Ideogram provider does not require a separate text model or API key. Because v4 always enhances text prompts, `SKIP_PROMPT_ENHANCEMENT` does not disable Ideogram's magic-prompt.

## Usage Examples

Once configured, just describe what you want in natural language:
Expand Down
10 changes: 9 additions & 1 deletion server.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"environmentVariables": [
{
"name": "IMAGE_PROVIDER",
"description": "Image provider to use: 'gemini' (default) or 'openai'",
"description": "Image provider to use: 'gemini' (default), 'openai', or 'ideogram'",
"isRequired": false,
"format": "string",
"isSecret": false
Expand All @@ -40,6 +40,13 @@
"format": "string",
"isSecret": true
},
{
"name": "IDEOGRAM_API_KEY",
"description": "Ideogram API key for image generation (Ideogram 4.0) when IMAGE_PROVIDER=ideogram (get from https://ideogram.ai/manage-api)",
"isRequired": false,
"format": "string",
"isSecret": true
},
{
"name": "IMAGE_OUTPUT_DIR",
"description": "Absolute path to directory where generated images will be saved (defaults to ./output)",
Expand Down Expand Up @@ -87,6 +94,7 @@
"prompt-enhancement",
"gemini",
"openai",
"ideogram",
"gpt-image-2",
"nano-banana",
"nano-banana-2",
Expand Down
1 change: 1 addition & 0 deletions src/api/__tests__/geminiClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe('geminiClient', () => {
imageProvider: 'gemini',
geminiApiKey: 'test-api-key-12345',
openaiApiKey: '',
ideogramApiKey: '',
imageOutputDir: './output',
apiTimeout: 30000,
skipPromptEnhancement: false,
Expand Down
1 change: 1 addition & 0 deletions src/api/__tests__/geminiTextClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ describe('GeminiTextClient', () => {
imageProvider: 'gemini',
geminiApiKey: 'test-api-key',
openaiApiKey: '',
ideogramApiKey: '',
imageOutputDir: './test-output',
apiTimeout: 30000,
skipPromptEnhancement: false,
Expand Down
Loading