Tauri MCP CLI
Purpose
Help agents operate Tauri apps through a Tauri MCP CLI: starting driver sessions, inspecting webviews, taking screenshots, executing JavaScript, driving UI interactions, reading logs, and debugging IPC. This skill is for CLI operation of a Tauri app, not for designing the Tauri app itself.
Use When
- a Tauri MCP bridge or CLI is available and the agent needs to interact with a running Tauri app
- the task needs screenshot evidence, selector interaction, webview JavaScript, IPC command execution, logs, or window inspection
- the app runs on a mobile simulator, emulator, real device, or remote host
Do Not Use When
- no Tauri MCP bridge or equivalent CLI is installed
- the task is ordinary browser automation outside a Tauri shell
- the job is to implement PTY or terminal behavior inside the app
Quick Start
- Confirm the Tauri app is running in development or test mode.
- Confirm the MCP bridge plugin and global Tauri access are configured if the CLI requires them.
- Start or verify a driver session before webview commands.
- Check session status with JSON and require
connected: true.
- Use kebab-case flags and explicit output file paths for screenshots.
- Stop or restart the daemon only when the background session is stale or unhealthy.
Operating Constraints
- A successful driver-session start is not proof that the app is connected; status output must show a live connection.
- Prefer JSON status and list commands before interacting.
- Do not assume localhost works for mobile devices without port reversal or an explicit host.
- Screenshot commands should write files to disk when the image is evidence.
- Use selectors and wait commands before clicks or typing.
- Keep JavaScript snippets read-only unless the task explicitly requires mutation.
- Do not overwrite existing evidence files without using a deliberate path.
- Stop capture monitors after collecting the IPC or log evidence needed.
Inputs This Skill Expects
- The CLI command name and installed version, if known.
- The app run command, driver port, host, and target device.
- Bridge plugin configuration and whether
withGlobalTauri or equivalent access is enabled.
- The desired operation: inspect, click, type, screenshot, execute JS, read logs, inspect IPC, or manage window state.
- The evidence path where screenshots or logs should be stored.
Output Contract
- State the active session host, port, connection status, and target window when known.
- For UI operations, name the selector, wait condition, action, and screenshot or state evidence.
- For IPC operations, name the command/event and the captured result or failure.
- For mobile or remote operations, state the connection route such as host, reverse port, emulator, simulator, or device.
- Include cleanup performed: monitor stopped, session left running intentionally, or session stopped.
Procedure
- Start the app if the user asked for operation and no app is already running.
- Start or check the driver session on the expected host and port.
- Read JSON session status and verify the app is connected before interacting.
- Inspect windows or webview state to choose the target.
- Use wait-for-selector or equivalent readiness checks before UI actions.
- Capture before/after screenshots or logs when evidence matters.
- For IPC debugging, start capture, perform one interaction, fetch captured messages, then stop capture.
- If the session is stale, restart the daemon, then recreate and re-check the driver session.
Pitfalls And Gotchas
- Treating driver-session start as proof of connection.
- Using camelCase flags when the CLI expects kebab-case.
- Expecting screenshot bytes on stdout instead of writing a file.
- Typing without a selector and sending text to the wrong focus target.
- Running JavaScript as a function literal that never executes.
- Forgetting
adb reverse or equivalent routing on a real Android device.
- Leaving IPC monitors running and polluting later evidence.
Progressive Disclosure
Start with session health and target selection. Only move into webview interaction, IPC capture, logs, or mobile routing after the session is connected. Keep implementation advice in Tauri app skills; this skill should stay focused on operating the CLI reliably.
Verification Pattern
- Confirm status JSON shows a connected session before each interaction batch.
- Confirm selectors exist before clicks, typing, or style reads.
- Confirm screenshot files exist and represent the expected state.
- Confirm IPC capture is bracketed around the relevant action.
- Confirm mobile or remote commands name the host, port, and routing method.
- Confirm daemon restart is followed by a fresh status check.
1---2name: tauri-mcp-cli3description: Operational guardrail for using a Tauri MCP CLI to manage driver sessions, automate webviews, inspect IPC, capture screenshots, and debug mobile or remote Tauri apps.4---56# Tauri MCP CLI78## Purpose9Help agents operate Tauri apps through a Tauri MCP CLI: starting driver sessions, inspecting webviews, taking screenshots, executing JavaScript, driving UI interactions, reading logs, and debugging IPC. This skill is for CLI operation of a Tauri app, not for designing the Tauri app itself.1011**Use When**12- a Tauri MCP bridge or CLI is available and the agent needs to interact with a running Tauri app13- the task needs screenshot evidence, selector interaction, webview JavaScript, IPC command execution, logs, or window inspection14- the app runs on a mobile simulator, emulator, real device, or remote host1516**Do Not Use When**17- no Tauri MCP bridge or equivalent CLI is installed18- the task is ordinary browser automation outside a Tauri shell19- the job is to implement PTY or terminal behavior inside the app2021## Quick Start221. Confirm the Tauri app is running in development or test mode.232. Confirm the MCP bridge plugin and global Tauri access are configured if the CLI requires them.243. Start or verify a driver session before webview commands.254. Check session status with JSON and require `connected: true`.265. Use kebab-case flags and explicit output file paths for screenshots.276. Stop or restart the daemon only when the background session is stale or unhealthy.2829## Operating Constraints30- A successful driver-session start is not proof that the app is connected; status output must show a live connection.31- Prefer JSON status and list commands before interacting.32- Do not assume localhost works for mobile devices without port reversal or an explicit host.33- Screenshot commands should write files to disk when the image is evidence.34- Use selectors and wait commands before clicks or typing.35- Keep JavaScript snippets read-only unless the task explicitly requires mutation.36- Do not overwrite existing evidence files without using a deliberate path.37- Stop capture monitors after collecting the IPC or log evidence needed.3839## Inputs This Skill Expects40- The CLI command name and installed version, if known.41- The app run command, driver port, host, and target device.42- Bridge plugin configuration and whether `withGlobalTauri` or equivalent access is enabled.43- The desired operation: inspect, click, type, screenshot, execute JS, read logs, inspect IPC, or manage window state.44- The evidence path where screenshots or logs should be stored.4546## Output Contract47- State the active session host, port, connection status, and target window when known.48- For UI operations, name the selector, wait condition, action, and screenshot or state evidence.49- For IPC operations, name the command/event and the captured result or failure.50- For mobile or remote operations, state the connection route such as host, reverse port, emulator, simulator, or device.51- Include cleanup performed: monitor stopped, session left running intentionally, or session stopped.5253## Procedure541. Start the app if the user asked for operation and no app is already running.552. Start or check the driver session on the expected host and port.563. Read JSON session status and verify the app is connected before interacting.574. Inspect windows or webview state to choose the target.585. Use wait-for-selector or equivalent readiness checks before UI actions.596. Capture before/after screenshots or logs when evidence matters.607. For IPC debugging, start capture, perform one interaction, fetch captured messages, then stop capture.618. If the session is stale, restart the daemon, then recreate and re-check the driver session.6263## Pitfalls And Gotchas64- Treating driver-session start as proof of connection.65- Using camelCase flags when the CLI expects kebab-case.66- Expecting screenshot bytes on stdout instead of writing a file.67- Typing without a selector and sending text to the wrong focus target.68- Running JavaScript as a function literal that never executes.69- Forgetting `adb reverse` or equivalent routing on a real Android device.70- Leaving IPC monitors running and polluting later evidence.7172## Progressive Disclosure73Start with session health and target selection. Only move into webview interaction, IPC capture, logs, or mobile routing after the session is connected. Keep implementation advice in Tauri app skills; this skill should stay focused on operating the CLI reliably.7475## Verification Pattern76- Confirm status JSON shows a connected session before each interaction batch.77- Confirm selectors exist before clicks, typing, or style reads.78- Confirm screenshot files exist and represent the expected state.79- Confirm IPC capture is bracketed around the relevant action.80- Confirm mobile or remote commands name the host, port, and routing method.81- Confirm daemon restart is followed by a fresh status check.