Skip to content

MCP Server ​

The MCP server gives AI agents direct access to everything FFmate does. With 35 tools covering the full FFmate API, an agent can create, follow, cancel and restart tasks, submit batches, manage presets, watchfolders and webhooks, and see which FFmate instances are in a cluster.

AI agents and assistants connect in one of three ways:

  • MCP bundle – The easiest way to set up the FFmate MCP server in Claude Desktop. Download the MCP bundle, enter the address of the FFmate instance, and setup is done.
  • stdio – All the major AI agents, such as Claude Code, ChatGPT Desktop and Grok Build, work with stdio. They start the MCP server themselves and only need a few lines of configuration.
  • HTTP – If an AI agent or assistant doesn't support stdio, it can connect to the MCP server over HTTP.

The MCP server is built into FFmate and starts with the ffmate mcp command. It doesn't run tasks itself. It passes every request on to the REST API of a running FFmate instance.

The MCP server runs with one of two commands:

CommandHow the AI application connectsFor example
ffmate mcp stdioThe AI application starts the MCP server itself, on the same computer.A desktop application such as Claude Desktop
ffmate mcp httpThe MCP server keeps running, and AI applications connect to http://127.0.0.1:3001/mcp.An agent that connects over HTTP

The MCP server uses the same credentials as the FFmate instance: the username and password set with --basic-auth, or an API key. For example, an assistant that only reports on the queue gets an API key with read access. It can list tasks but not create or delete them.

In a cluster, the MCP server only needs to connect to one FFmate instance. As all FFmate instances in the cluster share one queue, an AI agent sees every task, and a task it creates can run on any of them.

Note

An AI agent with write access can create tasks, presets and watchfolders, and these can run commands on the computer FFmate runs on. Only give write access to AI agents that are allowed to do that.

Installing the MCP Bundle ​

Every FFmate release has an MCP bundle for each operating system. An MCP bundle is a .mcpb file that contains FFmate and the stdio configuration. AI agents that support MCP bundles, like Claude Desktop, are set up in one step, without a configuration file. Below are the links to the .mcpb files of the latest release:

The MCP bundle has two settings:

  • ffmate server – The URL of the FFmate instance. Default: http://localhost:3000.
  • Credentials – Only for an FFmate instance that runs with --basic-auth: either username:password or an API key.

Note

The MCP bundle doesn't start FFmate. Start an FFmate instance first, and enter its address in ffmate server.

Connecting with stdio ​

AI agents like ChatGPT Desktop, Grok Build, Claude Code and Antigravity connect with a configuration like the one below. Where the configuration goes, and in which format, depends on the AI agent:

json
{
  "mcpServers": {
    "ffmate": {
      "command": "ffmate",
      "args": [
        "mcp",
        "stdio",
        "--server=http://localhost:3000",
        "--basic-auth=ffm_f2paiZBrDmnXE3TOTSNMatx1nvdxglc5DiNGGuWXf7A"
      ]
    }
  }
}

command is the path to the ffmate binary. args starts the MCP server with mcp stdio and two flags:

  • --server [mandatory] – The URL of the FFmate instance, for example --server=http://localhost:3000.
  • --basic-auth [optional] – Only for an FFmate instance that runs with --basic-auth. Either username:password or an API key.

Connecting over HTTP ​

To run the FFmate MCP server for an AI application or agent that connects over HTTP, start it with ffmate mcp http:

sh
ffmate mcp http --server=http://localhost:3000

The MCP server listens on http://127.0.0.1:3001/mcp.

The ffmate mcp http command has three flags:

  • --server [mandatory] – The URL of the FFmate instance, starting with http:// or https://.
  • --host [optional] – The network interface the MCP server listens on. Default: 127.0.0.1. Only AI applications on the same computer can connect.
  • --port [optional] – The port the MCP server listens on. Default: 3001.

Sending Requests over HTTP ​

The MCP server doesn't store any credentials. If the FFmate instance runs with --basic-auth, every request an AI agent sends to the MCP server must include credentials, and the FFmate instance checks them. The AI agent can either send basic auth in the Authorization header or an API key in the X-API-Key header. If the AI agent only supports bearer tokens, it can send the API key as Authorization: Bearer ffm_f2paiZBrDmnXE3TOTSNMatx1nvdxglc5DiNGGuWXf7A, and the MCP server passes it on to the FFmate instance as an API key.

To call a tool, send a POST request to /mcp:

sh
curl -X POST 'http://127.0.0.1:3001/mcp' \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json, text/event-stream' \
     -H 'X-API-Key: ffm_f2paiZBrDmnXE3TOTSNMatx1nvdxglc5DiNGGuWXf7A' \
     -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "getVersion", "arguments": {}}}'

The MCP server returns the result of the tool as an event:

plain
event: message
data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"{\"version\":\"2.2.0\"}"}]}}

Anyone who can reach the MCP server can use the FFmate instance

The MCP server doesn't check credentials itself. If the FFmate instance runs without --basic-auth, everyone who can reach the MCP server can create tasks. Anyone who can create a task, preset or watchfolder can run commands on the computer FFmate runs on. Only set --host to another address than 127.0.0.1 when the FFmate instance runs with --basic-auth.

Tools ​

The MCP server has one tool for each endpoint in the Swagger UI:

AreaTools
TaskscreateTask, getTask, listTasks, cancelTask, restartTask, deleteTask
BatchescreateBatch, getBatch
PresetscreatePreset, getPreset, listPresets, updatePreset, deletePreset
WatchfolderscreateWatchfolder, getWatchfolder, listWatchfolders, updateWatchfolder, deleteWatchfolder
WebhookscreateWebhook, getWebhook, listWebhooks, updateWebhook, deleteWebhook, listWebhookExecutions
API keyscreateAPIKey, getAPIKey, listAPIKeys, rotateAPIKey, deleteAPIKey
FFmate instanceslistClients
SettingsgetSettings, saveSettings
DebugsetDebugNamespace, disableDebug
VersiongetVersion

Tools take the same input as their endpoints. Values from the path and the query string of an endpoint are arguments with the same name, for example uuid, page, perPage and status. The request body goes into the body argument. A createTask call with a body:

json
{
  "name": "createTask",
  "arguments": {
    "body": {
      "name": "Convert interview_cam_a to ProRes",
      "command": "-y -i ${INPUT_FILE} -c:v prores_ks -profile:v 3 ${OUTPUT_FILE}",
      "inputFile": "/volumes/ingest/interview_cam_a.mov",
      "outputFile": "/volumes/export/interview_cam_a_prores.mov"
    }
  }
}

Tools return the same JSON as their endpoints. A tool whose endpoint returns no body, for example deleteTask, returns success (status 204).

Note

  • If FFmate rejects a request, the tool returns an error that starts with ffmate responded with status, for example ffmate responded with status 401 when the credentials are missing.
  • An API key with read access gets ffmate responded with status 403 from every tool that creates, changes or deletes something.
  • The API key tools only work with basic auth.
  • If the MCP server can't reach the FFmate instance, the error starts with failed to reach ffmate.

Following Tasks ​

AI agents and assistants have two ways to follow a task after creating it:

  • Calling getTask – The AI agent calls getTask with the task's uuid, or getBatch for a batch, to see how far it is. FFmate doesn't set how often. The AI agent decides when to call the tool again, for example when it is asked for an update.
  • MCP tasks – AI agents that support the MCP tasks extension get progress updates automatically for createTask, restartTask and createBatch. The AI application asks the MCP server for the status with the MCP method tasks/get, and the MCP server looks it up in FFmate.

The status of the MCP task follows the status of the task:

Task statusMCP task statusStatus message
QUEUED, PRE_PROCESSING, POST_PROCESSINGworkingThe task status, e.g. QUEUED
RUNNINGworkingThe progress, e.g. RUNNING 42%
DONE_SUCCESSFULcompletedDONE_SUCCESSFUL
DONE_ERRORcompletedDONE_ERROR: and the task's error
DONE_CANCELEDcancelledDONE_CANCELED

A completed MCP task holds the finished task as its result. For a task that ended as DONE_ERROR, the result is marked as an error.

For a batch, the ID of the MCP task is batch: followed by the batch's uuid. The MCP task status stays working until every task in the batch is done, with a status message such as 50%: 1/2 tasks done, 1 running, 0 queued. Once every task is done, the MCP task returns the batch and all its tasks.

Canceling an MCP Task ​

Canceling the MCP task cancels the task. For a batch, it cancels every task that isn't done yet.

Debugging the MCP Server ​

To log every tool call the MCP server passes on to the FFmate instance, start it with --debug="*:mcp":

sh
ffmate mcp http --server=http://localhost:3000 --debug="*:mcp"

For details, see Debugging.