LogoSkills

marionette:setup

One-time Marionette MCP installation and CoUI-aware binding registration.

ํ•ญ๋ชฉ๋‚ด์šฉ
Invoke/marionette:setup
Categorycocode-flutter
Complexitysimple

/marionette setup โ€” Marionette ์ฒ˜์Œ ํ•œ ๋ฒˆ ์„ค์น˜ํ•˜๊ธฐ#

ํ•œ๋งˆ๋””๋กœ#

์‹คํ–‰ ์ค‘์ธ Flutter ์•ฑ์„ Claude๊ฐ€ ์ง์ ‘ "๋ณด๊ณ  ๋งŒ์งˆ ์ˆ˜ ์žˆ๊ฒŒ" ์—ฐ๊ฒฐํ•ด ์ฃผ๋Š” ์ตœ์ดˆ ์„ค์น˜ ์ž‘์—…์ž…๋‹ˆ๋‹ค. ๋ฆฌ๋ชจ์ปจ(Marionette)์„ ์ฒ˜์Œ ํ•œ ๋ฒˆ ํŽ˜์–ด๋งํ•ด ๋‘๋ฉด, ์ดํ›„๋ถ€ํ„ฐ Claude๊ฐ€ ๊ทธ ๋ฆฌ๋ชจ์ปจ์œผ๋กœ ์•ฑ ํ™”๋ฉด์„ ๋ณด๊ณ  ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅผ ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

๋ˆ„๊ฐ€ยท์–ธ์ œ ์“ฐ๋‚˜์š”#

  • Marionette๋ฅผ ์ฒ˜์Œ ์„ค์น˜ํ•  ๋•Œ (์ด ์•ฑ์—์„œ ํ•œ ๋ฒˆ๋งŒ ํ•˜๋ฉด ๋จ)
  • marionette_mcp ๋ฒ„์ „์„ ์˜ฌ๋ ธ์„ ๋•Œ, ๋‹ค์‹œ ์‹คํ–‰ํ•ด ์ตœ์‹  ์ƒํƒœ๋กœ ๋งž์ถ”๊ณ  ์‹ถ์„ ๋•Œ
  • CoUI ๋””์ž์ธ ์š”์†Œ(๋ฒ„ํŠผ, ์ž…๋ ฅ์ฐฝ ๋“ฑ)๊ฐ€ ์ƒˆ๋กœ ์ถ”๊ฐ€๋ผ์„œ ์—ฐ๊ฒฐ ์„ค์ •์„ ๊ฐฑ์‹ ํ•ด์•ผ ํ•  ๋•Œ

๐Ÿ‘‰ ๋ช‡ ๋ฒˆ์„ ๋‹ค์‹œ ์‹คํ–‰ํ•ด๋„ ์•ˆ์ „ํ•ฉ๋‹ˆ๋‹ค(idempotent โ€” ๊ฐ™์€ ์ž‘์—…์„ ๋ฐ˜๋ณตํ•ด๋„ ๋ง๊ฐ€์ง€์ง€ ์•Š์Œ).

๋ฌด์—‡์„ ํ•ด์ฃผ๋‚˜์š”#

  • Marionette MCP ์„œ๋ฒ„๋ฅผ ์„ค์น˜ํ•˜๊ณ  Claude Code์— ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค.
  • ๋Œ€์ƒ Flutter ์•ฑ์— marionette_flutter ํŒจํ‚ค์ง€๋ฅผ ์—ฐ๊ฒฐํ•ฉ๋‹ˆ๋‹ค.
  • ์•ฑ์˜ main.dart์— CoUI ์š”์†Œ๋ฅผ ์ธ์‹ํ•˜๋Š” ์ดˆ๊ธฐํ™” ์„ค์ •(MarionetteBinding)์„ ์‹ฌ์–ด ์ค๋‹ˆ๋‹ค.
  • ๋งˆ์ง€๋ง‰์œผ๋กœ ์—ฐ๊ฒฐ์ด ์ž˜ ๋๋Š”์ง€ ํ™•์ธ(smoke test)ํ•˜๊ณ , ์ฒซ ํ™”๋ฉด ์Šคํฌ๋ฆฐ์ƒท์„ .claude/docs/marionette/<์‹œ๊ฐ>/screens/00.png์— ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.

์–ด๋–ป๊ฒŒ ์“ฐ๋‚˜์š”#

# 1) MCP ์„œ๋ฒ„ ์„ค์น˜ (์–ด๋””์„œ๋“  ์“ธ ์ˆ˜ ์žˆ๋Š” ์ „์—ญ ์„ค์น˜ ๊ถŒ์žฅ)
dart pub global activate marionette_mcp

# 2) Claude Code์— ๋“ฑ๋ก
claude mcp add --transport stdio marionette -- marionette_mcp

# 3) ๋Œ€์ƒ ์•ฑ์— Flutter ํŒจํ‚ค์ง€ ์ถ”๊ฐ€
flutter pub add marionette_flutter

# 4) ์•ฑ ์‹คํ–‰ ํ›„ ์—ฐ๊ฒฐ ํ™•์ธ
/marionette connect --uri=ws://127.0.0.1:9101/ws
/marionette smoke --routes=/
  • claude mcp list | grep marionette๋ฅผ ์‹คํ–‰ํ–ˆ์„ ๋•Œ connected๊ฐ€ ๋ณด์ด๋ฉด ๋“ฑ๋ก์ด ์ž˜ ๋œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.
  • ์•ฑ์„ flutter run์œผ๋กœ ๋„์šฐ๋ฉด ํ™”๋ฉด์— ws://... ๋กœ ์‹œ์ž‘ํ•˜๋Š” ์ฃผ์†Œ๊ฐ€ ๋œจ๋Š”๋ฐ, ์ด ์ฃผ์†Œ๋ฅผ ์œ„ --uri=์— ๋„ฃ์–ด ์ค๋‹ˆ๋‹ค.

์•ˆ์—์„œ ๋ฌด์Šจ ์ผ์ด ๋ฒŒ์–ด์ง€๋‚˜์š”#

  1. MCP ์„œ๋ฒ„ ์„ค์น˜ โ€” Marionette MCP๋ฅผ ์ „์—ญ ๋˜๋Š” ํ”„๋กœ์ ํŠธ์— ๊น”์•„ ๋‘ก๋‹ˆ๋‹ค.
  2. Claude Code์— ๋“ฑ๋ก โ€” Claude๊ฐ€ ์ด ์„œ๋ฒ„๋ฅผ ํ†ตํ•ด ์•ฑ๊ณผ ๋Œ€ํ™”ํ•˜๋„๋ก ์—ฐ๊ฒฐํ•ฉ๋‹ˆ๋‹ค.
  3. ์•ฑ์— ํŒจํ‚ค์ง€ ์ถ”๊ฐ€ โ€” ๋Œ€์ƒ Flutter ์•ฑ์— marionette_flutter(ํ•„์š” ์‹œ marionette_logger)๋ฅผ ๋ถ™์ž…๋‹ˆ๋‹ค.
  4. ์ดˆ๊ธฐํ™” ์„ค์ • ์‹ฌ๊ธฐ โ€” main.dart์— CoUI ์š”์†Œ๋ฅผ ์ธ์‹ํ•˜๋Š” ์„ค์ •์„ ๋„ฃ์–ด, ๋ฒ„ํŠผ/์ž…๋ ฅ๊ฐ’์ด ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•ด์ง€๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
  5. ์•ฑ ์‹คํ–‰ ํ›„ ์ฃผ์†Œ ๋ณต์‚ฌ โ€” ์•ฑ์„ ๋„์›Œ ๋‚˜์˜จ ws://... ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.
  6. ์—ฐ๊ฒฐ ํ™•์ธ โ€” connect๋กœ ๋ถ™๊ณ  smoke๋กœ ์ •์ƒ ๋™์ž‘๊ณผ ์Šคํฌ๋ฆฐ์ƒท ์ €์žฅ๊นŒ์ง€ ํ•œ ๋ฒˆ์— ์ ๊ฒ€ํ•ฉ๋‹ˆ๋‹ค.

๋ฆด๋ฆฌ์ฆˆ ๋นŒ๋“œ์—์„œ๋Š” ๋™์ž‘ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค(๊ฐœ๋ฐœ ๋ชจ๋“œ ์ „์šฉ). Flutter Web์€ pub.dev ๊ธฐ์ค€ 0.6.0๋ถ€ํ„ฐ ์ง€์› ํ”Œ๋žซํผ์— ํฌํ•จ๋˜์–ด ์žˆ์ง€๋งŒ, ์ด ์ €์žฅ์†Œ์—์„œ CoUI Web ์กฐํ•ฉ์œผ๋กœ ์ง์ ‘ ๊ฒ€์ฆ๋œ ์ ์€ ์•„์ง ์—†์œผ๋‹ˆ ์ฒ˜์Œ์—” ํ•œ ๋ฒˆ ์ŠคํŒŸ ์ฒดํฌ๋ฅผ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. CoUI์— ์ƒˆ ์š”์†Œ๊ฐ€ ์ƒ๊ธฐ๋ฉด main.dart์˜ isInteractiveWidget ๋ชฉ๋ก์— ์ถ”๊ฐ€ํ•˜๊ณ  ํ•ซ ๋ฆฌ๋กœ๋“œํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. marionette_flutter(์•ฑ)์™€ marionette_mcp(์„œ๋ฒ„)๋Š” ๊ฐ™์€ ์ €์žฅ์†Œ์—์„œ lockstep์œผ๋กœ ๋ฐฐํฌ๋˜๋ฏ€๋กœ, ๋‘ ๋ฒ„์ „์ด ๋‹ค๋ฅด๋ฉด connect ์‹œ ๋ฒ„์ „ ๋ถˆ์ผ์น˜ ์˜ค๋ฅ˜๊ฐ€ ๋‚ฉ๋‹ˆ๋‹ค โ€” ํ•ญ์ƒ ๊ฐ™์€ ๋ฒ„์ „(์˜ˆ: ^0.6.0)์œผ๋กœ ๋งž์ถ”์„ธ์š”.


โš™๏ธ ์ƒ์„ธ ์˜ต์…˜ยท์‹คํ–‰ ๋ช…์„ธ (๊ฐœ๋ฐœ์ž / AI ์—์ด์ „ํŠธ์šฉ)

Steps#

1. Install the MCP server#

# Global tool (recommended โ€” works from anywhere)
dart pub global activate marionette_mcp

# OR project-local dev_dependency
dart pub add dev:marionette_mcp

2. Register the MCP server with Claude Code#

claude mcp add --transport stdio marionette -- marionette_mcp

Verify with claude mcp list | grep marionette (should print connected).

3. Add the Flutter package to the target app#

cd path/to/your/flutter/app
flutter pub add marionette_flutter
flutter pub add marionette_logger   # if your app uses the `logger` package

4. Initialise MarionetteBinding with CoUI configuration#

Replace your main.dart initialisation block with the snippet from skills/marionette/TEMPLATES.md (section 1). Key points:

  • Guard the binding with kDebugMode && !FLUTTER_TEST to avoid colliding with the test binding.
  • Pass a MarionetteConfiguration that lists every CoUI primitive in isInteractiveWidget.
  • Wire extractText so button labels and input values are searchable.
  • Optional: pass a LogCollector so get_logs returns useful output.

5. Run the app and copy the VM Service URI#

flutter run

Look for a line like:

The Flutter DevTools debugger and profiler on iPhone 15 Pro is available at:
http://127.0.0.1:9101?uri=ws://127.0.0.1:9101/ws

Copy the ws://... portion.

6. Sanity check#

# From any Claude Code session
/marionette connect --uri=ws://127.0.0.1:9101/ws
/marionette smoke --routes=/

Expected output:

[โœ“] connected
[โœ“] interactive elements: 14
[โœ“] screenshot saved: .claude/docs/marionette/ < ts > /screens/00.png

Platform Notes#

  • Release builds: Marionette does not work in release mode (VM Service is disabled). Use cc-flutter-pixel-loop instead.
  • Flutter Web: listed as a supported platform on pub.dev as of 0.6.0 (previously unverified) โ€” spot-check CoUI wiring the first time; fall back to Playwright in cc-flutter-dev:figma:analyze if it misbehaves.
  • Multiple apps at once: marionette_cli named-instance mode supports it; see upstream docs.
  • Version alignment: marionette_flutter, marionette_mcp, and marionette_cli are released in lockstep from the same monorepo โ€” pin them to the same version. A mismatch makes connect fail with a version error.

When CoUI Changes#

Every time CoUI adds a primitive, append it to the isInteractiveWidget callback in your main.dart and re-hot-reload. The Marionette plugin in this repo lists the current CoUI primitive set in skills/marionette/TEMPLATES.md; PRs welcome when new primitives land.