MCP server for AI image and icon generation

MCP server for AI image and icon generation

mcp-image-server•byricardopera

A TypeScript MCP server that generates custom images and icons with GPT Image 1 and delivers them as PNG, SVG, or ICO files.

License: Not specified•Runtime: Awaiting documentation review•Category: media design

WHAT IT DOES

  • •Generates custom images from textual prompts using GPT Image 1.
  • •Outputs files in PNG, SVG with embedded base64 image, or a real ICO conversion.
  • •Supports square, landscape, and portrait sizes with transparent or opaque backgrounds.
  • •Provides a dedicated favicon generation tool producing favicon.ico files.

BEST FOR

  • •Creating app icons and favicons from text prompts.
  • •Producing logos and visual assets on demand for web or app projects.
  • •Generating illustrations and avatars in multiple formats and sizes.

ABOUT MCP-IMAGE-SERVER

MCP server for AI image and icon generation is cataloged as an MCP server attributed to ricardopera. A TypeScript MCP server that generates custom images and icons with GPT Image 1 and delivers them as PNG, SVG, or ICO files. It is categorized under media design. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for AI image and icon generation are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What environment variable is required for image generation?

The OPENAI_API_KEY environment variable is required for image generation.

Is the SVG generation tool currently available?

No, the generate-svg tool is temporarily disabled due to technical issues; PNG or ICO should be used instead.

Upstream README

View this exact version on GitHub

README.md · 05487b61b4ce · Fetched 2026-11-13 11:33:02 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MCP Image Server

Banner MCP Image Server

A TypeScript-based MCP server for generating custom images and icons using AI (GPT Image 1). It supports output formats including .png, .svg, .ico, and others. Designed for seamless integration with Vibe Coding, enabling on-demand visual asset creation for your projects. Cross-platform, executable via npx.

Features

  • Custom image generation via GPT Image 1 (OpenAI)
  • Delivers files in .png, .svg (embedded base64 image), and .ico (real conversion)
  • Configurable image sizes: 1024×1024 (square), 1536×1024 (landscape), or 1024×1536 (portrait)
  • Background control: 'transparent' or 'opaque'
  • Quality set to 'low' and moderation to 'low' for fast generation
  • MCP tools documented with usage examples accessible via resource
  • Resource for querying supported formats
  • Ready for integration with MCP Client, agents, and Vibe Coding flows
  • Cross-platform (Windows/Linux/Mac), ready to run via npx

Project Structure

  • src/index.ts: Main implementation of the MCP server, tools, and resources
  • package.json: Project configuration, dependencies, and cross-platform scripts
  • README.md: This document
  • test-mcp-client.js: MCP Client integration test script
  • tsconfig.json: TypeScript configuration
  • sample_config.json: Example MCP Client configuration

How to configure MCP Client to use this server

Add the following configuration to your MCP servers file (example for sample_config.json):

{
    "servers": {
        "mcp-image-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@ricardopera/mcp-image-server@latest"
            ],
            "env": {
                "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE"
            }
        }
    }
}

This allows you to run the image server directly via npx, with no prior installation, and sets the required environment variable for OpenAI authentication.

How to run locally

  1. Install dependencies:

    npm install
    
  2. Build the project:

    npm run build
    
  3. Set the OPENAI_API_KEY environment variable with your OpenAI key:

    • On Windows (PowerShell):

      $env:OPENAI_API_KEY="your-key-here"
      
    • On Linux/Mac:

      export OPENAI_API_KEY="your-key-here"
      
  4. Run via npx:

    npx mcp-image-server
    

How to submit to MCP.so

  1. Make sure the project is built, tested, and documented
  2. Follow the submission instructions at https://mcp.so/

Progress and Documentation

  • Initial project structure
  • MCP server implementation
  • Real GPT Image 1 integration
  • Conversion and delivery of files in .png, .svg, .ico formats
  • MCP tools documented and annotated
  • Usage examples resource (resource://tool-examples)
  • Supported formats resource (formats://supported)
  • Integration tests with MCP Client
  • Automated tests and edge case validation
  • Final detailed documentation (examples, troubleshooting)

Visual Examples

Below are real examples of images generated by the MCP Image Server tools. All images were automatically saved in the examples/ folder using the fileName and directory parameters of the tools.

Example 1: Minimalist rocket icon (PNG)

Prompt used:

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "rocket-icon",
  "directory": "examples"
}

Result:

Minimalist rocket icon


Example 2: Blue circular logo with letter A (SVG)

Prompt used:

{
  "prompt": "blue circular logo with letter A",
  "format": "svg",
  "size": "1536x1024",
  "background": "transparent",
  "fileName": "blue-logo-letter-a",
  "directory": "examples"
}

Result:

Blue circular logo with letter A


Example 3: Golden star icon (ICO)

Prompt used:

{
  "prompt": "golden star icon",
  "format": "ico",
  "size": "1024x1024",
  "background": "opaque",
  "fileName": "golden-star",
  "directory": "examples"
}

Result:

Golden star icon


Example 4: Yellow star favicon (ICO)

Prompt used:

{
  "prompt": "yellow star favicon transparent background",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "yellow-star-favicon",
  "directory": "examples"
}

Result:

Yellow star favicon


Example 5: Red heart icon (SVG)

Prompt used:

{
  "prompt": "red heart icon",
  "size": "1024x1536",
  "background": "opaque",
  "fileName": "red-heart-icon",
  "directory": "examples"
}

Result:

Red heart icon


These examples demonstrate the server's flexibility to generate and save custom images in different formats and directories, facilitating integration into web projects, applications, and various systems.

Available Tools

generate-image

Generates a custom image using AI (GPT Image 1) and delivers it in the requested format.

Parameters:

  • prompt (string): textual description of the desired image
  • format ("png" | "svg" | "ico"): output format (default: "png")
  • size ("1024x1024" | "1536x1024" | "1024x1536"): image size (default: "1024x1024")
  • background ("transparent" | "opaque"): background type (default: "transparent")

Example:

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent"
}
{
  "prompt": "blue circular logo with letter A",
  "format": "svg",
  "size": "1536x1024",
  "background": "transparent"
}
{
  "prompt": "golden star icon",
  "format": "ico",
  "size": "1024x1024",
  "background": "opaque"
}

generate-favicon

Generates a custom favicon.ico from a textual prompt.

Parameters:

  • prompt (string): textual description of the favicon
  • size ("1024x1024" | "1536x1024" | "1024x1536"): image size (default: "1024x1024")
  • background ("transparent" | "opaque"): background type (default: "transparent")

Example:

{
  "prompt": "yellow star favicon transparent background",
  "size": "1024x1024",
  "background": "transparent"
}

generate-svg (temporariamente indisponível)

⚠️ A ferramenta de geração de SVG está temporariamente desabilitada devido a questões técnicas relacionadas ao processamento do conteúdo SVG como texto. O recurso será reativado em uma versão futura, assim que for possível garantir que SVGs sejam tratados apenas como arquivos de imagem.

Enquanto isso, utilize os formatos PNG ou ICO para geração de imagens.

Resources

  • resource://tool-examples: usage examples of the tools in JSON
  • formats://supported: list of supported formats (["png", "svg", "ico"])

Environment Variables

  • OPENAI_API_KEY: OpenAI API key (required for image generation)

Troubleshooting

  • Error OPENAI_API_KEY not defined or invalid: correctly set the environment variable before running.
  • Error generating GPT Image 1 image: check your key, connection, and OpenAI limits.
  • Permission issues on Windows: the project is cross-platform, but if permission errors occur, run the terminal as administrator.

Developed following best practices for MCP agents, ready for integration and publication on MCP.so.


Advanced Image Generation Examples

Below are additional examples demonstrating the flexibility and power of the tools in this project. All images are generated and automatically saved in the examples/ folder.

Example 6: Friendly robot avatar (PNG)

Prompt used:

{
  "prompt": "friendly robot avatar, white background, cartoon style, soft colors",
  "format": "png",
  "size": "1024x1024",
  "background": "opaque",
  "fileName": "friendly-robot-avatar",
  "directory": "examples"
}

Result:

Friendly robot avatar


Example 7: Futuristic landscape with mountains (PNG)

Prompt used:

{
  "prompt": "futuristic landscape with mountains and starry sky, digital art, transparent background",
  "format": "png",
  "size": "1536x1024",
  "background": "transparent",
  "fileName": "futuristic-landscape",
  "directory": "examples"
}

Result:

Futuristic landscape with mountains


These advanced examples show how the MCP Image Server can be used to generate everything from minimalist icons to complex illustrations, ready for use in web, mobile, or desktop applications.

Tool Documentation

generate-image

Generates a custom image using AI (GPT Image 1) and saves it in the requested format.

Required Parameters:

  • prompt (string): textual description of the desired image
  • format ("png" | "svg" | "ico"): output format (default: "png")
  • size ("1024x1024" | "1536x1024" | "1024x1536"): image size (default: "1024x1024")
  • background ("transparent" | "opaque"): background type (default: "transparent")
  • fileName (string): name of the file to be saved (without extension)
  • directory (string): full path of the directory where the file will be saved (must be formatted according to the operating system, e.g., C:\Users\user\project\folder on Windows or /home/user/project/folder on Linux/Mac)

Important: Always provide the full path in the directory parameter to ensure the file is saved correctly. The path must be in the format of the operating system where the server is running.

Usage Example (Windows):

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "rocket-icon",
  "directory": "c:\\Users\\ricar\\Desktop\\projetos\\mcp-image-server\\examples"
}

Usage Example (Linux/Mac):

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "rocket-icon",
  "directory": "/home/user/projects/mcp-image-server/examples"
}

generate-favicon

Generates a custom favicon.ico from a textual prompt.

Required Parameters:

  • prompt (string): textual description of the favicon
  • size ("1024x1024" | "1536x1024" | "1024x1536"): image size (default: "1024x1024")
  • background ("transparent" | "opaque"): background type (default: "transparent")
  • fileName (string): name of the file to be saved (without extension)
  • directory (string): full path of the directory where the file will be saved (operating system format)

Usage Example (Windows):

{
  "prompt": "yellow star favicon transparent background",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "yellow-star-favicon",
  "directory": "c:\\Users\\ricar\\Desktop\\projetos\\mcp-image-server\\examples"
}

generate-svg

Generates an SVG file with the embedded AI image (base64).

Required Parameters:

  • prompt (string): textual description of the desired image
  • size ("1024x1024" | "1536x1024" | "1024x1536"): image size (default: "1024x1024")
  • background ("transparent" | "opaque"): background type (default: "transparent")
  • fileName (string): name of the file to be saved (without extension)
  • directory (string): full path of the directory where the file will be saved (operating system format)

Usage Example (Linux/Mac):

{
  "prompt": "red heart icon",
  "size": "1024x1536",
  "background": "opaque",
  "fileName": "red-heart-icon",
  "directory": "/home/user/projects/mcp-image-server/examples"
}

Refer to the resource resource://tool-examples for more practical JSON examples.


How MCP Tools Are Implemented and Documented

MCP (Model Context Protocol) tools must follow the international standard for definition and documentation, allowing models and agents to discover, understand, and use them correctly. See below for best practices and real examples:

MCP Tool Definition Structure

{
  name: string;          // Unique identifier of the tool
  description?: string;  // Human-readable description
  inputSchema: {         // JSON Schema of the tool parameters
    type: "object",
    properties: { ... }  // Specific tool parameters
  }
}
  • name: unique name of the tool (e.g., "generate-image")
  • description: clear description of what the tool does
  • inputSchema: defines required and optional parameters, types, and descriptions

Practical Example (TypeScript)

server.registerTool(
  "generate-image",
  {
    title: "Generate Image with GPT Image 1",
    description: "Generates a custom image using AI (GPT Image 1) and delivers it in the requested format (.png, .svg, .ico).",
    inputSchema: {
      prompt: z.string().describe("Textual prompt describing the desired image"),
      format: z.enum(["png", "svg", "ico"]).default("png").describe("Output format of the image"),
      size: z.enum(["1024x1024", "1536x1024", "1024x1536"]).default("1024x1024").describe("Image size"),
      background: z.enum(["transparent", "opaque"]).default("transparent").describe("Background type"),
      fileName: z.string().default("image").describe("Name of the file to be saved (without extension)"),
      directory: z.string().default("./output").describe("Directory where the file will be saved")
    },
    annotations: {
      usage: "Use this tool to generate custom images and icons for your project. The prompt should be detailed for better results. The format defines the extension of the generated file."
    }
  },
  async ({ prompt, format, size, background, fileName, directory }) => { /* ... */ }
);

Best Practices for Tool Documentation

  • Always include a clear and objective description
  • Document all inputSchema parameters, including types and examples
  • Provide JSON usage examples for each tool
  • Use the annotations.usage field for usage tips and context
  • Implement robust error handling, returning friendly messages and the isError field when necessary

Error Handling Example

try {
  // Tool operation
  const result = performOperation();
  return {
    content: [
      { type: "text", text: `Operation successful: ${result}` }
    ]
  };
} catch (error) {
  return {
    isError: true,
    content: [
      { type: "text", text: `Error: ${error.message}` }
    ]
  };
}

Automatic Discovery and Use by Models

By following this standard, any MCP model or agent can list the available tools, read their schemas and descriptions, and invoke them correctly, including automatic parameter validation.

Refer to the official MCP documentation for more examples and details.


Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for AI image and icon generation from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-image-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related media design MCP Servers

Alternative and complementary servers in the same category

View all in media design →

A Rust CAD application with an MCP server for creating, inspecting and rendering drawings, either headlessly or through a connection to the desktop app.

8K
Media & Design
Liquid Composer
liquid-composer•frontedu

Liquid Composer is a browser-based Liquid Glass icon design tool that offers a local MCP server for agent-driven icon workflows.

69
Media & Design

agent-media makes short drama series and other short vertical videos from Claude, ChatGPT or Codex through one MCP connection, with OAuth sign-in and no API keys.

1
Media & Design