# mcp-server-tauri
## 基本信息
- Slug: `hypothesi-mcp-server-tauri`
- Source: modelscope
- Publisher: @hypothesi/mcp-server-tauri
- Categories: developer-tools / app-automation / testing-and-qa-tools
- Hosted: No
- License: MIT License
- Source URL: https://www.modelscope.cn/mcp/servers/@hypothesi/mcp-server-tauri
## 简介
暂无描述。
## 安装提示

```bash
**Register in `src-tauri/src/main.rs`:** ```rust fn main() { tauri::Builder::default() .plugin(tauri_plugin_mcp_bridge::init()) .run(tauri::generate_context!()) .expect("error while running tauri application"); }
```

## MCP Server 详情

<div align="center">

<img src="docs/public/logo.svg" alt="MCP Server Tauri" width="120" height="120" />

# MCP Server Tauri

**Give your AI assistant superpowers for Tauri development**

[![npm version](https://img.shields.io/npm/v/@hypothesi/tauri-mcp-server?style=flat-square&color=0ea5e9)](https://www.npmjs.com/package/@hypothesi/tauri-mcp-server)
[![crates.io](https://img.shields.io/crates/v/tauri-plugin-mcp-bridge?style=flat-square&color=e6522c)](https://crates.io/crates/tauri-plugin-mcp-bridge)
[![License: MIT](https://img.shields.io/badge/License-MIT-8b5cf6.svg?style=flat-square)](LICENSE)
[![Tauri v2](https://img.shields.io/badge/Tauri-v2-FFC131?style=flat-square&logo=tauri&logoColor=white)](https://v2.tauri.app)

[Documentation](https://hypothesi.github.io/mcp-server-tauri)  [Getting Started](#quick-start)  [Available Tools](#available-tools)

</div>

---

A **Model Context Protocol (MCP) server** that enables AI assistants like Claude, Cursor, and Windsurf to build, test, and debug [Tauri](https://tauri.app) v2 applications. Screenshots, DOM state, and console logs from your running app give the AI rich context to understand what's happeningand tools to interact with it.

##  Features

| 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._

##  Quick Start

### Prerequisites

- **Node.js** 20+ and npm
- **Rust** and Cargo (for [Tauri](https://tauri.app) development)
- **Tauri CLI**: `npm install -g @tauri-apps/cli@next`
- For mobile: Xcode (macOS) or Android SDK

### 1. Add the MCP Bridge Plugin to Your Tauri App

**Add to `Cargo.toml`:**

```toml
[dependencies]
tauri-plugin-mcp-bridge = "0.1"
```

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

```rust
fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_mcp_bridge::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
```

**Enable Global Tauri in `tauri.conf.json`:**

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

>  **Required:** Without `withGlobalTauri`, the MCP server cannot interact with your application's webview.

### 2. Configure Your AI Assistant

<details>
<summary><strong>Claude Code</strong></summary>

Use the Claude Code CLI:

```bash
claude mcp add tauri npx @hypothesi/tauri-mcp-server
```

Or manually add to your config (Cmd/Ctrl+Shift+P  "MCP: Edit Config"):

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

</details>

<details>
<summary><strong>Cursor</strong></summary>

**Click to install:**

[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor" height="32">](https://cursor.com/en/install-mcp?name=tauri&config=eyJjb21tYW5kIjoibnB4IC15IEBoeXBvdGhlc2kvdGF1cmktbWNwLXNlcnZlciJ9)

**Or manually:** Go to `Cursor Settings`  `MCP`  `New MCP Server`:

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

</details>

<details>
<summary><strong>VS Code / Copilot</strong></summary>

**Click to install:**

[<img src="https://img.shields.io/badge/VS_Code-Add_MCP_Server-007ACC?logo=visualstudiocode&logoColor=white" alt="Add Tauri MCP server in VS Code" height="32">](vscode://ms-vscode.mcp/installServer?%7B%22name%22%3A%22tauri%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40hypothesi%2Ftauri-mcp-server%22%5D%7D)

**Or via CLI:**

```bash
code --add-mcp '{"name":"tauri","command":"npx","args":["-y","@hypothesi/tauri-mcp-server"]}'
```

**Or manually add to `settings.json`:**

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

</details>

<details>
<summary><strong>Windsurf</strong></summary>

In the Cascade pane, the "MCPs" icon (it looks like a plug), then click the settings icon
in the top right corner.

Or, go to `Windsurf Settings`  `Cascade` and under the `MCP Servers` heading click `Open
MCP Marketplace`. Then in the Marketplace, click the gear icon to edit the config.

Add:

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

</details>

<details>
<summary><strong>Cline</strong></summary>

Follow the [Cline MCP configuration guide](https://docs.cline.bot/mcp/configuring-mcp-servers) and use:

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

</details>

That's it! Restart your AI assistant and you're ready to build Tauri apps. 

> **Note:** See the [plugin documentation](./packages/tauri-plugin-mcp-bridge/README.md) for advanced configuration options.

---

##  Slash Commands (Prompts)

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.

---

##  Available Tools

<details>
<summary><strong>UI Automation</strong>  Screenshots, clicks, typing, and more</summary>

| Tool | Description |
|------|-------------|
| `tauri_list_windows` | List all open webview windows |
| `tauri_webview_screenshot` | Capture webview screenshots |
| `tauri…

