mcpField
4
4o-image MCP Server

4o-image MCP Server

Local
github.com/AntipasMedia & Design4Updated 79w ago

About 4o-image MCP Server

4o-image MCP Server connects the 4o-image API to MCP clients for text-based image generation and editing. It also reports generation progress and can open finished images in the default browser.

Key features

  1. 01Generate images from text prompts
  2. 02Edit images using text prompts
  3. 03Report generation progress
  4. 04Open generated images in browser

Use cases

  1. 01Create artwork from a written description
  2. 02Apply prompt-based edits to an existing image

MCP support

Exposes a generateImage tool to MCP clients. It accepts a prompt and an optional base64-encoded image for editing or style transfer.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"4oimage": {
"command": "npx",
"args": [
"-y",
"4oimage-mcp"
],
"env": {
"API_KEY": "<API_KEY>"
}
}
}
}
Run commandnpx -y 4oimage-mcp
Environment variables to set
API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm4oimage-mcp

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
promptstringYesText description of the desired image content
imageBase64stringNoOptional base image (Base64 encoded) for image editing or upscaling

Details

From the project README

4o-image MCP Server

An MCP server implementation that integrates with 4o-image API, enabling LLMs and other AI systems to generate and edit images through a standardized protocol. Create high-quality art, 3D characters, and custom images using simple text prompts.

mcp-4o-Image-Generator MCP server

npm version Node.js Version License: MIT

Features

  • Text-to-Image Generation: Create images from text descriptions with AI
  • Image Editing: Transform existing images using text prompts
  • Real-time Progress Updates: Get feedback on generation status
  • Browser Integration: Automatically open generated images in your default browser

Tools

  • generateImage
    • Generate images based on text prompts with optional image editing
    • Inputs:
      • prompt (string, required): Text description of the desired image
      • imageBase64 (string, optional): Base64-encoded image for editing or style transfer

Configuration

Getting an API Key
  1. Register for an account at 4o-image.app
  2. Obtain your API key from the user dashboard
  3. Set the API key as an environment variable when running the server
Usage with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "4o-image": {
      "command": "npx",
      "args": [
        "-y",
        "4oimage-mcp"
      ],
      "env": {
        "API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Example Usage

Here's an example of using this MCP server with Claude:

Generate an image of a dog running on the beach at sunset

Claude will use the MCP server to generate the image, which will automatically open in your default browser. You'll also get a direct link to the image in Claude's response.

For image editing, you can include a base image and prompt Claude to modify it:

Edit this image to make the sky more dramatic with storm clouds

License

This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.