Generates and edits images with OpenAI's GPT image models, including inpainting and outpainting.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add openai-gpt-image --env OPENAI_API_KEY='<OPENAI_API_KEY>' -- node /absolute/path/to/dist/index.js~/.codex/config.toml
[mcp_servers.openai-gpt-image]
command = "node"
args = ["/absolute/path/to/dist/index.js"]
env = { OPENAI_API_KEY = "<OPENAI_API_KEY>" }
# codex mcp add openai-gpt-image --env OPENAI_API_KEY='<OPENAI_API_KEY>' -- node /absolute/path/to/dist/index.js~/.cursor/mcp.json
{
"mcpServers": {
"openai-gpt-image": {
"command": "node",
"args": [
"/absolute/path/to/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"openai-gpt-image": {
"type": "stdio",
"command": "node",
"args": [
"/absolute/path/to/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"openai-gpt-image": {
"command": "node",
"args": [
"/absolute/path/to/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"openai-gpt-image": {
"command": "node",
"args": [
"/absolute/path/to/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"openai-gpt-image": {
"command": "node",
"args": [
"/absolute/path/to/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>"
}
}
}
}Environment variables
OPENAI_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.