openai-image-mcp-secure
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENAI_ORG_ID | No | 可选:需要指定归属组织时使用,官方 SDK 识别该变量。Optional organization ID recognized by the official SDK for attribution. | |
| OPENAI_API_KEY | No | 回退用的 OpenAI 项目 API Key,仅在设置了 OPENAI_IMAGE_MCP_ALLOW_ENV_API_KEY=1 且凭据管理器中无保存值时才读取。应使用已绑定 API Organization 下的项目 Key。Fallback API key; normally the key is stored via `manage.py key` in Windows Credential Manager instead. | |
| IMAGE_OUTPUT_DIR | No | 旧版输出目录设置;策略文件中的 "output_dir" 优先于该变量及其手动保存的目录设置。Legacy output directory; a policy.json "output_dir" takes precedence. | |
| OPENAI_PROJECT_ID | No | 可选:需要指定归属项目时使用,官方 SDK 识别该变量。Optional project ID recognized by the official SDK for attribution. | |
| OPENAI_IMAGE_MCP_ALLOW_ENV_API_KEY | No | 仅当凭据库正常但没有保存值、且子进程显式设置 OPENAI_IMAGE_MCP_ALLOW_ENV_API_KEY=1 时,才回退读取 OPENAI_API_KEY。凭据库报错会终止请求,凭据管理器中保存的值始终优先。Only when set to 1 does the server fall back to reading OPENAI_API_KEY from the environment. | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Generates and edits images with OpenAI's Image API. Every image is saved to the user's image folder at full resolution; the chat receives a smaller preview plus the saved path. Use quality 'low' for quick drafts. Each call costs the user money, so don't generate more images than asked for.
Revisions: when the user asks to change an image already made or shared in this conversation ("make the cat black", "now add sunglasses"), call edit_image with the saved path of the most recent version and a prompt that states only the change plus what must stay the same. Don't call generate_image again, which draws a new, different image. Each revision is saved as a new numbered version (-v2, -v3, ...); to undo, edit an earlier version's path. Use generate_image only for a new image or when the user asks to start over.
By default the newest image model is used; list_image_models shows what the user's key can use. To change their saved default, the user runs uv run manage.py model <id> themselves.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| generate_imageA | Generates new images from a text prompt and saves them to the user's image folder. |
| edit_imageA | Revises an existing image, or combines several as references, and saves the result. |
| list_image_modelsA | Lists the OpenAI image models the user's API key can use, newest first. |
| estimate_image_costB | Offline USD quote. Include the intended prompt and reference count (including mask). An omitted prompt budgets the maximum possible UTF-8 prompt. No files are read. |
| get_usageB | Read recent request statuses, numeric usage, reservations and delivery, optionally by UUID. |
| get_cost_summaryB | Local lifetime costs grouped by exact model and status, in USD. |
| get_budget_statusA | Read local policy and remaining day/month capacity in UTC; excludes organization credits. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
generate_image and edit_image are clearly distinct (new vs. revision), and list_image_models is unambiguous. The four cost/usage tools overlap somewhat—get_budget_status, get_usage, get_cost_summary, and estimate_image_cost all relate to billing—but their descriptions distinguish current capacity, recent requests, lifetime totals, and pre-request quotes.
All tools follow a consistent snake_case verb_noun pattern: generate_image, edit_image, list_image_models, get_budget_status, estimate_image_cost, get_usage, get_cost_summary. No mixing of conventions.
Seven tools is well-scoped for an image generation server with cost and usage management. Each tool covers a distinct responsibility without excessive surface area.
Core image generation (generate, edit, list models) and cost/usage management are well covered. Minor gaps exist—no tool to list or delete saved images, or fetch metadata for a saved image—but these are not essential for the primary workflow.