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);默认用内置端点 |
Capabilities
Features and capabilities supported by this server
| 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. |
| 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 | |
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/wenkezhi8/2Xapi.com-GPT-image-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server