DalamudMCP.Cli 1.2.0

{
  "servers": {
    "DalamudMCP.Cli": {
      "type": "stdio",
      "command": "dnx",
      "args": ["DalamudMCP.Cli@1.2.0", "--yes", "--", "serve", "mcp"]
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global DalamudMCP.Cli --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local DalamudMCP.Cli --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DalamudMCP.Cli&version=1.2.0
                    
nuke :add-package DalamudMCP.Cli --version 1.2.0
                    

DalamudMCP: FFXIV MCP Server for Dalamud

DalamudMCP is a Windows-local Model Context Protocol (MCP) server and Dalamud plugin for Final Fantasy XIV (FFXIV / FF14). It connects MCP-compatible AI clients and a command-line interface to a running game session through a current-user-only local bridge.

日本語: セットアップガイド

DalamudMCP requires Windows, Final Fantasy XIV, and Dalamud. Observation tools are enabled by default, while actions and unsafe integrations require explicit opt-in from the plugin UI.

Requirements

  • Windows with Final Fantasy XIV running through XIVLauncher and Dalamud
  • .NET SDK 10.0.201 or a later 10.0 feature band for building and running the CLI from source (pinned in global.json; the build scripts prefer a repository-local .dotnet\dotnet.exe when present)
  • a local Dalamud development installation for building the plugin

Quick Start

Build the plugin and CLI:

.\build\restore.ps1
.\build\build.ps1 -NoRestore

Load src/DalamudMCP.Plugin/bin/Debug/DalamudMCP.dll as a development plugin, then start the stdio MCP server:

dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- serve mcp

After version 1.2.0 is available on NuGet.org, the CLI can also be run without a permanent installation:

dnx DalamudMCP.Cli@1.2.0 --yes serve mcp

For plugin loading, HTTP transport, security settings, and release packaging, see Install And Run.

How It Works

The current codebase is built around:

  • one handwritten operation file per tool
  • the same operation definition drives both CLI and MCP
  • the plugin owns live game execution
  • the CLI and MCP layers talk to the plugin over a local named pipe

What You Get

  • direct CLI commands such as player context and inventory summary
  • MCP over stdio with serve mcp
  • MCP over bearer-authenticated local HTTP with serve http
  • plugin auto-discovery so normal CLI usage does not need a manual pipe name
  • a plugin settings window that shows runtime health and can start the bundled HTTP server
  • generic game action execution, Lumina Excel exploration, and plugin lifecycle/package management
  • tracked navigation and bounded multi-step operation jobs that report progress instead of blocking one long call
  • pre-login session observation and native addon control inspection for the title screen, character selection, and dialogs
  • combat, job gauge, gearset, world, and ImGui window snapshots
  • a plugin developer loop: dev plugin registration, build MVID checks, dalamud.log reading, and render capture without bringing the game to the foreground
  • plugin integration through convention-based IPC calls and buffered data relay channels

Safety Defaults

DalamudMCP is observation-first, but it can expose broad mutation capabilities when the user enables them.

  • observation tools are enabled by default
  • action tools are default-off until you enable them in the plugin UI
  • unsafe integration tools are default-off and hidden behind a separate developer toggle
  • an explicit capability policy overrides the legacy toggles and is enforced again for every invocation
  • confirm-once policies show the exact arguments in the plugin UI and consume approval after one matching retry
  • policies can constrain plugin names, action IDs, jobs, territories, sheets, callgates, targets, result counts, and calls per minute
  • denied capabilities are omitted from tools/list
  • only one mutation runs at a time: a concurrent mutation, including one issued while an operation job owns execution, returns operation_busy; while a tracked move is active, other mutations except navigation.stop, jobs.cancel, captures, and events.configure return navigation_busy

This is intentional. The public surface should stay conservative unless you explicitly widen it.

Current Tool Surface

The table below is generated from the operation attributes in src/DalamudMCP.Plugin/Operations. Run ./build/update-tools.ps1 after adding or renaming a tool; CI checks the generated block with ./build/update-tools.ps1 -Check.

MCP tool Operation ID Source
cancel_operation_job jobs.cancel JobOperations.cs
capture_game_render game.capture NativeCaptureOperation.cs
capture_game_screenshot game.screenshot GameScreenshotOperation.cs
equip_gearset gearsets.equip GearsetEquipOperation.cs
events_configure events.configure GameEventOperations.cs
events_query events.query GameEventOperations.cs
events_wait events.wait GameEventOperations.cs
game_action_execute game.action.execute GameActionExecuteOperation.cs
game_action_resolve game.action.resolve GameActionResolveOperation.cs
game_data_describe_sheet game-data.describe-sheet GameDataOperations.cs
game_data_get_row game-data.get-row GameDataOperations.cs
game_data_list_sheets game-data.list-sheets GameDataOperations.cs
game_data_search game-data.search GameDataOperations.cs
get_addon_list addon.list AddonListOperation.cs
get_addon_strings addon.strings AddonStringsOperation.cs
get_addon_tree addon.tree AddonTreeOperation.cs
get_available_quests quest.available AvailableQuestsOperation.cs
get_chat_log chat.read ChatLogReadOperation.cs
get_combat_snapshot combat.snapshot CombatSnapshotOperation.cs
get_condition_context condition.context ObservationOperations.cs
get_current_quest_objective quest.current-objective CurrentQuestObjectiveOperation.cs
get_dalamud_log plugin.inspect.log DalamudLogOperation.cs
get_dev_plugin_state plugin.inspect.build PluginBuildOperations.cs
get_duty_context duty.context DutyContextOperation.cs
get_fate_context fate.context FateContextOperation.cs
get_gearsets gearsets.list GearsetsOperation.cs
get_inventory_currencies inventory.currencies ObservationOperations.cs
get_inventory_equipment inventory.equipment ObservationOperations.cs
get_inventory_items inventory.items ObservationOperations.cs
get_inventory_summary inventory.summary InventorySummaryOperation.cs
get_job_gauge combat.gauge JobGaugeOperation.cs
get_nearby_interactables nearby.interactables NearbyInteractablesOperation.cs
get_operation_job jobs.status JobOperations.cs
get_party_context party.context ObservationOperations.cs
get_player_context player.context PlayerContextOperation.cs
get_quest_status quest.status QuestStatusOperation.cs
get_runtime_info plugin.inspect.runtime RuntimeInfoOperation.cs
get_session_state session.state SessionStateOperation.cs
get_session_status session.status SessionStatusOperation.cs
get_target_context target.context ObservationOperations.cs
get_world_snapshot world.snapshot WorldSnapshotOperation.cs
imgui_windows imgui.windows ImGuiWindowsOperation.cs
interact_with_target interact.with.target InteractWithTargetOperation.cs
invoke_plugin_ipc plugin.ipc SafeInvokePluginIpcOperation.cs
list_addon_elements addon.controls AddonControlOperations.cs
list_plugin_commands command.list CommandListOperation.cs
move_to_entity move.to.entity MoveToEntityOperation.cs
move_to_nearby_interactable move.to.nearby.interactable MoveToNearbyInteractableOperation.cs
navigation_start navigation.start NavigationOperations.cs
navigation_status navigation.status NavigationOperations.cs
navigation_stop navigation.stop NavigationOperations.cs
navigation_wait navigation.wait NavigationOperations.cs
operate_addon_control addon.control AddonControlOperations.cs
plugin_data_poll plugin.data.poll PluginDataPollOperation.cs
plugin_data_subscribe plugin.data.subscribe PluginDataSubscribeOperation.cs
plugin_data_unsubscribe plugin.data.unsubscribe PluginDataUnsubscribeOperation.cs
plugin_describe plugin.inspect.describe PluginManagementOperations.cs
plugin_lifecycle plugin.lifecycle.control PluginManagementOperations.cs
plugin_list plugin.inspect.list PluginManagementOperations.cs
plugin_package plugin.package.control PluginManagementOperations.cs
register_dev_plugin plugin.lifecycle.register-dev RegisterDevPluginOperation.cs
reload_plugin plugin.reload PluginReloadOperation.cs
select_addon_menu_item addon.select.menu-item AddonSelectMenuItemOperation.cs
send_addon_callback_values addon.callback.values AddonCallbackValuesOperation.cs
send_addon_event addon.event AddonEventOperation.cs
send_addon_input addon.input AddonInputOperation.cs
slash_command command.slash SlashCommandOperation.cs
start_operation_job jobs.start JobOperations.cs
target_object target.object TargetObjectOperation.cs
teleport_to_aetheryte teleport.to.aetheryte TeleportToAetheryteOperation.cs
unsafe_invoke_plugin_ipc unsafe.invoke.plugin-ipc UnsafeInvokePluginIpcOperation.cs
use_duty_action duty.action DutyActionOperation.cs
wait_for_dev_plugin plugin.inspect.wait-build PluginBuildOperations.cs
wait_operation_job jobs.wait JobOperations.cs

The generic Excel search is bounded to 100 returned rows, 10,000 scanned rows, and 500 ms per call. Plugin package operations only select manifests already present in Dalamud's configured repositories; the MCP request cannot supply an arbitrary download URL or CLR method name.

Manifold remains at 1.0.0 because it owns the operation and CLI layer, not MCP version negotiation. The MCP-facing layer uses the official C# SDK 2.1.0 and adds transport-independent effect, permission, schema, and execution metadata to the internal protocol descriptor.

The handwritten truth source for these operations lives under src/DalamudMCP.Plugin/Operations.

Install And Run

1. Build

.\build\restore.ps1
.\build\build.ps1 -NoRestore

If Dalamud is not installed in the default developer path, set DALAMUD_HOME or pass -DalamudHome to the build scripts.

$env:DALAMUD_HOME = 'C:\path\to\Hooks\dev'
.\build\build.ps1 -NoRestore -DalamudHome $env:DALAMUD_HOME

2. Install The Plugin

The active plugin is:

Build output:

Load that plugin in Dalamud, then open its configuration window.

3. Try The CLI

dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- player context
dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- session status --json
dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- inventory summary
dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- session state
dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- chat read --channels Say,Party --max-count 10

If the system dotnet is older than the SDK pinned in global.json, run the same commands with .\.dotnet\dotnet.exe.

chat read returns a next cursor. Pass it back with --after-cursor to read only newer entries; the dropped count and truncated flag report entries that left the buffer before they were read.

Normal CLI use auto-discovers the active plugin instance from active-instance.json.

--pipe <name> is still supported as an advanced override for debugging or multi-instance scenarios.

Self-update and self-uninstall require the external supervisor so the verification process survives the plugin stopping or restarting:

dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- supervise self-package --action update --timeout-seconds 90
dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- supervise self-package --action uninstall --timeout-seconds 90

The plugin.self.manage capability must be explicitly confirmed or allowed before either command can proceed.

4. Run MCP

stdio MCP:

dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- serve mcp

Once version 1.2.0 is available on NuGet.org, the equivalent package command is:

dnx DalamudMCP.Cli@1.2.0 --yes serve mcp

The NuGet package contains the CLI and MCP server only. The Dalamud plugin must still be built, loaded, and running in the local FFXIV session.

Local HTTP MCP:

$env:DALAMUD_MCP_HTTP_TOKEN = '<token>'
dotnet run --project .\src\DalamudMCP.Cli\DalamudMCP.Cli.csproj -- serve http --port 38473

Default endpoint:

  • http://127.0.0.1:38473/mcp

The plugin UI can also start and stop the bundled HTTP MCP server for you. It generates a 256-bit bearer token, passes it to the child process without putting it on the command line, and provides separate buttons for copying the endpoint and token. HTTP clients must send Authorization: Bearer <token>.

The HTTP server binds only to 127.0.0.1, rejects non-loopback Origin values, and delegates MCP version negotiation to the official C# SDK transport. The named-pipe bridge is current-user-only and rejects frames larger than 16 MiB.

See design/capability-kernel.md for capability policy configuration and the current limits of the implementation.

5. Build A Release Package

Build the plugin in Release and package the plugin output directory manually.

.\.dotnet\dotnet.exe build .\src\DalamudMCP.Plugin\DalamudMCP.Plugin.csproj -c Release

If you need a custom Dalamud path:

$env:DALAMUD_HOME = 'C:\path\to\Hooks\dev'
.\.dotnet\dotnet.exe build .\src\DalamudMCP.Plugin\DalamudMCP.Plugin.csproj -c Release

The packaged output is written under src/DalamudMCP.Plugin/bin/Release/DalamudMCP/. Upload the generated latest.zip manually when cutting a release.

Optional Integrations

When compatible plugins are installed, DalamudMCP can use them behind existing high-level tools.

  • teleport.to.aetheryte can fall back to Lifestream for local aethernet travel
  • navigation.*, move.to.entity, and move.to.nearby.interactable use vnavmesh through one tracked navigation service

These integrations stay behind normal high-level tools by default. Raw integration escape hatches remain developer-only.

Pre-Login Observation And Control

session state / get_session_state works without a local player. It reports title, title-movie, character-select, connecting, login-wait, loading, in-world, world-not-ready, or unknown, with the visible addon evidence and dialog addon names. unknown is not proof that the game is logged out. Login dialogs should be inspected even when an underlying screen is still visible.

Use addon controls --addon _TitleMenu to obtain the current GAME START button reference, then addon control --addon _TitleMenu --reference <reference> --action click. Observe session state again before the next action. The same native control inspection is available in character selection and confirmation dialogs. References expire across addon lifecycles; do not reuse an old reference or infer success from dispatch alone. Closing a movie's overlay is not proof that the movie ended.

This operates through Dalamud native addon APIs, not OS keyboard/mouse automation. It does not enter launcher credentials or bypass login queues.

Long-Running Operations

navigation start --x <x> --y <y> --z <z> returns an operation ID as soon as vnavmesh accepts the request. Acceptance is not arrival. Use navigation wait --operation-id <id> (up to 30 seconds per call), navigation status, and navigation stop --operation-id <id> with that ID.

  • terminal states include arrived, stopped_before_destination, cancelled, timed_out, failed, territory_changed, and logged_out
  • a wait timeout does not cancel movement; only the operation deadline (--timeout-seconds, up to 600) or an explicit stop does
  • stopping and stop_unconfirmed mean the stop has not been observed yet; check again before issuing another mutation

Operation Jobs

jobs start --steps-json <json> runs 1 to 32 explicit steps in order, within a deadline of up to 600 seconds. Each step is authorized like a normal call. Arguments use request property names in camelCase, and navigation.wait / navigation.stop steps use "operationId": "$navigation" to refer to the move started earlier in the same job. A job cannot wait for or stop navigation it did not start.

[
  { "operation": "navigation.start", "arguments": { "x": 10.5, "y": 0, "z": -32.1 } },
  { "operation": "navigation.wait", "arguments": { "operationId": "$navigation", "timeoutMilliseconds": 30000 } },
  { "operation": "interact.with.target" }
]

Use jobs wait, jobs status, and jobs cancel with the returned job ID. A job owns mutation execution until it finishes, so other mutations return operation_busy; reads and jobs cancel stay available. Cancellation also stops navigation that the job owns. Jobs are session-local and are not resumed after a plugin reload. Only observation, addon, navigation, targeting, action, and event steps are accepted.

Plugin Developer Workflow

register_dev_plugin and capture_game_render are developer-only and default-off. The build and log inspection tools are read-only.

  1. plugin register-dev --plugin-name <InternalName> --dll-path <absolute dll> --expected-sha256 <sha256> registers a reviewed local build for the current session. It does not load the plugin or change Dalamud's startup locations. --dry-run validates the manifest, API level, and hash only.
  2. plugin build --plugin-name <InternalName> compares the loaded assembly MVID with the DLL on disk.
  3. plugin wait-build --plugin-name <InternalName> --expected-mvid <mvid> waits until the plugin is loaded and both memory and disk match the expected MVID. This does not prove that all of the plugin's services are ready.
  4. get_dalamud_log reads a bounded tail of dalamud.log, filtered by plugin name, and continues from a cursor. Lines mentioning credentials are omitted.
  5. capture_game_render captures the render viewport without bringing the game to the foreground. Pass the returned capture ID again to crop the cached image without taking a new frame.

Integrating Your Plugin

Other Dalamud plugins can expose functions and push data to MCP clients without referencing DalamudMCP. invoke_plugin_ipc and the plugin_data_* tools are developer-only and default-off.

IPC calls (invoke_plugin_ipc)

Register a call gate named {InternalName}.MCP.{Method}. Arguments are passed from a JSON array: booleans, integers, doubles, and strings map to bool, int, double, and string, and JSON objects or arrays are passed as JSON strings. DalamudMCP subscribes with those argument types and an object return type, so declaring the provider the same way avoids IPC type conversion. The return value is serialized to JSON.

pluginInterface.GetIpcProvider<string, int, object>("MyPlugin.MCP.Echo")
    .RegisterFunc((text, count) => string.Concat(Enumerable.Repeat(text, count)));

The MCP call is invoke_plugin_ipc with plugin-name = MyPlugin, method = Echo, and arguments-json = ["hi", 2]. The result status is ipc_success, ipc_missing, ipc_not_ready, ipc_type_mismatch, or ipc_plugin_error.

Data relay (plugin_data_*)

After an MCP client calls plugin_data_subscribe with plugin-name = MyPlugin and channel = status, DalamudMCP registers the action call gate DalamudMCP.Relay.MyPlugin.status. The target plugin pushes JSON strings to it:

var relay = pluginInterface.GetIpcSubscriber<string, object>("DalamudMCP.Relay.MyPlugin.status");
if (relay.HasAction)
    relay.InvokeAction(JsonSerializer.Serialize(new { hp = 1234 }));

plugin_data_poll removes up to max-items buffered items and keeps the rest for the next poll. When capacity is exceeded, the oldest items are dropped. plugin_data_unsubscribe unregisters the call gate and releases the buffer.

Build And Test

GitHub Actions CI validates the portable layers and repository hygiene. The plugin build remains a local or self-hosted Windows step because Dalamud.NET.Sdk still needs a resolved DALAMUD_HOME / Hooks dev directory.

Build:

.\build\build.ps1 -NoRestore

Full test run:

.\build\test.ps1 -NoBuild

The active solution is DalamudMCP.slnx.

Repository Layout

Active projects:

Test projects:

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.2.0 0 12/5/2026