Generate and edit images using OpenAI's GPT-4o image generation and editing APIs with advanced prompt control.
A Model Context Protocol (MCP) tool server for OpenAI's GPT-4o/gpt-image-1 image generation and editing APIs.
No installation needed! Use directly with npx:
{
"mcpServers": {
"openai-gpt-image": {
"command": "npx",
"args": ["openai-gpt-image-mcp-199bio"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
npm install -g openai-gpt-image-mcp-199bio
Or build from source:
git clone https://github.com/199-biotechnologies/openai-gpt-image-mcp.git
cd openai-gpt-image-mcp
yarn install
yarn build
The configuration shown above in the Quick Setup section works for all MCP-compatible clients:
Just add the configuration to your MCP client's config file with your OpenAI API key.
The tools now support common aspect ratios that automatically map to OpenAI's supported sizes:
1:1
, square
, 4:3
, 3:4
→ 1024x102416:9
, landscape
, 3:2
→ 1536x10249:16
, portrait
, 2:3
→ 1024x1536auto
→ Let OpenAI choose the best sizeExample: Instead of specifying size: "1536x1024"
, you can use size: "16:9"
or size: "landscape"
.
create-image
, set n
to generate up to 10 images at once.edit-image
, provide a mask image (file path or base64) to control where edits are applied.src/index.ts
for all options.src/index.ts
yarn build
node dist/index.js
MIT
OPENAI_API_KEY
is valid and has image API access./
(e.g., /path/to/image.png
):
(e.g., C:/path/to/image.png
or C:\path\to\image.png
)result exceeds maximum length of 1048576
.~/Pictures/gpt-image/
by default/tmp
(or the directory set by the MCP_HF_WORK_DIR
environment variable)file_output
path to override the defaultfilename
parameter (e.g., "cat-playing-football", "sunset-over-mountains")MCP_HF_WORK_DIR
: Set this to control the fallback directory for large images and file outputs. Example: export MCP_HF_WORK_DIR=/your/desired/dir
Integrates the Nmap network scanning tool with MCP, enabling network scanning capabilities within MCP-compatible environments.
A Model Context Protocol server for generating visual charts using AntV.
Beautiful HTML and PNG diff visualization using diff2html, designed for filesystem edit_file dry-run output with high-performance Bun runtime.
MCP Server that exposes Creatify AI API capabilities for AI video generation, including avatar videos, URL-to-video conversion, text-to-speech, and AI-powered editing tools.
Execute JMeter tests and analyze results through MCP-compatible clients.
Performs complementary code analysis by combining Claude Code and Google's Gemini AI.
Provides call graph analysis for LLMs using the nuanced library.
Interact with the Glide API to build applications from data sources like Google Sheets.
Execute pre-configured and secure shell commands via a Go-based MCP server.
Client implementation for Mastra, providing seamless integration with MCP-compatible AI models and tools.