MCP Server Tauri

MCP Server Tauri

Enables AI assistants to build, test, and debug Tauri v2 applications with UI automation, IPC monitoring, mobile device management, and real-time access to screenshots, DOM state, and console logs.

Category
访问服务器

README

<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 crates.io License: MIT Tauri v2

Documentation · Getting Started · Available Tools

</div>


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—all via WebSocket
🔍 IPC Monitoring Capture and inspect Tauri IPC calls in real-time
📱 Mobile Dev Manage Android emulators & iOS simulators
🛠️ 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 development)
  • Tauri CLI: npm install -g @tauri-apps/cli@next
  • For mobile: Android SDK or Xcode (macOS)

1. Add the MCP Bridge Plugin to Your Tauri App

Add to Cargo.toml:

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

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

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

2. Configure Your AI Assistant

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

Use the Claude Code CLI:

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

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

{
  "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">

Or manually: Go to Cursor SettingsMCPNew MCP Server:

{
  "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">

Or via CLI:

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

Or manually add to settings.json:

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

</details>

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

Go to SettingsAIMCP Servers:

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

</details>

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

Follow the Cline MCP configuration guide and use:

{
  "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 for advanced configuration options.


🧰 Available Tools

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

Tool Description
tauri_webview_screenshot Capture webview screenshots
tauri_driver_session Start/stop automation session
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

</details>

<details> <summary><strong>IPC & Plugin</strong> — Deep Tauri integration</summary>

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

</details>

<details> <summary><strong>Mobile Development</strong> — Emulators and simulators</summary>

Tool Description
tauri_list_devices List Android devices and iOS simulators
tauri_launch_emulator Launch Android AVD or iOS Simulator

</details>

<details> <summary><strong>Project Management</strong> — CLI, config, and docs</summary>

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

</details>


🏗️ 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, and macOS
  • 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-server

<details> <summary><strong>Project Structure</strong></summary>

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

</details>

<details> <summary><strong>Releasing</strong></summary>

# Release plugin (Cargo + npm)
npm run release:plugin patch

# Release server (npm only)
npm run release:server patch

See specs/releasing.md for details.

</details>


📚 Documentation


🤝 Contributing

Contributions are welcome! Please:

  1. Follow existing code patterns
  2. Add tests for new features
  3. Update documentation
  4. Ensure npm test and npm run standards pass

📄 License

MIT © hypothesi

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选