MCP Server Tauri
This MCP server enables AI assistants to build, test, and debug Tauri v2 applications by providing comprehensive automation, monitoring, and debugging tools.
Core Capabilities:
Setup & Configuration: Get step-by-step instructions for installing and configuring the MCP Bridge plugin in Tauri projects with guided workflows
UI Automation: Take screenshots, find DOM elements (CSS selectors, XPath, text), click/type/scroll/swipe, execute JavaScript in webview context, get DOM snapshots and computed CSS styles, and wait for conditions
Window Management: List, inspect, resize, and manage multiple windows with detailed state information
IPC & Backend Integration: Execute Tauri commands, emit custom events, monitor real-time IPC traffic between frontend and Rust backend, capture command/event data with filtering, and retrieve app metadata and backend state
Logging & Debugging: Stream console logs (webview JavaScript), Android logcat, iOS simulator logs, and system logs for comprehensive debugging
Mobile Development: List and work with iOS simulators and Android emulators/devices for mobile app development
Session Management: Start/stop automation sessions with multi-app support, connecting to multiple running Tauri apps simultaneously via WebSocket (port 9223)
Guided Workflows: Use slash commands like
/setupand/fix-webview-errorsto streamline common development tasks
Key Features:
Cross-platform support (Linux, Windows, macOS, Android, iOS)
18 specialized tools for Tauri v2 applications
Direct Tauri integration via custom plugin (no external automation drivers)
Rich context provision with screenshots, DOM state, and logs for AI understanding
Provides tools for managing Android emulators, reading logcat logs, and launching Android Virtual Devices (AVDs) for Tauri mobile development.
Provides tools for managing iOS simulators, reading device logs, and launching simulators for Tauri mobile development.
Enables AI assistants to build, test, and debug Tauri v2 applications with UI automation (screenshots, clicks, typing), IPC monitoring, mobile device management (Android emulators and iOS simulators), CLI integration, configuration management, and log streaming capabilities.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server Tauri take a screenshot of the current app state"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Tauri
Give your AI assistant superpowers for Tauri development
Documentation · Getting Started · Available Tools
A Model Context Protocol (MCP) server that enables AI assistants like Claude, Cursor, and Windsurf to build, test, and debug Tauri® v2 applications. Screenshots, DOM state, and console logs from your running app give the AI rich context to understand what's happening—and tools to interact with it.
✨ Features
Category | Capabilities |
🎯 UI Automation | Screenshots, clicks, typing, scrolling, element finding, visual element picker |
🔍 IPC Monitoring | Capture and inspect Tauri IPC calls in real-time |
📱 Mobile Dev | List iOS simulators & Android emulators |
📋 Logs | Stream console, Android logcat, iOS, and system logs |
Disclaimer: This MCP was developed using agentic coding tools. It may contain bugs.
Related MCP server: tauri-plugin-mcp
🚀 Quick Start
Prerequisites
Node.js 20+ and npm
Rust and Cargo (for Tauri development)
Tauri CLI:
npm install -g @tauri-apps/cli@nextFor mobile: Xcode (macOS) or Android SDK
1. Configure Your AI Assistant
Use aix to add the server to your AI assistant:
npx -y @a1st/aix add mcp tauri --command 'npx @hypothesi/tauri-mcp-server' --userSupported clients: claude-code, cursor, windsurf, vscode, cline, roo-cline, claude, zed, goose, warp, codex
aix automatically detects your installed AI assistants and configures them.
Restart your AI assistant after adding the configuration.
CLI Usage
If you want to call the tools directly from a terminal instead of from an MCP client:
npm install -g @hypothesi/tauri-mcp-cli
tauri-mcp driver-session start --port 9223
tauri-mcp webview-screenshot --file screenshot.pngThe CLI uses MCPorter keep-alive support so driver_session state survives across separate commands.
2. Set Up the MCP Bridge Plugin
Ask your AI assistant to help configure your Tauri app:
"Help me set up the Tauri MCP Bridge plugin"
Your AI will:
Examine your project to see what's already configured
Show you what changes are needed (Cargo.toml, plugin registration, etc.)
Ask for your permission before making any modifications
That's it! The AI handles all the setup details while keeping you in control. 🎉
If you prefer to set up manually, see the Getting Started guide or the plugin documentation.
💬 Slash Commands (Prompts)
Command | Description |
| Set up or update the MCP bridge plugin in your Tauri project |
| Find and fix JavaScript errors in your webview |
| Visually select an element in your app — returns metadata and screenshot |
Just type the command in your AI assistant to start a guided workflow.
🧰 Available Tools (21 total)
Tool | Description |
| Get setup/update instructions for the MCP Bridge plugin |
Tool | Description |
| Start/stop/status automation session |
| Find elements by selector |
| Read console, Android, iOS, or system logs |
| Click, scroll, swipe, focus, long-press |
| Capture webview screenshots |
| Type text or send key events |
| Wait for elements, text, or events |
| Get computed CSS styles |
| Execute JavaScript in webview |
| Get structured accessibility tree snapshot |
| Visual element picker — user clicks an element, returns metadata + screenshot |
| Get metadata for element user Alt+Shift+Clicked |
| List windows, get info, or resize |
Multi-Window Support: All webview tools accept an optional
windowIdparameter to target specific windows. Usemanage_windowwithaction: "list"to discover available windows.
Tool | Description |
| Execute Tauri IPC commands |
| Get app metadata and state |
| Start/stop IPC monitoring |
| Get captured IPC traffic |
| Emit custom events |
Tool | Description |
| List Android devices and iOS simulators |
🏗️ Architecture
┌─────────────────────────────────────────────────────────────────┐
│ AI Assistant │
│ (Claude, Cursor, Windsurf) │
└─────────────────────────┬───────────────────────────────────────┘
│ MCP Protocol (stdio)
▼
┌─────────────────────────────────────────────────────────────────┐
│ MCP Server (Node.js) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Manager │ │ Driver │ │ Monitor │ │
│ │ CLI/Config │ │ UI Automation│ │ Logs/IPC Events │ │
│ └──────────────┘ └──────┬───────┘ └──────────────────────┘ │
└─────────────────────────────┼───────────────────────────────────┘
│ WebSocket (port 9223)
▼
┌─────────────────────────────────────────────────────────────────┐
│ Tauri Application │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ MCP Bridge Plugin (Rust) │ │
│ │ IPC Commands • Events • Backend State │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Webview (DOM/UI) │ │
│ └──────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘Why this approach?
✅ Rich AI context — Screenshots, DOM, and logs help the AI understand your app's state
✅ Cross-platform — Works on Linux, Windows, macOS, Android, and iOS
✅ No external drivers — No Selenium, Playwright, or browser automation needed
✅ Native integration — Direct access to Tauri's IPC and backend
🧑💻 Development
# Clone and install
git clone https://github.com/hypothesi/mcp-server-tauri.git
cd mcp-server-tauri
npm install
# Build all packages
npm run build
# Run tests
npm test
# Development mode
npm run dev -w @hypothesi/tauri-mcp-servermcp-server-tauri/
├── packages/
│ ├── mcp-server/ # MCP server (TypeScript)
│ ├── tauri-plugin-mcp-bridge/ # Tauri plugin (Rust + JS bindings)
│ └── test-app/ # Test Tauri application
├── docs/ # VitePress documentation
└── specs/ # Architecture specs# Release plugin (Cargo + npm)
npm run release:plugin patch
# Release server (npm only)
npm run release:server patchSee specs/releasing.md for details.
📚 Documentation
Full Documentation — Guides, API reference, and examples
MCP Server Package — Server implementation details
MCP Bridge Plugin — Tauri plugin documentation
🤝 Contributing
Contributions are welcome! Please:
Follow existing code patterns
Add tests for new features
Update documentation
Ensure
npm testandnpm run standardspass
Other Notes
This project is tested with BrowserStack.
📄 License
MIT © hypothesi
Trademark Notice
TAURI® is a registered trademark of The Tauri Programme within the Commons Conservancy. https://tauri.app/
This project is not affiliated with, endorsed by, or sponsored by The Tauri Programme within the Commons Conservancy.
Available Tools
19 toolsdriver_sessionAIdempotent
[Tauri Apps Only] Start/stop automation session to connect to a RUNNING Tauri app. Supports multiple concurrent app connections - each app runs on a unique port. The most recently connected app becomes the "default" app used when no appIdentifier is specified. Use action "status" to check connection state: returns single app format when 1 app connected, or array format with "isDefault" indicator when multiple apps connected. Action "stop" without appIdentifier stops ALL sessions; with appIdentifier stops only that app. The identifier field (e.g., "com.example.myapp") uniquely identifies each app. REQUIRED before using other webview_* or ipc_* tools. Connects via WebSocket to the MCP Bridge plugin in the Tauri app. For browser automation, use Chrome DevTools MCP instead. For Electron apps, this tool will NOT work.
Inputs: action (required), host, port, appIdentifier.
get_setup_instructionsARead-onlyIdempotent
Get instructions for setting up or updating the MCP Bridge plugin in a Tauri project. Call this tool when: (1) driver_session fails to connect, (2) you detect the plugin is not installed or outdated, or (3) the user asks about setup. Returns step-by-step guidance that you should follow to help the user configure their project. IMPORTANT: The instructions require you to examine the project first and ask for permission before making any changes.
Inputs: no named parameters.
ipc_emit_eventA
[Tauri Apps Only] Emit a Tauri event to test event handlers. Requires active driver_session. Events are Tauri-specific (not DOM events). For browser DOM events, use Chrome DevTools MCP instead.
Inputs: eventName (required), payload, appIdentifier.
ipc_execute_commandA
[Tauri Apps Only] Execute Tauri IPC commands (invoke Rust backend functions). Requires active driver_session. This is Tauri-specific IPC, not browser APIs. Plugin commands (plugin:mcp-bridge|*) are routed through the bridge; all other commands are executed via the webview using window.TAURI_INTERNALS.invoke, which keeps the application's Tauri capability rules in force. For Electron IPC or browser APIs, use appropriate tools for those frameworks.
Inputs: command (required), args, windowId, appIdentifier.
ipc_get_backend_stateARead-only
[Tauri Apps Only] Get Tauri backend state: app metadata, Tauri version, environment. Requires active driver_session. Use to verify you're connected to a Tauri app and get app info.
Inputs: appIdentifier.
ipc_get_capturedARead-only
[Tauri Apps Only] Get captured Tauri IPC traffic (requires ipc_monitor started). Shows captured commands (invoke calls) and events with arguments and responses. For browser network requests, use Chrome DevTools MCP instead.
Inputs: filter, appIdentifier.
ipc_monitorAIdempotent
[Tauri Apps Only] Monitor Tauri IPC calls between frontend and Rust backend. Requires active driver_session. Captures invoke() calls made through window.TAURI.core. Bridge-internal commands (plugin:mcp-bridge|*) are excluded from capture. This is Tauri-specific; for browser network monitoring, use Chrome DevTools MCP.
Inputs: action (required), appIdentifier.
list_devicesARead-only
[Tauri Mobile Apps Only] List Android emulators/devices and iOS simulators. Use for Tauri mobile development (tauri android dev, tauri ios dev). Not needed for desktop-only Tauri apps or web projects.
Inputs: no named parameters.
manage_windowAIdempotent
[Tauri Apps Only] Manage Tauri windows. Actions: "list" - List all windows with labels, titles, URLs, and state. "info" - Get detailed info for a window (size, position, title, focus, visibility). "resize" - Resize a window (requires width/height, uses logical pixels by default). "focus" - Focus a window (bring to front). "minimize" - Minimize a window. "maximize" - Maximize a window. Desktop-only actions (focus, minimize, maximize) require tauri-plugin-mcp-bridge 0.13.0+ and return a version error on older plugins. Requires active driver_session. For browser windows, use Chrome DevTools MCP instead.
Inputs: action (required), width, height, logical, +2 more.
read_logsARead-only
[Tauri Apps Only] Read logs from various sources: "console" for webview JS logs, "android" for logcat, "ios" for simulator logs, "system" for desktop logs. Requires active driver_session for console logs. Use for debugging Tauri app issues at any level.
Inputs: source (required), level, lines, since, +5 more.
webview_dom_snapshotARead-only
[Tauri Apps Only] Get a structured DOM snapshot of a Tauri app's webview. Supports different snapshot types for AI consumption. The "accessibility" type returns a YAML representation of the accessibility tree similar to Playwright's aria snapshots, including roles, names, states, and element refs. Use this for understanding UI semantics, finding interactive elements, or accessibility testing. The "structure" type returns a YAML representation of the DOM hierarchy with element tag names, IDs, CSS classes, and data-testid attributes (if present). Use this for understanding page layout, debugging CSS selectors, or locating elements by class/ID. Use the optional selector parameter to scope the snapshot to a subtree. The selector supports CSS (default), XPath, and text content matching via the strategy parameter. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app.
Inputs: type (required), selector, strategy, windowId, +1 more.
webview_execute_jsA
[Tauri Apps Only] Execute JavaScript in a Tauri app's webview context. Requires active driver_session. Has access to window.TAURI. If you need a return value, it must be JSON-serializable. For functions that return values, use an IIFE: "(() => { return 5; })()" not "() => { return 5; }". Accepts an optional timeout parameter (milliseconds) for long-running scripts. Timeout errors will identify which layer timed out (transport, script self-race, or Rust eval). Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app. For browser JS execution, use Chrome DevTools MCP instead.
Inputs: script (required), args, timeout, windowId, +1 more.
webview_find_elementARead-only
[Tauri Apps Only] Find elements in a running Tauri app's webview and return their geometry, text, accessible name, attributes, visibility, and optionally their computed styles. Supports CSS selectors (default), XPath expressions, and text content matching via the strategy parameter. The "text" strategy searches element text content (not just direct text nodes), prefers exact matches over substring matches, prefers innermost elements, and prefers interactive ancestors. Returns structured JSON with totalMatches, returned count, and array of matches each containing: nth index, ref ID, tag, trimmed text, accessible name, attributes, bounding rect, visibility, interactability, optional computed styles, and optional truncated outerHTML. Use this instead of webview_execute_js for querySelector, getBoundingClientRect, textContent, and getComputedStyle reads. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app. For browser pages or documentation sites, use Chrome DevTools MCP instead.
Inputs: selector (required), nth, limit, strategy, +5 more.
webview_get_pointed_elementARead-only
[Tauri Apps Only] Retrieves element metadata for an element the user previously pointed at via Alt+Shift+Click in the Tauri app. Returns the same rich metadata as webview_select_element (tag, id, classes, attributes, text, bounding rect, CSS selector, computed styles, parent chain) plus an annotated screenshot. The user must Alt+Shift+Click an element first before calling this tool. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app.
Inputs: windowId, appIdentifier.
webview_interactA
[Tauri Apps Only] Click, hover, right-click, scroll, swipe, focus, or perform gestures in a Tauri app webview. Supported actions: click, double-click, long-press, scroll, swipe, focus, hover, right-click. Supports CSS selectors (default), XPath, and text content matching via the strategy parameter. When using a text selector that matches multiple visible elements, you must provide the nth parameter to disambiguate, or the tool will throw an error listing the candidates. Requires active driver_session. For browser interaction, use Chrome DevTools MCP instead.
Inputs: action (required), x, y, nth, +11 more.
webview_keyboardA
[Tauri Apps Only] Type text or send keyboard events in a Tauri app. The selector parameter (for "type" action) supports CSS selectors (default), XPath, and text content matching via the strategy parameter. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app. For browser keyboard input, use Chrome DevTools MCP instead.
Inputs: action (required), key, nth, text, +5 more.
webview_screenshotARead-only
[Tauri Apps Only] Screenshot a running Tauri app's webview. Requires active driver_session. Captures only visible viewport. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app. For browser screenshots, use Chrome DevTools MCP instead. For Electron apps, this will NOT work.
Inputs: format, quality, filePath, maxWidth, +3 more.
webview_select_elementARead-only
[Tauri Apps Only] Activates an element picker overlay in the Tauri app. The user visually selects an element by clicking it, and the tool returns rich element metadata (tag, id, classes, attributes, text, bounding rect, CSS selector, computed styles, parent chain) plus an annotated screenshot with the element highlighted. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app.
Inputs: timeout, windowId, appIdentifier.
webview_wait_forARead-only
[Tauri Apps Only] Wait for elements, text, or IPC events in a Tauri app. When type is "selector", supports CSS (default), XPath, and text strategies via the strategy parameter. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app. For browser waits, use Chrome DevTools MCP instead.
Inputs: type (required), value (required), timeout, strategy, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have clearly distinct purposes (interact, keyboard, screenshot, execute_js, IPC commands, window management). The main overlap is among the element-inspection cluster: webview_find_element, webview_dom_snapshot, webview_select_element, and webview_get_pointed_element all return element metadata, and select_element vs get_pointed_element are especially close (both return rich metadata + annotated screenshot), but the descriptions distinguish their invocation mechanisms.
A predictable verb_noun pattern dominates and domain prefixes (webview_*, ipc_*) group related tools clearly. Minor deviation: a few tools (driver_session, manage_window, list_devices, read_logs) drop the prefix convention, but they remain readable and consistent in style.
At 19 tools the surface is on the heavier side but justified by a genuinely broad domain spanning session management, webview automation, IPC inspection, device enumeration, window control, and logging. Each tool maps to a distinct capability rather than padding.
Coverage is strong: connection lifecycle (driver_session/setup), interaction, keyboard, JS eval, element discovery, screenshots, waits, window control, IPC execution/monitoring/events, and logging. Minor gaps like navigation/history or attribute-only queries are workable via execute_js.
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Write, run and check natural-language browser tests of your web app from your AI assistant.
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI-driven testing and automation of Tauri desktop applications through natural language, allowing users to interact with UI elements, capture screenshots, execute commands, and test application flows without manual clicking or complex scripts.98MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to automate and test Tauri desktop applications through the Model Context Protocol. It provides tools for app management, UI interaction, and state inspection across multiple platforms without requiring CDP dependencies.142,501 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA Tauri plugin that enables AI agents to interact with Tauri applications through screenshots, DOM inspection, and input simulation via the Model Context Protocol. It allows agents to perform actions like clicking, typing, and executing JavaScript within the application's webview context.2,501 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with and debug Tauri desktop applications, providing tools for window management, user input simulation, and storage operations.2,501 npmMIT