gpt-mcp
Generates images using the OpenAI API, supporting various sizes, qualities, and output formats.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gpt-mcpGenerate a logo for my app with a transparent background and save it as a PNG."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gpt-mcp
A tiny local MCP server that lets Claude generate images with the OpenAI API.
It runs on your machine, so it reaches OpenAI over your network — which is why it works even though Claude's own sandbox can't call api.openai.com directly.
Two tools (on purpose)
Both generate an image the same way; they differ only in how the result comes back, so you can compare:
Tool | Returns | Best for | Tradeoff |
| A file path (writes the PNG to disk) | Real, full-res assets | Lossless, cheap on context. Claude reads the file from disk. |
| The image inline (base64 image block) | Small previews / icons | Claude sees it immediately, but can't perfectly re-save large images, and big files are heavy to pass. |
Rule of thumb: use generate_image_to_file for anything you want to keep; use generate_image_bytes to eyeball a quick result.
Related MCP server: claude-imagine
Setup
cd gpt-mcp
npm installGet an API key from https://platform.openai.com/api-keys. For local testing you can copy .env.example → .env and paste it in. In Cowork / Claude Code you instead pass it via the server config (below).
Test it standalone (optional)
The MCP Inspector gives you a UI to call the tools directly:
OPENAI_API_KEY=sk-... npm run inspectRegister it with Claude
Claude Code (CLI):
claude mcp add gpt-mcp \
-e OPENAI_API_KEY=sk-your-key \
-e GPT_MCP_OUTPUT_DIR="/Users/kavindu/Documents/Claude/Projects/personal finance tracker/financial-app/src/assets" \
-- node "/Users/kavindu/Documents/Claude/Projects/personal finance tracker/gpt-mcp/src/index.js"Config file (Cowork / Claude Desktop / any MCP client) — add under mcpServers:
{
"mcpServers": {
"gpt-mcp": {
"command": "node",
"args": [
"/Users/kavindu/Documents/Claude/Projects/personal finance tracker/gpt-mcp/src/index.js"
],
"env": {
"OPENAI_API_KEY": "sk-your-key",
"GPT_MCP_OUTPUT_DIR": "/Users/kavindu/Documents/Claude/Projects/personal finance tracker/financial-app/src/assets"
}
}
}
}After it's connected, Claude can call generate_image_to_file / generate_image_bytes.
Parameters
Both tools accept:
prompt(required) — what to draw.size—1024x1024·1536x1024·1024x1536·auto(defaultauto).quality—low·medium·high·auto(defaultauto; higher = more cost).background—transparent·opaque·auto. Usetransparentfor logos/icons.output_format—png·webp·jpeg(defaultpng).
generate_image_to_file additionally accepts:
filename— name without extension (default: a slug of the prompt + timestamp).output_dir— where to save (default:GPT_MCP_OUTPUT_DIR, else./generated-images).
Environment variables
Var | Required | Purpose |
| yes | Your OpenAI key. |
| no | Defaults to |
| no | Default save folder for |
Notes
Images cost money on your OpenAI account (billed per image, higher quality costs more).
The server only logs to stderr — stdout is reserved for the MCP protocol.
node18+ required (uses built-infetch).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA MCP server that enables Claude and other MCP-compatible assistants to generate images from text prompts using Together AI's image generation models.Last updated14MIT
- Alicense-qualityBmaintenanceAn MCP server that enables Claude Code to generate context-aware images using local GPU-powered diffusion models, either automatically during coding or on-demand via slash commands.Last updated391MIT
- Alicense-qualityCmaintenanceMCP server that enables Claude Code to generate images using Google's Gemini image generation models.Last updatedMIT
- Alicense-qualityCmaintenanceA private MCP server that lets Claude generate images using Google Gemini/Imagen, exposing a generate_image tool.Last updated130MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for OpenAI Sora AI video generation
MCP server for Grok Imagine AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bambara123/gpt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server