Skip to main content
Glama
wenkezhi8

2Xapi.com GPT-image MCP Server

by wenkezhi8

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IMAGE_API_KEYYes你自己的 API Key(计费到你的账号)
IMAGE_CONFIG_PATHNo覆盖配置文件保存路径(默认 ~/.gpt-image-mcp/config.json)
IMAGE_API_BASE_URLNo覆盖接口根地址(到 /v1);默认用内置端点

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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