mcp

Makes scripts available to MCP clients such as coding agents. Clients should launch the application themselves, and communicate with it directly using the MCP stdio transport.

Each script is made available as a target. If no scripts are specified, a new empty script is made available. The application exits when the client closes its input.

Tip

To configure Claude Code to use a gaffer mcp server for the duration of each session, run this command :

claude mcp add gaffer-headless -- gaffer mcp

Caution

This gives clients full control over Gaffer, and anything else that can be done with Python.

-help

Prints names and descriptions of each parameter rather than running the application.

-threads

The maximum number of threads used for computation. The default value of zero matches the number of threads to the available hardware cores. Negative values specify a thread count relative to the available cores, leaving some in reserve for other applications. Positive values specify the thread count explicitly, but are clamped so it does not exceed the available cores.

-profileFileName

If this is specified, then the application is run using the cProfile profiling module, and the results saved to the file for later examination.

-scripts

The scripts to make available to clients.

-ignoreScriptLoadErrors

Causes errors which occur while loading the scripts to be ignored. Not recommended.