ScreenflareDocs

Agents and the command line

Let AI agents and scripts take screenshots, record, edit, and export through Screenflare.

Screenflare includes an MCP server and a screenflare command. AI agents (Claude, Cursor, Codex, or any MCP client) and your own scripts can use them to capture the screen, read text, record, change a recording's look, and export it. Everything runs through the Screenflare app on your Mac.

Turn it on

Open Settings → Agents and turn on Allow agents and the command line. If a tool connects while it is off, Screenflare asks once before letting it in.

Agents connect through a private socket that only apps running as you can open, and they capture with Screenflare's own Screen Recording permission. Turn the setting off to disconnect them all at once.

Only connect tools you trust

Once allowed, an agent can take screenshots, record your screen, and edit and export recordings without asking again.

Connect an MCP client

In Settings → Agents:

  • MCP server → Copy Config copies a configuration to paste into your client's MCP settings (Claude Desktop, Cursor, Codex, and others):

    {
      "mcpServers": {
        "screenflare": {
          "command": "/usr/local/bin/screenflare",
          "args": ["mcp"]
        }
      }
    }
  • Claude Code → Copy Command copies a command to run in a terminal:

    claude mcp add screenflare -- /usr/local/bin/screenflare mcp

The copied path points to the installed command when there is one, and to the copy inside Screenflare.app otherwise. Both keep working across app updates.

Use the command line

Under Command-line tool, click Install… to put screenflare in /usr/local/bin. macOS may ask for your password. Every command prints its result as JSON.

# Screenshot Safari's frontmost window
screenflare screenshot --app Safari shot.png

# Record a window for 10 seconds and wait for the project
screenflare record --window-id 4021 --duration 10 && screenflare wait

# Export the latest recording as a 720p GIF
screenflare export latest --format gif --resolution 720p -o demo.gif
CommandWhat it does
statusApp version, recording state, permissions, and library folders
displays, windows, devicesList displays, windows, microphones, and cameras to target
screenshotCapture a display, window, app, or area as a PNG
ocrRead the text in an image or a fresh capture, on your Mac
record, pause, resume, stop, discard, waitControl a recording
recordings, infoList recordings and show one's full edit settings
editChange a recording's settings, apply a style preset, or rename it
exportRender to MP4, HEVC, GIF, or ProRes
openOpen a recording in the editor
screenshots, presetsList Screenshot History and saved style presets
mcpServe every command as an MCP tool over stdio

Run screenflare <command> --help for a command's options, or screenflare tools to print the MCP tool catalog.

Need help? Troubleshooting

On this page