clear_history
Clear edit history for the current project. Files saved to custom output paths are never deleted — only files in managed directories (.imgx/ or ~/Pictures/imgx/).
Generate and iteratively edit images with undo and redo, sessions you can switch between, and a full edit history — instead of regenerating from scratch each time.
LABSCO SUMMARY
Image iteration is inherently exploratory, and a stateless editor punishes exploration: an edit that goes wrong means regenerating and losing everything after the last good state. History with undo and redo makes trying something cheap, which is the difference between converging on what you wanted and settling for what you got. edit_last is the small ergonomic win — mid-iteration nobody knows the filename, they mean 'that one', and the tool understands that. Sessions are what let a second image exist without the first one's history getting in the way.
An image generation and editing client whose distinguishing feature is state: edits form a history with undo and redo, work is grouped into sessions, and the last image is addressable without naming a file.
An API key for at least one image provider: GEMINI_API_KEY from Google AI Studio, which has a free tier for gemini-2.5-flash-image, or OPENAI_API_KEY.
One command plus a key — npm install -g imgx-mcp, then supply credentials
USE CASES
Edit the last result repeatedly without naming files, and undo the steps that went the wrong way instead of starting again.
Read the edit history across sessions and switch into the one holding the image you want to continue.
Apply the instruction to the specific image rather than regenerating and losing what was already right.
Set the output directory before a run, and clear the project's history when starting fresh.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
clear_historyClear edit history for the current project. Files saved to custom output paths are never deleted — only files in managed directories (.imgx/ or ~/Pictures/imgx/).
edit_historyShow the full edit history with all sessions
edit_imageEdit an existing image with text instructions
edit_lastEdit the last generated/edited image with new text instructions. Uses the output of the previous generate_image or edit_image call as input.
generate_imageGenerate an image from a text prompt
list_providersList available image providers and their capabilities
redo_editRedo a previously undone edit
set_output_dirChange the default output directory for generated images
switch_sessionSwitch to a different editing session to continue work on a previous image chain
undo_editUndo the last edit, reverting to the previous image state
BEFORE YOU INSTALL
10 tools when we connected.
All 9 documented setups run the server on your machine.
CONTEXT COST
Rated by the size of the 10 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npm install -g imgx-mcp{
"mcpServers": {
"imgx": {
"command": "npx",
"args": [
"--package=imgx-mcp",
"-y",
"imgx-mcp"
],
"env": {
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}{
"mcpServers": {
"imgx": {
"command": "npx",
"args": [
"--package=imgx-mcp",
"-y",
"imgx-mcp"
],
"env": {
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"IMGX_PROJECT_ROOT": ""
}
}
}
}{
"mcpServers": {
"imgx": {
"command": "cmd",
"args": [
"/c",
"npx",
"--package=imgx-mcp",
"-y",
"imgx-mcp"
],
"env": {
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"IMGX_PROJECT_ROOT": ""
}
}
}
}[mcp_servers.imgx]
command = "npx"
args = ["--package=imgx-mcp", "-y", "imgx-mcp"]
[mcp_servers.imgx.env]
GEMINI_API_KEY = "<YOUR_GEMINI_API_KEY>"
OPENAI_API_KEY = "<YOUR_OPENAI_API_KEY>"{
"mcpServers": {
"imgx": {
"command": "npx",
"args": [
"--package=imgx-mcp",
"-y",
"imgx-mcp"
],
"env": {
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
}
}
}
}