Get the FREE Ultimate OpenClaw Setup Guide →

mcp-image

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ricardopera-mcp-image-server npx -y @ricardopera/mcp-image-server@latest \
  --env OPENAI_API_KEY="YOUR_OPENAI_API_KEY_HERE"

How to use

The MCP Image Server is a TypeScript-based service that generates custom images and icons using OpenAI's GPT Image 1 integration. It can produce PNG, SVG, and ICO outputs, with configurable sizes (1024x1024, 1536x1024, or 1024x1536) and backgrounds (transparent or opaque). The server exposes tools such as generate-image for creating images from prompts, and generate-favicon for producing favicon-style icons. It is designed to be run on-demand via MCP workflows and can be integrated with MCP clients, agents, and Vibe Coding flows. To use it, run the server via npx and provide prompts and desired formats; the server will return the generated assets saved to disk or delivered directly as part of the MCP response. The environment variable OPENAI_API_KEY is required for authentication with GPT Image 1. The repository also exposes resources for tool usage examples and supported formats to help you build MCP-driven pipelines.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to an OpenAI API key

Installation steps:

  1. Install or run via npx (no prior installation required):

    • npm install -g npm
    • npx -y @ricardopera/mcp-image-server@latest
  2. If you prefer local installation from source:

  3. Set the required environment variable for OpenAI:

    • On Windows (PowerShell): $env:OPENAI_API_KEY="your-key-here"
    • On Linux/macOS: export OPENAI_API_KEY="your-key-here"
  4. Run the server via npx (as shown in the example):

    • npx mcp-image-server
  5. Verify installation by triggering a sample tool (e.g., generate-image) through an MCP client or the provided test script.

Additional notes

Tips and known considerations:

  • The server supports PNG, SVG, and ICO formats. SVG generation is noted as temporarily unavailable in the docs; use PNG or ICO until re-enabled.
  • Ensure OPENAI_API_KEY is valid and has access to GPT Image 1 features.
  • If you encounter OPENAI_API_KEY not defined errors, double-check environment variable export in your shell or session.
  • The MCP integration expects an stdio-based command with appropriate args; adjust the server entry in your MCP client configuration accordingly.
  • The project is cross-platform; if you experience permission issues on Windows, try running the terminal as administrator.
  • You can customize image sizes, backgrounds, and quality via the provided tool parameters when making requests through MCP clients.
  • This server is designed to integrate with MCP.so workflows and can be added to the sample_config.json used by MCP clients.

Related MCP Servers

Sponsor this space

Reach thousands of developers