Repository navigation
v3.0.0 - CLI, MCP decoupling, semantic tools, docs, web support, skills
3.0.0
Major release. Three pillars:
- Capability kernel — the server's tool surface is now composed from
Capabilityinstances registered into anMcpHost. The kernel applies
the capability prefix and bridges intodart_mcp'sToolsSupport. - Playwright-style interaction layer — 27 prefixed tools that let an
AI agent drive a running Flutter app the way a user does, with semantic
refs and a snapshot/staleness contract. - Plugin-first install — a Claude Code marketplace plugin bundles
skills, agent, and MCP server into oneinstall.shstep; CLI gains
init <agent>for Cursor / Codex / etc.
The locked v3.0.0 surface is checked in at
tool/contracts/expected_tool_surface.txt
and pinned by
mcp_server_dart/test/tool_surface_snapshot_test.dart.
Plugin layout
- Renamed bundled Cursor/Codex skill
custom-toolkit-tools→flutter-mcp-toolkit-custom-tools(directoryplugin/skills/…, frontmattername, andSkillAssetsid). Update any prompts or automation that referenced the old skill id; runmake sync-skillsafter pulling. - Renamed Claude subagent file
plugin/agents/flutter-inspector.md→plugin/agents/flutter-mcp-toolkit-runtime.mdwithname: flutter-mcp-toolkit-runtimeso the agent aligns withflutter-mcp-toolkit-*surfaces and no longer shares a slug with the legacy MCPmcpServerskeyflutter-inspector. - Consolidated: Claude Code marketplace, Cursor/Codex manifests, MCP config, installer, version pin,
flutter-mcp+flutter-mcp-cli-runtime-validationskills, and theflutter-mcp-toolkit-runtimeagent now live underplugin/only..claude-plugin/marketplace.jsonsourceis./plugin. Removed the duplicateflutter_mcp_plugin/tree. plugin/(Claude / Cursor / Codex marketplace): canonicalplugin/mcp.jsonuses MCP keyflutter-mcp-toolkit;tool/contracts/check_plugin_surfaces.shacceptsflutter-mcp-toolkitor legacyflutter-inspectorand requiresflutter-mcp-toolkit-serverincommand.
Docs
- Install/migration docs (
llm_install.md,mcp_server_dart/README.md,docs/start_here/migration_v2_to_v3.mdx), plugin spec §5–§6.1, andplugin/skills/flutter-mcp/SKILL.md: clarifyflutter-inspectoras legacymcpServersid vs Claude subagentflutter-mcp-toolkit-runtime; regeneratedskill_assets.g.dart. - Plugin skills (
plugin/skills/…):validate-runtimenow documents--vm-service-uri, automaticflutter_layerretry after faileddesktop_windowcapture, andcaptureFallbackUsed; port-conflict example uses currentflutter runflags; covers binaries,mcpServerskeys,validate-runtime, and links to canonical configs. - mcp_server_dart/README.md: Cline / Cursor / Claude examples use
flutter-mcp-toolkit+ updated Cursor deeplink; removed stale--no-resources/flutter_inspector_mcpguidance. mcp_toolkitpackage README: golden-path note forvalidate-runtimetargeting / fallback.
BREAKING
MCP tool names are now prefixed by capability id
All MCP tools surface under the fmt_ capability prefix (Flutter MCP
Toolkit). Calls to legacy unprefixed names return tool_not_found. The
CLI catalog vocabulary stays bare for intrinsic tools — flutter-mcp-toolkit exec --name tap_widget
still works; MCP publishes fmt_tap_widget. Dynamic-registry commands use
their full fmt_* spelling in both CLI and MCP. See
docs/start_here/migration_v2_to_v3.mdx
for the smallest-possible-diff guide.
| v2 (legacy) | v3 (MCP tools/call name) |
|---|---|
tap_widget |
fmt_tap_widget |
enter_text |
fmt_enter_text |
scroll |
fmt_scroll |
long_press |
fmt_long_press |
swipe |
fmt_swipe |
drag |
fmt_drag |
hover |
fmt_hover |
press_key |
fmt_press_key |
semantic_snapshot |
fmt_semantic_snapshot |
wait_for |
fmt_wait_for |
fill_form |
fmt_fill_form |
navigate |
fmt_navigate |
handle_dialog |
fmt_handle_dialog |
connect_debug_app |
fmt_connect_debug_app |
discover_debug_apps |
fmt_discover_debug_apps |
get_vm |
fmt_get_vm |
get_extension_rpcs |
fmt_get_extension_rpcs |
hot_reload_flutter |
fmt_hot_reload_flutter |
hot_restart_flutter |
fmt_hot_restart_flutter |
hot_reload_and_capture |
fmt_hot_reload_and_capture |
evaluate_dart_expression |
fmt_evaluate_dart_expression |
get_recent_logs |
fmt_get_recent_logs |
get_view_details |
fmt_get_view_details |
get_app_errors |
fmt_get_app_errors |
get_screenshots |
fmt_get_screenshots |
capture_ui_snapshot |
fmt_capture_ui_snapshot |
inspect_widget_at_point |
fmt_inspect_widget_at_point |
debug_dump_layer_tree (--dumps) |
fmt_debug_dump_layer_tree |
debug_dump_semantics_tree (--dumps) |
fmt_debug_dump_semantics_tree |
debug_dump_render_tree (--dumps) |
fmt_debug_dump_render_tree |
debug_dump_focus_tree (--dumps) |
fmt_debug_dump_focus_tree |
listClientToolsAndResources |
fmt_list_client_tools_and_resources |
runClientTool |
fmt_client_tool |
runClientResource |
fmt_client_resource |
The dynamic-registry host trio
(fmt_list_client_tools_and_resources, fmt_client_tool, fmt_client_resource)
uses the same fmt_* names on MCP and in exec --name. Resource URIs
(visual://localhost/...) are unchanged.
Server and CLI binaries renamed
flutter_inspector_mcp→flutter-mcp-toolkit-server(the MCP server).flutter_mcp_cli→flutter-mcp-toolkit(the CLI).- The MCP
serverInfo.nameadvertised on initialize is now
flutter-mcp-toolkit-server.
Update any mcpServers config entry, shell alias, Docker invocation, or
CI script that referenced the old names. The new root install.sh
updates PATH for you on first run.
Strict wire surface
- All MCP tool/resource errors emit a single envelope:
code,message,details,descriptor,recovery. Code paths that
parsed top-levelcategory/retryable/exitCodemust read
error.descriptorinstead. - Typed parsing hard cut: no string-encoded object/list/bool coercions.
- Tool argument schemas default to
additionalProperties: falseunless
explicitly opened. connection.targetIdnow requires full VM websocket URIs
(ws://.../ws). Legacyhost:portids are rejected with migration
guidance to URI ids orconnection.uri.- Top-level
host/port/urialiases on tool arguments are
rejected; pass them inside the nestedconnectionobject.
Added
Capability kernel
mcp_capability_kernel/— pure-Dart contracts:Capability,
CapabilityContext,HostService,CommandRunner, prefix validators,
and a testing library shippingFakeCommandRunner/
FakeCapabilityContext.mcp_capability_core/— the bundledfmtcapability. Registers all 27
Playwright-style tools plus 4--dumpstools when
dumps_supported=true. No Flutter dependency on the server side.mcp_shared_core/— pure-Dart command hierarchy
(CoreCommand,CoreResult.toErrorEnvelopeJson) and value types
shared between server, CLI, and capability core.McpHostregistry on the server applies the<capabilityId>_prefix
with collision enforcement.DartMcpDispatchBridgepublishes prefixed
tools intodart_mcp'sToolsSupport.
Playwright-style interaction layer
- New interaction tools that let an AI agent drive a running Flutter app
the way a user does:semantic_snapshotreturns a compact JSON accessibility tree of
interactive widgets with stablerefstrings (s_0,s_1, ...) and
a monotonically incrementingsnapshot_id.tap_widget,long_press,enter_text,scroll,swipe, and
dragtarget widgets byref. Each tool uses a two-tier dispatch:
semantic actions first (SemanticsOwner.performAction), then
synthetic pointer events via
GestureBinding.instance.handlePointerEventwhen no semantic action
is available. Responses include aviafield
(semantic_action|pointer_events|editable_state|
pointer_scroll_event).- All interaction tools accept an optional
snapshotId; if it doesn't
match the current snapshot the call returns astale_snapshot
envelope withprovidedSnapshotIdandcurrentSnapshotId. scrolldirection follows the Playwright convention
(direction = which content to reveal).enter_textfalls back to
EditableTextState.userUpdateTextEditingValueso
TextInputFormatters andonChangedfire correctly.
hot_reload_and_capturefuses hot reload, screenshot, semantic
snapshot, and app errors into a single response for the agent
edit/preview loop.evaluate_dart_expressionruns a Dart expression against the root
library in the running isolate (e.g.AgentState.instance.counter)
and returns{result, kind, classRef}.get_recent_logsexposes a 200-entry ring buffer of recent
print/debugPrintoutput captured from the running app.
flutter-mcp-toolkit init <agent>
- New
initsubcommand auto-detects mode and writes per-target skills,
agent files, and manifests for Claude Code, Cursor, Codex, and other
supported agents in one call. codegen-initemits the Fluttermain.dartsnippet that bootstraps
the toolkit on the app side (MCPToolkitBinding.initialize() / initializeFlutterToolkit()).- Replaces the per-agent manual setup docs that shipped in v2.
Claude Code marketplace plugin (plugin/)
- Plugin manifests (
.claude-plugin/,.cursor-plugin/,.codex-plugin/),mcp.json,install.sh,EXPECTED_SERVER_VERSION,
and a marketplace entry under.claude-plugin/marketplace.json. - Skills shipped include
flutter-mcp-toolkit-{guide,setup,inspect,control,debug},flutter-mcp-toolkit-custom-tools,flutter-mcp, andflutter-mcp-cli-runtime-validation. flutter-mcp-toolkit-runtimeagent.- Skill bodies are bundled into the server (
skill_assets.g.dart) so
the CLI can ship them as part ofinit.make sync-skills
regenerates; CI fails PRs that don't.
Showcase redesign
flutter_test_apprebuilt as a single-page showcase (ShowcaseScreen)
where every interaction tool has a named target with aSemantics
identifier (greeting_input_field,feature_toggle_switch,
brightness_slider,scroll_demo_list,hot_reload_marker,
emit_log_button,trigger_error_button,last_log_display, ...).- Integration-test identifiers
(about_demo_heading,counter_demo_heading,counter_demo_icon,
stateful_counter_increment_button) are preserved. AgentStatesingleton lets agents read and mutate showcase state
throughevaluate_dart_expression.- Section heading semantics are isolated for cleaner snapshots.
Install and release
- Root
install.shfor one-command install/upgrade ondarwin-arm64,
darwin-x64,linux-x64. UpdatesPATH. - Release artifact builder with tarball + checksum generation:
tool/release/build_release_artifacts.sh. - Tagged release workflow:
.github/workflows/release.yml.
Contract quality gates (make check-contracts)
tool/contracts/check_sdk_parity.sh— Docker base image vspubspec.tool/contracts/check_error_code_playbook.sh— error-code surface
coverage.tool/contracts/check_docs_drift.sh— CLI help vs docs.tool/contracts/check_plugin_surfaces.sh— plugin manifest shape.tool/contracts/check_tool_prefix.sh— single canonical prefix across
every shipped doc; CHANGELOG migration table covers all 27 tools.- CI:
.github/workflows/contract_gates.yml. - macOS integration smoke runner:
tool/integration/classify_macos_integration_run.sh.
CLI safety + observability
flutter-mcp-toolkit doctor [--json] [--target <path>] [--timeout-ms <n>]
for CI preflight before VM-dependent operations.- Safe-write flags for
snapshot createandbundle create:
--check,--diff,--backup,--no-overwrite. Bundle publishing
is now staged and atomic; the destructive pre-delete is gone. - Connection UX:
- Startup stays non-blocking when multiple targets are present.
- First VM-dependent call auto-attaches when target resolution is
unambiguous; ambiguity surfaces asconnection_selection_required
withavailableTargetsand retry guidance. - Optional strict nested
connectionobject across every
VM-dependent MCP tool and dynamic-registry tool. - Resource URI query-based connection targeting (
targetId,mode,
host,port,uri,forceReconnect).
- Flutter web auto-discovery:
- Machine discovery via
flutter attach --machinewith optional
project / device context. - Merged machine + port-scan discovery using URI-id selection
payloads.
- Machine discovery via
- Runtime discovery flags for the CLI and MCP server:
--flutter-project-dir--flutter-device--flutter-discovery-timeout-ms
- CLI / daemon alignment:
exec --argsand daemoncommand/execute/watch/startaccept
the same optionalparams.args.connection.snapshot createsupports per-step
args.commands[i].args.connection.- Preconnect no longer returns synthetic
vm_not_connectedfor
ambiguous multi-target paths; ambiguity surfaces as
connection_selection_required. - Explicit requested-session attach stays strict; implicit stale
active-session attach falls back to auto target resolution. connectandsession_startreject mixed native selector args
with nestedconnection.
Changed
- The
--use-capability-kernelflag is gone; the kernel is the only
registration path. The legacy unprefixed registration mixin was
deleted in T9. - README rewritten around the four-step install
(install.sh→init <agent>→ run app → call tools). - ARCHITECTURE.md rewritten around the capability kernel and the
shared-core packages. New ADRs indocs/decisions/:0001_capability_kernel_and_tool_prefix.mdx0002_v3_scope_and_consolidation_deferrals.mdx
- Docs reorganized under
docs/start_here/,docs/decisions/,
docs/ai_agents/,docs/superpowers/,docs/guides/. - Dockerfile pinned to
dart:3.11.0-sdk.
Fixed
resolveCenter/resolveBoundsreturn logical (not physical)
coordinates — DPR fix that unblocked tap / long-press on high-DPI
screens.fill_formactually stops on first toolkit-side failure.wait_fortimeout payload shape pinned by tests; malformed payloads
route correctly.popUntilguard and bad-route logging in the toolkit.semantic_snapshotsurfaces scrollable nodes (widgets that advertise
scrollUp/Down/Left/Right) so agents can pass an explicitrefto
scrollfor the deterministic semantic-action path.scrolldirection-to-SemanticsActionmapping realigned with the
Playwright "direction = reveal" convention:
direction: "down"now maps toSemanticsAction.scrollUp(finger up,
reveals content below), so the Tier 1 path succeeds on real Flutter
scrollables at the top of their range.
Flutter Web interaction support
Interaction tools are Tier 1 first on web and degrade predictably when
Tier 1 isn't available:
semantic_snapshot,evaluate_dart_expression,get_recent_logs,
hot_reload_flutter, andhot_reload_and_capturework unchanged on
web.tap_widget,long_press, andscroll(with ref) work when the
target node exposes the matchingSemanticsAction. The action shows
up in the node'sactionsarray insemantic_snapshot.enter_textworks viaSemanticsAction.setTextor the
EditableTextState.userUpdateTextEditingValuefallback (both work on
web).swipe(ref, direction)on web redirects to the matching scroll
semantic action whenrefis a scrollable that exposes it; success
responses returnvia: "semantic_action_fallback"with anote
field explaining the redirect.scrollwithout a ref walks the semantics tree for a matching
scrollable and uses Tier 1.- When no Tier 1 path exists (tap / long-press on nodes without the
matching action, swipe on a non-scrollable or no-ref target, drag,
scroll without any scrollable in tree), web returns a structured
web_gesture_not_supportedenvelope with ahintpointing the agent
at the right workaround (snapshot for a different ref, add a
Semanticswrapper, or useevaluate_dart_expression).
Removed
- Per-agent manual setup docs — superseded by
flutter-mcp-toolkit init <agent>. - Manual install / client-setup docs — superseded by
install.sh+
init. docs/core/built_in_toolsanddocs/core/error_code_playbook—
migrated into the plugin'sdebugandguideskills.docs/getting_started/anddocs/troubleshooting/— content moved
underdocs/start_here/.memory-bank/legacy AI memory directory.mcp_toolkit/devtools_mcp_extension/.
Deferred (post-3.0.0)
- Network introspection — see
todo/p3_network_introspection.md. select_optionform action.- P4 consolidation set A / C from the audit.
Version alignment
mcp_server_dart:3.0.0mcp_toolkit:3.0.0
Migration: v2.x → v3.0.0
- Add
fmt_to every MCPtools/callname. See
docs/start_here/migration_v2_to_v3.mdx. - Update binary names in your
mcpServersconfig and any wrapper
scripts:flutter_inspector_mcp→flutter-mcp-toolkit-server,
flutter_mcp_cli→flutter-mcp-toolkit. - Replace error parsing that expected top-level
category/
retryable/exitCodewith reads againsterror.descriptor. - Stop sending string-encoded typed values; pass real JSON types only.
- Switch any
targetIdof the formhost:portto the full
ws://.../wsURI, or passconnection.uri. - Move top-level
host/port/uriarguments into the nested
connectionobject. - For write-producing commands, prefer
--check --difffirst in
automation. If overwrite must be blocked, set--no-overwriteand
handlewrite_blocked. - Use
flutter-mcp-toolkit doctor --jsonin CI preflight before
VM-dependent operations.