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

  1. Install and connect the command line tool. Follow Install the command line tool, then check that painite status works. 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.
  2. 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

The agent can look at previews, so it can compare strengths or operations and pick one before processing the full photo.

Tools

server_statusServer health, GPU and queue, the enhancements with their strength ranges and default models, and limits.
enhance_photosEnhances 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_enhancementRenders 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_jobUploads a photo and starts a job without waiting, for long batches.
get_jobA job's state, progress, timings and any faces found. It can wait up to two minutes for the job to finish.
download_resultSaves a finished job's result, checked against the server's checksum, then deletes the server's copy.
cancel_jobCancels a queued or running job.

Good to know