---
url: 'https://docs.flimra.ai/agents/mcp.md'
description: >-
  Connect Claude Desktop, Claude Code, Codex, Cursor or another MCP assistant to
  Flimra on your Mac and drive it with the same tools as the in-app chat.
---

# Drive Flimra from another assistant (MCP)

Flimra runs an MCP server on your Mac. An assistant on the same Mac (Claude Desktop, Claude Code, Codex, Cursor or any other MCP client) can drive Flimra with exactly the same tools as Flimra's own [chat](/agents/chat). Ask it to "list the scenes of the open project" or "draw the pictures of scene 2", and it works from start to finish without anyone clicking in Flimra.

The server is reachable only from this Mac. Web-based assistants that need a public HTTPS address, such as custom connectors on claude.ai or the ChatGPT chat, cannot reach it.

## Before you start

* Flimra is running on the same Mac.
* The MCP server is on. It is on by default, on port 47615. You will find it in Account → **Connections** → **Claude and other assistants**.
* For anything that goes through your Flimra account (generation, planning, the account's details), you are signed in and have credits.

## Connect your assistant

Do this once. The connection keeps working after Flimra restarts or updates.

Open Account → **Connections** → **Claude and other assistants**. Each assistant has its own row with an **Add** button, and each row says whether Flimra is already added. The same buttons appear at the end of onboarding.

### Claude Desktop

Click **Add** on the Claude Desktop row. Claude Desktop opens Flimra's extension and asks you to install it. There is no file to edit and nothing else to install. The extension's settings hold the port.

### Claude Code

Click **Add** on the Claude Code row. Flimra registers itself with Claude Code for your user, at the port it is on now. A new Claude Code session sees it, and `/mcp` lists it as *flimra*.

### Codex

Click **Add** on the Codex row. Flimra adds itself to Codex's configuration, which the Codex app, its CLI and its IDE extension share. A new Codex thread sees it. The entry it writes looks like this:

```toml
[mcp_servers.flimra]
url = "http://127.0.0.1:47615/mcp"
http_headers = { Authorization = "Bearer <token>" }
```

### Cursor and other assistants

Point the assistant at the server by hand:

* **Address:** `http://127.0.0.1:47615/mcp` (Streamable HTTP).
* **Token:** every request sends `Authorization: Bearer <token>`. The token is the contents of the file `~/Library/Application Support/Flimra/mcp-token`. It stays the same for good, so you only set it up once.

An assistant that can only start programs can reach the server through `mcp-remote`:

```sh
npx mcp-remote http://127.0.0.1:47615/mcp --header "Authorization: Bearer <token>"
```

Keep the token private. Anyone who has it can drive Flimra on your Mac.

## Using it

The assistant sees every Flimra tool by name (`list_story`, `run_gens`, `set_workspace` and the rest; see [Chat and MCP tools](/reference/chat-tools)) and receives Flimra's guide to them when it connects. To find out where you are in the app, it calls `status`: the workspace, the open project and timeline, the viewer's position and your selection.

Every call shows in Flimra's chat panel as a tool line marked *· MCP*, so you can watch what the assistant does.

* **Pictures.** `look_at` returns pictures as images: a gen, a version, a file, a PDF page, or a blocking's camera frames.
* **Skills.** Before writing a prompt or staging a blocking itself, an assistant should read the skill Flimra's own prompt writer uses. `get_skill` lists them and returns one by name; they are also MCP resources.
* **Waiting.** `wait_for_activity` waits for long work. Your assistant's tool timeout may be shorter; in Claude Code, raise it with `MCP_TOOL_TIMEOUT`.

## Paying for work

A call from an assistant shows no card in Flimra. Your assistant's own permission prompt is where you say yes. When a call costs credits, the result says the most it can cost, and its line in Flimra's chat says so too.

**When your workspace asks before spending** (Account → **Plan & credits** → **Ask before every paid run**), a paid call or a planning call does not run straight away. It answers `needs_confirmation` with the price (an estimate for planning work) and what it is. The assistant should tell you, and once you agree, call the tool again with the same arguments plus `confirmed_credits` set to that price. If the job has changed and the price is different, it asks again.

With that switch off, paid calls run at once at the price shown. Calls that change your Resolve or Premiere project run at once too, so make sure your assistant asks before it calls them.

## Changing the port

Change the port on the **Claude and other assistants** card (Return applies it), or turn the server off there. Assistants set up with the old port need the new one. For Claude Desktop, change it in the extension's settings; for Claude Code and Codex, click **Add again**.

## When something goes wrong

* **Not allowed (403).** The assistant sent no token or the wrong one. Click **Add again** for Claude Code or Codex, or copy the token again from the file.
* **"Flimra has not run on this Mac yet."** The Claude Desktop extension found no token. Open Flimra once.
* **"Flimra is not running on this Mac, or its MCP server is not on port …"** Open Flimra, or set the same port on both sides. Claude Code shows the server as failed until Flimra runs; reconnect it in `/mcp`.
* **"Not running: port … is taken by another program"** on the card. Choose another port.

## Related

* [The chat](/agents/chat)
* [Chat and MCP tools](/reference/chat-tools)
* [ComfyUI](/agents/comfyui)
* [Account and credits](/projects/account)
* [3D blocking](/generate/blocking)
