Skip to content

MCP Serverfor Tauri

An MCP server that empowers AI assistants to build, test, and debug Tauri applications.

Visual Context

Capture and analyze screenshots to understand UI state and help with visual debugging

Live Debugging

Access console logs, window state, and system logs in real-time

IPC Monitoring

Capture and inspect Tauri IPC calls between frontend and backend in real-time

Device Management

List Android emulators and iOS simulators for mobile testing

WebView Automation

Click, type, scroll, find elements, and verify UI state in your app's webview

Plugin Bridge

Execute IPC commands and interact with the Tauri plugin system

Community Project

This is an unofficial community project, independently developed to enhance Tauri® development through AI assistance. Please note that this project is not affiliated with, endorsed by, or sponsored by The Tauri Programme within the Commons Conservancy.

What Is This?

MCP Server for Tauri® bridges AI assistants with your Tauri development environment via the Model Context Protocol. Control your entire dev workflow through natural language - test UI, debug issues, monitor IPC calls, and inspect your app's state.

Quick Start

1. Prerequisites

  • Node.js 20+ and npm
  • Rust and Cargo
  • Tauri CLI: npm install -g @tauri-apps/cli@next

2. Add the MCP Bridge Plugin to Your Tauri App

Add the Rust crate (from your src-tauri directory):

bash
cargo add tauri-plugin-mcp-bridge

Or manually add to Cargo.toml: tauri-plugin-mcp-bridge = "0.7"

Register in src-tauri/src/main.rs:

rust
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");
}

Required Configuration

You must enable withGlobalTauri in your tauri.conf.json:

json
{
  "app": {
    "withGlobalTauri": true
  }
}

This exposes window.__TAURI__ which the MCP bridge plugin requires to communicate with your app.

Optional: TypeScript Bindings

The npm package @hypothesi/tauri-plugin-mcp-bridge is 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—no npm package needed.

3. Configure Your AI Assistant

Use install-mcp to add the server to your AI assistant:

bash
npx -y install-mcp @hypothesi/tauri-mcp-server --client claude-code

Supported clients: claude-code, cursor, windsurf, vscode, cline, roo-cline, claude, zed, goose, warp, codex

Manual Configuration

If you prefer to configure manually, add to your MCP config:

json
{
  "mcpServers": {
    "tauri": {
      "command": "npx",
      "args": ["-y", "@hypothesi/tauri-mcp-server"]
    }
  }
}

Config file locations:

  • Claude Code: Cmd/Ctrl+Shift+P → "MCP: Edit Config"
  • Cursor: Cursor SettingsMCPNew MCP Server
  • VS Code: Add to settings.json under mcp.servers
  • Windsurf: Cascade pane → MCPs icon → settings icon
  • Cline: See Cline MCP configuration guide

Architecture

The MCP server communicates with your Tauri application through:

  • Plugin Client (WebSocket port 9223) - Native IPC for UI automation, DOM interaction, and direct commands via mcp-bridge plugin

Slash Commands (Prompts)

The server provides slash commands (prompts) for guided workflows:

/setup - Set up the MCP bridge plugin in your Tauri project
/fix-webview-errors - Find and fix JavaScript errors in your webview

Learn more about prompts →

17 Powerful Tools

The server exposes tools across 4 categories:

Setup & Configuration (1 tool) - Guided setup instructions
UI Automation & WebView (10 tools) - Gestures, screenshots, JS execution, element finding, logs
IPC Tools (5 tools) - IPC commands, monitoring, events
Mobile Development (1 tool) - Device listing

This is an unofficial community project. Not affiliated with, endorsed by, or associated with the Tauri project or CrabNebula Ltd.