AI agents
Use PAINITE from an AI agent
The painite command includes an MCP server, so an AI agent such as Claude Code or Claude Desktop can check your server, preview an enhancement, and enhance photos on your computer for you.
MCP (Model Context Protocol) is the standard way agents use tools. painite mcp runs on the same computer as the agent and talks to it over standard input and output. Photos still go only to your own PAINITE server.
Set it up
- Install and connect the command line tool. Follow Install the command line tool, then check that
painite statusworks. The MCP server uses the same settings, so there is nothing else to configure. If you use the Mac app, it shares those settings too. - Add it to your agent, as below.
Claude Code
claude mcp add painite -- painite mcp
Add --scope user to use it in every project. Run claude mcp list to check that it connects.
Claude Desktop
Open Settings › Developer › Edit Config and add PAINITE to claude_desktop_config.json, then restart Claude Desktop:
{
"mcpServers": {
"painite": {
"command": "/usr/local/bin/painite",
"args": ["mcp"]
}
}
}
Use the full path that which painite prints; Claude Desktop doesn't search your shell's PATH.
Other agents
Any MCP client that can start a local (stdio) server works: the command is painite with the argument mcp. To use a different server or token than your saved settings, set PAINITE_ENDPOINT, PAINITE_TOKEN and PAINITE_CA_FILE in the server's environment, or pass --endpoint, --token and --ca-file after mcp.
What you can ask
- “Is my PAINITE server up, and which enhancements does it have?”
- “Show me what denoise at 0.6 does to the sky in ~/Pictures/night.jpg before you run it.”
- “Denoise and then upscale every TIFF in ~/Scans/1970s into ~/Scans/enhanced.”
- “How many faces does PAINITE find in ~/Pictures/family-1962.jpg?”
- “Restore the faces in these old portraits and keep the originals.”
The agent can look at previews, so it can compare strengths or operations and pick one before processing the full photo.
Tools
server_status | Server health, GPU and queue, the enhancements with their strength ranges and default models, and limits. |
enhance_photos | Enhances one or more photos with one operation or a pipeline of up to four steps, and saves the results. Same rules as painite enhance: everything is checked first, and existing files are kept unless the agent asks to overwrite them. |
preview_enhancement | Renders one region of a photo (the center by default) and shows the result to the agent as an image. The preview matches the same region of a full run exactly. It can also save the full-size preview as a JPEG. For face, it lists every face found in the whole photo. |
submit_job | Uploads a photo and starts a job without waiting, for long batches. |
get_job | A job's state, progress, timings and any faces found. It can wait up to two minutes for the job to finish. |
download_result | Saves a finished job's result, checked against the server's checksum, then deletes the server's copy. |
cancel_job | Cancels a queued or running job. |
Good to know
- Agents should give full file paths. A path starting with
~/is understood; other relative paths are taken from the folder the agent startedpainite mcpin. - Your originals are never changed, and results are written safely, as with the command line.
- A 24-megapixel photo takes about 30 seconds per step on a DGX Spark.
enhance_photosreports progress while it works; for big batches the agent can usesubmit_jobandget_jobinstead. - The agent can read and write any file you can. Claude Code and Claude Desktop ask before running a tool unless you allow it.