Tauri MCP Server

by dirvine

Not rated
GitHub

About

A server for testing and interacting with Tauri v2 applications, providing tools for process management, window manipulation, and debugging.

Details

Author
dirvine
Categories
Developer Tools

Setup

Install Tauri MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/dirvine/tauri-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

AModel Context Protocol (MCP)server for testing and interacting with Tauri v2 applications. This tool enables AI assistants to better understand, debug, and interact with Tauri apps during development.

The MCP protocol provides a standardized way for AI assistants to interact with external tools and systems. This server implements the MCP specification to expose Tauri application testing and debugging capabilities.

This server is fully compliant with theModel Context Protocol specification. It implements:

- ✅JSON-RPC 2.0transport over stdio
- ✅Initialize/shutdownhandshake
- ✅Toolscapability with 12 specialized Tauri testing tools
- ✅Proper error handlingwith descriptive messages
- ✅Tool schemasusing JSON Schema format
- ✅Protocol version compatibility- Supports both "1.0" and date-based versions (e.g., "2024-11-05")

- MCP Introduction
-
Building MCP Servers
-
Tool Definitions

- launch_app- Launch Tauri applications with arguments
- stop_app- Gracefully stop running apps
- get_app_logs- Capture stdout/stderr output
- monitor_resources- Track CPU, memory, and disk usage

- take_screenshot- Capture app window screenshots
- get_window_info- Get window dimensions, position, and state

- send_keyboard_input- Simulate keyboard input
- send_mouse_click- Simulate mouse clicks
- Mouse movement, dragging, and scrolling support

- execute_js- Execute JavaScript in the webview
- get_devtools_info- Get DevTools connection info
- WebDriver integration for advanced testing
- Console log capture

- list_ipc_handlers- List registered Tauri commands
- call_ipc_command- Call Tauri IPC commands
- Event emission and listening

Using DXT (Recommended for Claude Desktop)

The easiest way to install tauri-mcp for use with Claude Desktop is via DXT (Desktop Extension):
- Download the latesttauri-mcp-node-.dxtfile from the
releases page
- Double-click the.dxtfile to install (or drag it onto Claude Desktop)
- The server will be automatically configured and ready to use

Note: Due to aknown issuewith Claude Desktop's DXT extraction, we provide a Node.js wrapper version (tauri-mcp-node-.dxt) that works around this limitation.

Important Note for Rust-based MCP Servers: Claude Desktop currently hascompatibility issueswith Rust-based MCP servers, causing immediate disconnections after initialization. This is a known issue affecting all non-Node.js MCP servers. The cargo installation is suitable for:

- Direct CLI usage
- Integration with other tools
- Development and testing

For use with Claude Desktop, please use the DXT package which includes a Node.js wrapper.

# Clone the repository git clone https://github.com/dirvine/tauri-mcp.git cd tauri-mcp # Build and install cargo install --path .
# Start the MCP server tauri-mcp serve # With custom host and port tauri-mcp serve --host 127.0.0.1 --port 3000 # With a specific Tauri app tauri-mcp --app-path ./my-tauri-app

Create atauri-mcp.tomlfile for configuration:

auto_discover = true session_management = true event_streaming = false performance_profiling = false network_interception = false

- TAURI_MCP_LOG_LEVEL- Set log level (trace, debug, info, warn, error)
- TAURI_MCP_CONFIG- Path to config file (default: tauri-mcp.toml)

Option 1: Using DXT Package (Recommended)

Install thetauri-mcp-node-.dxtpackage by double-clicking it. The server will be automatically configured.

If you need to configure manually or use the development version, add to your Claude Desktop configuration:

{ "mcpServers": { "tauri-mcp": { "command": "node", "args": ["/path/to/tauri-mcp/server/index.js"], "env": { "TAURI_MCP_LOG_LEVEL": "info" } } } }

Note: Direct Rust binary configuration ("command": "tauri-mcp") will not work with Claude Desktop due to compatibility issues. Use the Node.js wrapper approach shown above.

All tools are exposed through the MCP protocol and can be called by AI assistants:

// Launch a Tauri app await use_mcp_tool("tauri-mcp", "launch_app", { app_path: "/path/to/tauri-app", args: ["--debug"] }); // Take a screenshot await use_mcp_tool("tauri-mcp", "take_screenshot", { process_id: "uuid-here", output_path: "./screenshot.png" }); // Execute JavaScript await use_mcp_tool("tauri-mcp", "execute_js", { process_id: "uuid-here", javascript_code: "window.location.href" }); // Send keyboard input await use_mcp_tool("tauri-mcp", "send_keyboard_input", { process_id: "uuid-here", keys: "cmd+a" });

- macOS- Full support including window management
- Windows- Full support with native window APIs
- Linux- X11 support (Wayland in progress)

# Debug build cargo build # Release build cargo build --release # Run tests cargo test

The project includes build scripts for creating DXT (Desktop Extension) packages for different platforms.

- Rust toolchain installed
- Node.js 18+ (for the Node.js wrapper)
- zipcommand available in PATH

# Build the Node.js wrapper version (recommended) ./build-dxt-node.sh # The DXT package will be created as tauri-mcp-node-.dxt
# Create a Windows build script or use WSL # Ensure you have zip.exe available or use PowerShell's Compress-Archive # Build release binary cargo build --release # Create package directory structure mkdir dxt-package-node mkdir dxt-package-node\server # Copy files copy target\release\tauri-mcp.exe dxt-package-node\ copy server\. dxt-package-node\server\ copy manifest-node.json dxt-package-node\manifest.json # Install Node dependencies cd dxt-package-node\server npm install --production cd ..\.. # Create DXT archive (using PowerShell) Compress-Archive -Path dxt-package-node\* -DestinationPath tauri-mcp-node.zip Rename-Item tauri-mcp-node.zip tauri-mcp-node-0.1.8.dxt

- manifest.json- Extension metadata and configuration
- tauri-mcp- The compiled Rust binary
- server/- Node.js wrapper and dependencies

- index.js- Node.js MCP server that spawns the Rust binary
- package.json- Node.js dependencies
- node_modules/- MCP SDK and dependencies
-

Use--no-dir-entriesflag: When creating the zip file, use the--no-dir-entriesflag to avoidextraction issues:

Binary permissions: Ensure the Rust binary has executable permissions before packaging:

Cross-platform builds: For distributing to other platforms, you'll need to build the Rust binary on each target platform or use cross-compilation.

tauri-mcp/ ├── src/ │ ├── main.rs # Entry point │ ├── server.rs # MCP server implementation │ ├── tools/ # Tool implementations │ │ ├── process.rs # Process management │ │ ├── window.rs # Window manipulation │ │ ├── input.rs # Input simulation │ │ ├── debug.rs # Debugging tools │ │ └── ipc.rs # IPC interaction │ └── utils/ # Utility modules ├── examples/ # Example Tauri apps └── tests/ # Integration tests
# Launch the server tauri-mcp serve # In your AI assistant: # 1. Launch the app # 2. Take a screenshot # 3. Send some input # 4. Check the logs # 5. Stop the app
import asyncio from mcp import Client async def test_tauri_app(): client = Client("tauri-mcp") # Launch app result = await client.call_tool("launch_app", { "app_path": "./my-app", "args": ["--test-mode"] }) process_id = result["process_id"] # Wait for app to start await asyncio.sleep(2) # Take screenshot await client.call_tool("take_screenshot", { "process_id": process_id, "output_path": "./test-screenshot.png" }) # Send input await client.call_tool("send_keyboard_input", { "process_id": process_id, "keys": "Hello, Tauri!" }) # Get logs logs = await client.call_tool("get_app_logs", { "process_id": process_id, "lines": 50 }) print("App logs:", logs) # Stop app await client.call_tool("stop_app", { "process_id": process_id }) asyncio.run(test_tauri_app())

- Grant accessibility permissions in System Preferences
- Required for input simulation

- Ensure screen recording permissions are granted
- Check if the app window is visible

- Ensure the Tauri app has DevTools enabled
- Check if ChromeDriver is installed for WebDriver support

TAURI_MCP_LOG_LEVEL=debug tauri-mcp serve

Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request

This project is licensed under the MIT License - see the LICENSE file for details.

- Implements theModel Context Protocolspecification
- Designed for
Tauri v2applications
- Input simulation powered by
enigo
- Screenshot functionality via
screenshots-rs

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

AI-powered live runtime debugging with Lightrun production context.

Run, debug, and triage tests via natural language across HyperExecute, Automation, SmartUI, and Accessibility on the TestMu AI cloud.

Understand, develop, and debug authorization policies in Oso Cloud.

A comprehensive proxy that combines multiple MCP servers into a single MCP. It provides discovery and management of tools, prompts, resources, and templates across servers, plus a playground for debugging when building MCP servers.

Proxyman MCP allows AI to inspect HTTP traffic, create debugging rules, and control Proxyman - all through natural language conversations.

Debug your remote Node.js and Next.js applications directly from your AI IDE like Cursor.

Live browser debugging for AI assistants — DOM, console, network via MCP.

Drives an Android emulator or a real device over adb: screenshots, UI hierarchy with true device-pixel coordinates, tap and type, app lifecycle, logcat, and Gradle builds and tests.

Interact with Android devices using the Android Debug Bridge (ADB).

Policy-gated MCP tools that let coding agents build, flash, stimulate and observe real embedded hardware (OpenOCD, pyOCD, STM32CubeProgrammer, serial, CAN).

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.