xmo-image-mcp
v0.1.0
Published
XMO Image MCP Server - AI-powered image generation and editing using Gemini 2.5 Flash Image
Maintainers
Readme
XMO Image MCP Server
AI-powered image generation and editing server using Gemini Image model via XMO API.
Features
- Generate Images: Create new images from text prompts
- Edit Images: Modify existing images with natural language instructions
- Reference Images: Use multiple reference images for better editing results
- Continue Editing: Iteratively improve images without specifying file paths
- Session State: Automatic tracking of last edited image for seamless workflow
Installation
npm install
npm run buildConfiguration
Set your XMO API key as an environment variable:
export XMO_APIKEY="your-api-key-here"Or provide it directly when calling the tools.
Optional Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| XMO_APIKEY | - | Your XMO API key |
| MODEL_NAME | gemini-3.1-flash-image-preview | Model to use for generation |
| XMO_BASE_URL | https://llm-provider.xm-opt.com/v1beta/models | API base URL |
Usage
As MCP Server
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"xmo-image": {
"command": "node",
"args": ["/path/to/xmo-image-mcp/dist/index.js"],
"env": {
"XMO_APIKEY": "your-api-key-here"
}
}
}
}Development
# Build and run
npm run dev
# Build only
npm run buildAvailable Tools
get_server_info
Get server information including model name and base URL.
Parameters: None
generate_image
Generate a new image from text prompt.
Parameters:
prompt(string, required): Text description of the image to createapi_key(string, optional): Your XMO API key
edit_image
Edit a specific existing image file.
Parameters:
imagePath(string, required): Full file path to the image to editprompt(string, required): Text describing the modificationsapi_key(string, optional): Your XMO API keyreferenceImages(array, optional): Array of file paths to reference images
continue_editing
Continue editing the last image generated or edited in the session.
Parameters:
prompt(string, required): Text describing the modificationsapi_key(string, optional): Your XMO API keyreferenceImages(array, optional): Array of file paths to reference images
get_last_image_info
Get information about the last generated/edited image.
Parameters: None
Output Location
Generated and edited images are saved to:
- Windows:
%USERPROFILE%\Documents\xmo-images\ - macOS/Linux:
./generated_imgs/(or~/xmo-images/if in system directories)
File naming format: {prefix}-{timestamp}-{randomId}.png
Requirements
- Node.js >= 18.0.0
- XMO API key
License
MIT
Repository
https://github.com/xm-opt/xmo-image-mcp
