OpenAI Image
v0.5.0OpenAI image generation MCP server for Model Context Protocol hosts
Values you need
| Variable | What it is | |
|---|---|---|
OPENAI_API_KEY | required secret | OpenAI API key with image generation access |
MCP_WORKSPACE_PATH | optional | Workspace directory for saving generated images |
OPENAI_IMAGE_MODEL | optional | Override the default OpenAI image model identifier Default: gpt-image-2.6-sunburst |
OPENAI_IMAGE_REQUEST_TIMEOUT_MS | optional | Outbound HTTP request timeout in milliseconds (max 1800000) Default: 180000 |
MCP_ALLOWED_SYMLINK_ROOTS | optional | 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_PORT | optional | 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.0Add 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
- Ask the user for: OPENAI_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: generate_image, edit_image.
- 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