2Xapi.com GPT-image MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IMAGE_API_KEY | Yes | 你自己的 API Key(计费到你的账号) | |
| IMAGE_CONFIG_PATH | No | 覆盖配置文件保存路径(默认 ~/.gpt-image-mcp/config.json) | |
| IMAGE_API_BASE_URL | No | 覆盖接口根地址(到 /v1);默认用内置端点 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
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
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_configA | Show the current GPT-image configuration: API endpoint, model, default size, save directory, and config file path. The API key is masked. Use set_config to change any of these values. |
| set_configA | Update one or more GPT-image settings and persist them to the config file. Any field left null/omitted is unchanged. Changes take effect immediately for subsequent generate_image calls — no restart needed. Fields: api_base_url, api_key, model, size, save_dir. |
| set_moderationA | Configure the moderation gate that screens every prompt BEFORE it reaches the image API. When enabled, prompts judged as disallowed are rejected to protect the account from risk control. Any argument left null is unchanged. Changes persist to config.json and take effect immediately. Pass enabled=false to turn moderation off. |
| generate_imageA | Generate one or more images from a text prompt via the configured OpenAI-compatible image API. Endpoint, key and default model come from config (see get_config / set_config); per-call args override them. Returns the image URL, and the local path if save_dir is set or save=true. |
| edit_imageA | Edit, transform, combine or extend one or more input images following a text prompt (image + text to image, aka img2img) via the configured OpenAI-compatible images/edits API. Each image reference can be a local file path, an http(s) URL, a data: URI, or raw base64. An optional mask marks the region to regenerate. Returns the edited image URL(s) and metadata; optionally saves locally. Endpoint, key and default model come from config (see get_config / set_config). |
| list_image_modelsA | List the models exposed by the configured image backend (GET /models). |
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 6 tools
Each tool has a clearly distinct purpose: configuration get/set, moderation control, image generation, image editing, and model listing. There is no meaningful overlap or ambiguity between tool boundaries.
All tools follow a consistent verb_noun snake_case pattern: get_config, set_config, set_moderation, generate_image, edit_image, list_image_models. Verb choice and naming style are uniform throughout.
Six tools is well-scoped for an image generation MCP server: configuration, moderation, generation, editing, and model discovery. Each tool earns its place without unnecessary bloat or missing essentials.
The core workflow is covered: configuring the backend, generating images, editing images, and listing available models. The only minor gap is that get_config does not explicitly expose current moderation settings, though set_moderation persists them to config.json.