OpenAI Image

v0.5.0
io.github.mindstone/mcp-server-openai-image Checked 5 days ago Published 24 days ago

OpenAI image generation MCP server for Model Context Protocol hosts

Values you need

VariableWhat it is
OPENAI_API_KEYrequired secret OpenAI API key with image generation access
MCP_WORKSPACE_PATHoptional Workspace directory for saving generated images
OPENAI_IMAGE_MODELoptional Override the default OpenAI image model identifier Default: gpt-image-2.6-sunburst
OPENAI_IMAGE_REQUEST_TIMEOUT_MSoptional Outbound HTTP request timeout in milliseconds (max 1800000) Default: 180000
MCP_ALLOWED_SYMLINK_ROOTSoptional JSON array of absolute paths the connector may read through (and write generated images through) in-workspace symlinks that resolve into them. Mirrors the host's built-in file-tool declared-Space roots. Malformed or partially-malformed values fail closed to workspace-only. Optional; standalone users
MCP_HTTP_PORToptional When set, serve MCP over HTTP on this port bound to 127.0.0.1 (loopback only) instead of stdio. Intended for host-managed local deployments; stdio hosts omit it.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add mcp-server-openai-image -e 'OPENAI_API_KEY=<OPENAI_API_KEY>' -- npx -y @mindstone/mcp-server-openai-image@0.5.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-server-openai-image": {
      "args": [
        "-y",
        "@mindstone/mcp-server-openai-image@0.5.0"
      ],
      "command": "npx",
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-server-openai-image": {
      "args": [
        "-y",
        "@mindstone/mcp-server-openai-image@0.5.0"
      ],
      "command": "npx",
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "OPENAI_API_KEY",
      "id": "openai-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-server-openai-image": {
      "args": [
        "-y",
        "@mindstone/mcp-server-openai-image@0.5.0"
      ],
      "command": "npx",
      "env": {
        "OPENAI_API_KEY": "${input:openai-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-server-openai-image]
command = "npx"
args = ["-y", "@mindstone/mcp-server-openai-image@0.5.0"]
env = { "OPENAI_API_KEY" = "<OPENAI_API_KEY>" }

For AI agents

  1. Ask the user for: OPENAI_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: generate_image, edit_image.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json