Skip to content

AI Agents

Zac Walker edited this page Nov 26, 2026 · 1 revision

Diffractor can serve its tools to an AI assistant - GitHub Copilot, Claude Desktop, Cursor or any other client of the Model Context Protocol (MCP). The assistant can then search your collection, read what a file holds, check and render Movie projects, name faces, and work Diffractor's window for you: open views, select items, fill in tasks and press their buttons.

The assistant starts its own copy of Diffractor and talks to it over its input and output. Nothing is set up inside Diffractor itself: you add it to the assistant's list of MCP servers.

Setting it up

Every client needs the same two things: the command, Diffractor's program, and the arguments, which start with -mcp.

Edition Command
Windows installer C:\Users\<you>\AppData\Local\Diffractor\diffractor64.exe
Microsoft Store diffractor, or C:\Users\<you>\AppData\Local\Microsoft\WindowsApps\diffractor.exe

GitHub Copilot in VS Code, for one workspace: .vscode/mcp.json.

{
  "servers": {
    "diffractor": {
      "type": "stdio",
      "command": "C:\\Users\\<you>\\AppData\\Local\\Diffractor\\diffractor64.exe",
      "args": ["-mcp"]
    }
  }
}

GitHub Copilot CLI, and Copilot everywhere for your account: %USERPROFILE%\.copilot\mcp-config.json, with the same entry under mcpServers.

Claude Desktop (claude_desktop_config.json) and Cursor (mcp.json) take the entry under mcpServers, without the type:

{
  "mcpServers": {
    "diffractor": {
      "command": "C:\\Users\\<you>\\AppData\\Local\\Diffractor\\diffractor64.exe",
      "args": ["-mcp", "-mcp-allow:write"]
    }
  }
}

Restart the client, or reload its MCP servers, after editing its configuration. Then ask it something about your photos: "How many photos did I take in Italy in 2019?", "Which photos have no location?", or "Make a one-minute movie of my best-rated holiday photos with a title screen".

What a session may do

A session can only read unless its arguments grant more. Add -mcp-allow: with the tiers the work needs, separated by commas: "-mcp-allow:write,capture".

Tier Allows
(none) Searching, reading files and their metadata, checking Movie projects, opening views and folders, selecting, filling in tasks and reviewing their plans, and cancelling a dialog
write Changing files and the face book: running tasks, rendering movies, rating, tagging, naming faces and the commands that change files. Acting out input in the window (ui_input, ui_act) needs it too
capture Screenshots of the window and of your media, and recordings of the window
network Reaching the internet: map tiles, update checks, crash reports, spell-check dictionaries
launch Opening another program, a folder or a web page on your desktop
dev The developer's tools: running the tests, checking translations, generating this wiki's format tables

A tool the session may not use is not offered to the assistant at all. A session without write can open a task, fill it in, analyze it and show you its review, but cannot run it.

What the assistant sees goes to its AI service. File names, metadata, people's names and screenshots that its tools return are sent to the assistant and the service behind it, under that service's privacy terms. Grant only the tiers the work needs.

The window

Tools that need the window make it the first time one is called, and load the index.

Switch The window
-mcp-ui:none (the default) Made by the first tool that needs it, out of sight. It is drawn and can be photographed, but never appears on your desktop or taskbar, and plays nothing aloud
-mcp-ui:offscreen Made at once, out of sight
-mcp-ui:visible Made at once, on your desktop, so you can watch the assistant work. Recordings need it

Keeping it apart from your own Diffractor

By default a session uses your own settings and index, so it searches the collection you see. It keeps any setting it changes to itself, and takes no file you open from Explorer, so your next open never lands in its window.

It shares your index, so it will not make its window while your own Diffractor is open with the same profile. Give it a profile of its own to run both at once, or to keep it away from your collection:

"args": ["-mcp", "-profile:D:\\Diffractor\\Agent", "-collection:D:\\Photos\\Shared"]

-profile: keeps the session's settings, index and face database in that folder; -collection: makes one folder its whole collection. See where Diffractor keeps its data.

The tools

Area Tools
The session help (the search language, the .dfv format and the tiers), status, wait_until_idle, diagnostics, log_read, job_wait, job_cancel, window
The library search, item_info, location_suggest
The window ui_state, command_list, command_run, navigate, select, dialog_respond, menu_respond, ui_input, ui_controls, ui_act, coverage
Tasks task_state, task_set
Faces faces_state, faces_select, faces_data
Pictures screenshot, record_start, record_mark, record_stop, tutorial_run
Movie movie_check, movie_render
The developer's run_tests, validate_translations, generate_docs, duplicate_report

The assistant reads each tool's description from Diffractor itself, so it knows their arguments. A few things worth knowing when you ask for work:

  • Long work - a render, a task, a test run - answers within 50 seconds with its result, or with a job the assistant waits on with job_wait or stops with job_cancel. A render stopped leaves no movie behind.
  • Dialogs that Diffractor shows - a confirmation, a question - stop the work and are handed to the assistant to answer with dialog_respond. So are the ones Windows shows while work waits on it, such as a file another program holds open.
  • Tasks - Sync, Import, Locate, Tags, Rename, Convert, Metadata and Adjust Date - are worked as you would: open, fill in, Analyze, then Run once the review is right.
  • Places: location_suggest finds photos with no location that were taken within minutes of one that has one, for Locate to place.
  • Faces: the assistant names, confirms and rejects faces as you would in the Faces view. faces_data exports or imports the face book, and needs write.

The developer documentation describes every tool in detail.

What it cannot do

  • Windows' own dialogs: a session shows no file picker, properties sheet, share sheet or disc burner, since nobody is there to answer them. A file picker answers as if cancelled.
  • Closing Diffractor: closing its input ends the session; the assistant cannot run Exit.
  • Recordings need -mcp-ui:visible, and the screen unlocked while they run.
  • Window tools from a script: -tool: runs the tools that need no window; searching and the window's tools need a session. See command line.

When it does not work

  • Ask the assistant to call status: it says what the session was started with, which tools are withheld, and which tier would allow each.
  • A session writes nothing but the protocol to its output; Diffractor's log is in diffractor.log, beside the program for the installer edition. See where Diffractor keeps its data.
  • With your own Diffractor open, give the session -profile: of its own, as above.

Clone this wiki locally