# Using FCS with AI Agents (MCP) Starting with FCS 26.10, FCS provides a local Model Context Protocol (MCP) server. MCP-compatible AI agents can inspect the current FCS session, operate supported workflows, and read the bundled FCS operating guide to directly assist you with time-consuming, mechanical tasks. :::{warning} **Enable MCP Server** The MCP interface allows compatible AI applications to access FCS features and perform actions on your behalf. Only connect FCS to MCP clients and AI applications that you trust. Depending on the tools you enable, the connected application may be able to read project information, modify data, execute operations, or transmit information to third-party services. Data sent through MCP is subject to the privacy practices and terms of the application or service you connect to. AI-generated tool requests may be incorrect or influenced by malicious content. Backup your files and review important or destructive actions before allowing them to execute. You are responsible for configuring and using third-party MCP clients appropriately. ::: ## Before You Start You need: - FCS 26.10 or later with a valid license, running on the same computer as the AI agent. - An MCP client that supports Streamable HTTP servers on the local computer. FCS must remain open and licensed while the agent is working on it. The MCP server listens only on `127.0.0.1`, so it is not available to other computers or to cloud-only agents. ## Enable the MCP Server 1. Launch FCS normally. The procedure is the same for the installed FCS executable and for a Python/script launch. 2. Open **Settings** and expand **MCP Server**. 3. Enable **Enable MCP Server**. 4. Review the warning and select **I understand and accept**. 5. Keep the default port, `19877`, unless it conflicts with another local program. 6. Save the settings. 7. Confirm that the status displays **Listening at [http://127.0.0.1:19877/mcp](http://127.0.0.1:19877/mcp)**. Use the complete URL shown by FCS when configuring a client. If you change the port, use the updated URL in every client configuration. Port `19876` is reserved by FCS and cannot be used for MCP. ## Connect an AI Agent The setup is performed once for each agent. Name the server `fcs` or `FCS` and use the URL displayed in FCS. ### ChatGPT Desktop and the Codex App 1. Open **Settings > Plugins > MCP**. 2. Select **Add server**. 3. Enter `FCS` as the name and select **Streamable HTTP**. 4. Enter `http://127.0.0.1:19877/mcp` as the URL. 5. Save the server and restart the app when prompted. This applies to local ChatGPT/Codex clients that support custom MCP servers. ChatGPT in a web browser cannot connect directly to the FCS loopback address. ### Codex CLI Run: ```powershell codex mcp add fcs --url http://127.0.0.1:19877/mcp ``` Use `codex mcp list` to check the connection. Inside Codex, use `/mcp` to view the connected server and its tools. ### Claude Code Run: ```powershell claude mcp add --transport http --scope user fcs http://127.0.0.1:19877/mcp ``` The user scope makes FCS available in future Claude Code sessions on this computer. Run `claude mcp list` to check the connection. ### Visual Studio Code and GitHub Copilot 1. Open the Command Palette with **Ctrl+Shift+P**. 2. Run **MCP: Add Server**. 3. Select **HTTP**, enter the FCS URL, and name the server `FCS`. 4. Choose the global/user profile location so that the connection is available outside one workspace. 5. Open Chat and use **Configure Tools** to confirm that the FCS tools are available. ### OpenCode Add a remote MCP server to the OpenCode configuration: ```json { "$schema": "https://opencode.ai/config.json", "mcp": { "servers": { "fcs": { "type": "remote", "url": "http://127.0.0.1:19877/mcp", "oauth": false } } } } ``` FCS does not require OAuth because the endpoint is restricted to the local computer. Check the MCP server list in OpenCode after saving the configuration. ### Claude Desktop Claude Desktop custom connectors are intended for remotely reachable servers and cannot be assumed to reach FCS at `127.0.0.1`. FCS currently does not ship the separate stdio bridge required by Claude Desktop's traditional local MCP configuration. Use Claude Code or another local Streamable HTTP client instead. ## Available Workflows The public MCP tools cover these areas: - Application and session status checks, session creation, opening, inspection, and saving. - Video importing and selection, along with browsing video libraries. - Single and batch processing, including job status checks, progress monitoring, and cancellation. - Session exporting, export path validation, and retrieval of default export settings. - DCC integration, including status checks, connection testing, launching, and scene opening. - Processing profiles and application settings, including checks and updates. - Profile / Gallery operations, including searching and filtering, updating, predicting, and deleting, alongside timeline navigation. - Controller management, including data retrieval, editing, reordering, preset application, renderer synchronization, and explicit saving. FCS intentionally exposes a curated set of named tools. License management and internal application commands are not available through MCP. The exact tool list is discovered automatically by the client when it connects. ## Sample Interactions Once connected, you can request status checks, operational tasks, or workflow execution directly through the agent. The agent handles the necessary steps based on integrated FCS rules. Below are examples of how you can interact with the agent: :::::{container} mcp-chat :::{container} mcp-chat-turn mcp-chat-user **User** 添付した作業リストと `D:/FacialCapture/SampleCapture` 内のデータから、FCS の MCP を用いて `D:/FacialCapture/SampleProject/Sessions` に作業に必要なセッションをすべて作成し、 動画のインポートも実行してください。 ::: ::::{container} mcp-chat-turn mcp-chat-agent **Agent** `D:/FacialCapture/SampleProject/Sessions` は存在するが空です。作業リストと照らし合わせると、 `D:/FacialCapture/SampleCapture/Assets/scenes` には `Hero_001` と `Extra_001`、`Side_001` のシーンしかなく、作業リスト上の `Side_A`、`Side_B`、`Extra_A` 用のシーンがありません。 いくつか確認させてください。 :::{container} mcp-chat-sep . ::: :::{container} mcp-chat-q-title **1. セッションはどのように作成しますか?(1つ選択)** ::: :::{container} mcp-choice is-selected **アクター別セッション(推奨)** — Alice→`Hero_001`、Bob→`Side_A`+`Side_B`、Carol→`Extra_A` の計4セッション。存在しないシーンは後で差し替え ::: :::{container} mcp-choice **3セッション(actor=performer)** — Alice/Bob/Carol の各アクターにキャラは先行文字(`Hero_001` 等)を指定 ::: :::{container} mcp-choice `Hero_001` **のみ** — Alice→`Hero_001` のみ作成し動画もそれだけインポート ::: :::{container} mcp-choice **自分の回答を入力** — 自由記入 ::: :::{container} mcp-chat-sep . ::: :::{container} mcp-chat-q-title **2. シーンが存在しないキャラ(`Side_A`、`Side_B`、`Extra_A`)のセッションはどのシーンを指定しますか?(1つ選択)** ::: :::{container} mcp-choice `Hero_001` **のシーンで代用(推奨)** — 試験環境なので `Hero_001` のシーンを流用し、`maya_base` は `D:/FacialCapture/SampleCapture/Assets` を指定 ::: :::{container} mcp-choice `Extra_001` **シーンを指定** — `Extra_001_setup_FacialBase.ma` を指定 ::: :::{container} mcp-choice **シーンを指定する** — 自分でシーンと `maya_base` を指定する ::: :::{container} mcp-choice is-selected **自分の回答を入力** — `Side_A` と `Side_B` は `Side_001` に、`Extra_A` は `Extra_001` にまとめて進めて ::: :::{container} mcp-chat-sep . ::: :::{container} mcp-chat-q-title **3. Maya バージョンは何を指定しますか?(1つ選択)** ::: :::{container} mcp-choice **2023(推奨)** — 既存セッションと同じ設定 ::: :::{container} mcp-choice **2022** — 2022 を指定 ::: :::{container} mcp-choice **2024** — 2024 を指定 ::: :::{container} mcp-choice is-selected **自分の回答を入力** — 対応する Maya シーンから読み取って ::: :::{container} mcp-chat-sep . ::: :::{container} mcp-chat-q-title **4. インポートする動画はどのセットですか?(1つ選択)** ::: :::{container} mcp-choice is-selected `01_HMC` + `04_ROM` **(推奨)** — `01_HMC\01_Alice`、`02_Bob`、`03_Carol` の動画 + `04_ROM` の ROM 動画を各セッションへ。`02_Reference` / `03_4view` は除外 ::: :::{container} mcp-choice `01_HMC` **のみ** — `01_Alice` / `Bob` / `Carol` フォルダの mp4 のみ各セッションへ ::: :::{container} mcp-choice **すべて(Reference 含む)** — 01~04 の全 mp4(`02_Reference`、`03_4view_Ref` も含む)を該当セッションへインポート ::: :::{container} mcp-choice **自分の回答を入力** — 自由記入 ::: :::{container} mcp-chat-sep . ::: :::{container} mcp-chat-status 作業中… ::: :::{container} mcp-chat-sep . ::: :::{container} mcp-chat-answers-done 完了しました。3つの FCS セッションを作成し、対応動画と ROM をインポート済みです。 ::: ```{list-table} :header-rows: 1 :widths: 22 28 50 :align: left * - Actor / Character - Maya scene - インポート動画 * - Alice / Hero_001 - `Hero_001_setup_FacialBase.ma` - 19本 + ROM 1本 * - Bob / Side_001 - `Side_001_setup_FacialBase.ma` - 16本 + ROM 1本 * - Carol / Extra_001 - `Extra_001_setup_FacialBase.ma` - 13本 + ROM 1本 ``` シーンは `D:/FacialCapture/SampleCapture/Assets`、Maya 2025 で作成しました。 作成先は `D:/FacialCapture/SampleProject/Sessions/FCS/` です。 現在は `Bob / Side_001` セッションを開いた状態です。 :::: :::{container} mcp-chat-turn mcp-chat-user **User** `Alice / Hero_001` のセッションに切り替えて、Mayaを開いたりシーンを解析したりして、コントローラの登録を行ってほしい。 適切な region と min/max/default も含めて登録して。 ::: :::{container} mcp-chat-turn mcp-chat-agent **Agent** 完了しました。 **実施内容 (**`Alice / Hero_001` **セッション)**: 1. **セッション切替** — `Alice / Hero_001` を開きました(動画20本、controller_count 0 からスタート) 2. **Maya シーンからパース** — `Hero_001_setup_FacialBase.ma` から `CTRL_`* ノードを抽出し、 Metahuman プリセットの命名(例: `CTRL_L_brow_down.ty`)と一致することを確認 3. **登録・保存** — Metahuman プリセット経由で 174 コントローラをリージョン付きで登録し保存 **登録結果**: - upper: 28行(眉・鼻・首など) - eyelid: 18行(瞬き・まぶたなど) - gaze: 5行 - lower: 123行(口・舌・顎・歯) - 合計 **174行** — すべて min=0.0 / max=1.0 / default=0.0 で保存済み ::: :::{container} mcp-chat-turn mcp-chat-user **User** 一部のコントローラは min が -1 だったと思う。確認して修正してほしい。 ::: :::{container} mcp-chat-turn mcp-chat-agent **Agent** 確認・修正完了です。 **調査結果** — Mayaシーン内の各CTRLノードをcommadPortで解析し、各チャンネルの接続先を判定しました: - 双方向に動くチャンネル(`tx`、または Up/Down のような逆向きペアに接続される `ty`)はレンジ -1..1 が正しい - 単一の表情(例: `brow_down` → `browDownL`)に繋がる `ty` は 0..1 のまま **修正内容** — 双方向駆動の 77 コントローラの `min_value` を `-1.0` に更新して保存しました: - upper: nose、neck 系など - eyelid: blink、eyelid 系など - gaze: `CTRL_L/R_eye.tx/.ty` - lower: mouth、lips、jaw、teeth、tongue 系など **検証済み** — `ControllerInfo.yaml`に min_value: -1.0が77行反映、全174行の登録が維持されています。シングル方向のコントローラ(`brow_down`、`jawOpen` など)は適切に 0..1 のままです。 ::: ::::: ## Review Actions Before Approval Your MCP client may request approval before a tool runs. Read the proposed action carefully, particularly before allowing an agent to: - Delete ROMs or cancel processing jobs. - Change and save application settings. - Save a session or controller table. - Start processing or export files. Prefer asking the agent to inspect or validate first, summarize the planned changes, and perform the mutation only after you approve it. Controller edits remain a working draft until the agent explicitly saves them. ## Troubleshooting ### FCS shows Disabled Enable **MCP Server** in Settings and save. Merely changing the checkbox without saving does not apply the setting. ### FCS shows Waiting for a valid license Complete FCS license activation. The endpoint starts only while the license is valid. ### FCS shows an error or the port is already in use Choose another port from `1024` through `65535`, except `19876`, save the settings, and update the URL in the AI agent. ### The agent cannot connect Confirm that FCS is still open, its status says **Listening**, and the client URL exactly matches the status URL, including `/mcp`. A client running on another computer, in a remote development environment, or only in the cloud cannot reach the FCS `127.0.0.1` endpoint. ### The agent connects but an action is rejected Check that the FCS license is still valid. The requested operation may also be outside the curated public tool set or may require an open session, selected video, renderer connection, or other FCS state. Ask the agent to inspect the application and session status before retrying. ## Client Documentation - [ChatGPT and Codex MCP](https://learn.chatgpt.com/docs/extend/mcp.md) - [Claude Code MCP](https://code.claude.com/docs/en/mcp) - [Visual Studio Code MCP servers](https://code.visualstudio.com/docs/agent-customization/mcp-servers) - [OpenCode MCP servers](https://opencode.ai/v2/docs/mcp-servers)