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.
| Category | Capabilities |
|---|---|
| 🎯 UI Automation | Screenshots, clicks, typing, scrolling, element finding |
| 🔍 IPC Monitoring | Capture and inspect Tauri IPC calls in real-time |
| 📱 Mobile Dev | Manage iOS simulators & Android emulators |
| 🛠️ CLI Integration | Run any Tauri command (init, dev, build, etc.) |
| ⚙️ Configuration | Read/write Tauri config files with validation |
| 📋 Logs | Stream Android logcat, iOS device logs, system logs |
Disclaimer: This MCP was developed using agentic coding tools. It may contain bugs.
- Node.js 20+ and npm
- Rust and Cargo (for Tauri development)
- Tauri CLI:
npm install -g @tauri-apps/cli@next - For mobile: Xcode (macOS) or Android SDK
Add the Rust crate:
cargo add tauri-plugin-mcp-bridgeRegister in src-tauri/src/main.rs:
fn main() {
let mut builder = tauri::Builder::default();
#[cfg(debug_assertions)]
{
builder = builder.plugin(tauri_plugin_mcp_bridge::init());
}
builder
.run(tauri::generate_context!())
.expect("error while running tauri application");
}Enable Global Tauri in tauri.conf.json:
{
"app": {
"withGlobalTauri": true
}
}
⚠️ Required: WithoutwithGlobalTauri, the MCP server cannot interact with your application's webview.
Note: The npm package
@hypothesi/tauri-plugin-mcp-bridgeis optional. It provides TypeScript bindings if you want to call the plugin from your app's frontend code. The MCP server communicates with the Rust plugin directly via WebSocket.
Use install-mcp to add the server to your AI assistant:
npx -y install-mcp @hypothesi/tauri-mcp-server --client claude-codeSupported clients: claude-code, cursor, windsurf, vscode, cline, roo-cline, claude, zed, goose, warp, codex
Claude Code
npx -y install-mcp @hypothesi/tauri-mcp-server --client claude-codeCursor
npx -y install-mcp @hypothesi/tauri-mcp-server --client cursorVS Code / Copilot
npx -y install-mcp @hypothesi/tauri-mcp-server --client vscodeWindsurf
npx -y install-mcp @hypothesi/tauri-mcp-server --client windsurfCline
npx -y install-mcp @hypothesi/tauri-mcp-server --client clineThat's it! Restart your AI assistant and you're ready to build Tauri apps. 🎉
Note: See the plugin documentation for advanced configuration options.
The server provides slash commands for guided, multi-step workflows:
| Command | Description |
|---|---|
/fix-webview-errors |
Find and fix JavaScript errors in your webview. Connects to your app, retrieves console errors, analyzes them, and helps you fix the issues. |
Just type the command in your AI assistant to start a guided debugging session.
UI Automation — Screenshots, clicks, typing, and more
| Tool | Description |
|---|---|
tauri_webview_screenshot |
Capture webview screenshots |
tauri_list_windows |
List all open webview windows |
tauri_webview_find_element |
Find elements by selector |
tauri_webview_interact |
Click, scroll, swipe, long-press |
tauri_webview_keyboard |
Type text or send key events |
tauri_webview_wait_for |
Wait for elements, text, or events |
tauri_webview_get_styles |
Get computed CSS styles |
tauri_webview_execute_js |
Execute JavaScript in webview |
tauri_webview_focus_element |
Focus on elements |
tauri_driver_get_console_logs |
Get browser console logs |
tauri_read_platform_logs |
Read Android/iOS/system logs |
tauri_driver_session |
Start/stop automation session |
Multi-Window Support: All webview tools accept an optional
windowIdparameter to target specific windows. Usetauri_list_windowsto discover available windows.
IPC & Plugin — Deep Tauri integration
| Tool | Description |
|---|---|
tauri_plugin_execute_ipc |
Execute Tauri IPC commands |
tauri_plugin_get_window_info |
Get window information |
tauri_plugin_get_backend_state |
Get app metadata and state |
tauri_plugin_ipc_monitor |
Start/stop IPC monitoring |
tauri_plugin_ipc_get_events |
Get captured IPC events |
tauri_plugin_emit_event |
Emit custom events |
Mobile Development — Emulators and simulators
| Tool | Description |
|---|---|
tauri_list_devices |
List Android devices and iOS simulators |
tauri_launch_emulator |
Launch Android AVD or iOS Simulator |
Project Management — CLI, config, and docs
| Tool | Description |
|---|---|
tauri_run_command |
Run any Tauri CLI command |
tauri_read_config |
Read Tauri config files (including platform-specific) |
tauri_write_config |
Write config files with validation |
tauri_get_docs |
Fetch Tauri documentation |
┌─────────────────────────────────────────────────────────────────┐
│ 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
# 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-serverProject Structure
mcp-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
Releasing
# Release plugin (Cargo + npm)
npm run release:plugin patch
# Release server (npm only)
npm run release:server patchSee specs/releasing.md for details.
- Full Documentation — Guides, API reference, and examples
- MCP Server Package — Server implementation details
- MCP Bridge Plugin — Tauri plugin documentation
Contributions are welcome! Please:
- Follow existing code patterns
- Add tests for new features
- Update documentation
- Ensure
npm testandnpm run standardspass
MIT © hypothesi