io.github.hypothesi/mcp-server-tauri

平台与服务

by hypothesi

为 Tauri v2 应用提供的 Model Context Protocol server,用于集成标准化上下文能力。

帮 Tauri v2 应用快速接入 MCP 标准化上下文能力,省去自建协议与适配成本,对想把 AI 能力稳妥嵌入桌面的团队尤其省心。

什么是 io.github.hypothesi/mcp-server-tauri

为 Tauri v2 应用提供的 Model Context Protocol server,用于集成标准化上下文能力。

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

CategoryCapabilities
🎯 UI AutomationScreenshots, clicks, typing, scrolling, element finding, visual element picker
🔍 IPC MonitoringCapture and inspect Tauri IPC calls in real-time
📱 Mobile DevList iOS simulators & Android emulators
📋 LogsStream console, Android logcat, iOS, and 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: Xcode (macOS) or Android SDK

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

<details> <summary><strong>Claude Code</strong></summary>
bash
npx -y install-mcp @hypothesi/tauri-mcp-server --client claude-code
</details> <details> <summary><strong>Cursor</strong></summary>
bash
npx -y install-mcp @hypothesi/tauri-mcp-server --client cursor
</details> <details> <summary><strong>VS Code / Copilot</strong></summary>
bash
npx -y install-mcp @hypothesi/tauri-mcp-server --client vscode
</details> <details> <summary><strong>Windsurf</strong></summary>
bash
npx -y install-mcp @hypothesi/tauri-mcp-server --client windsurf
</details> <details> <summary><strong>Cline</strong></summary>
bash
npx -y install-mcp @hypothesi/tauri-mcp-server --client cline
</details>

Restart your AI assistant after adding the configuration.

CLI Usage

If you want to call the tools directly from a terminal instead of from an MCP client:

bash
npm install -g @hypothesi/tauri-mcp-cli
tauri-mcp driver-session start --port 9223
tauri-mcp webview-screenshot --file screenshot.png

The CLI uses MCPorter keep-alive support so driver_session state survives across separate commands.

2. Set Up the MCP Bridge Plugin

Ask your AI assistant to help configure your Tauri app:

"Help me set up the Tauri MCP Bridge plugin"

Your AI will:

  1. Examine your project to see what's already configured
  2. Show you what changes are needed (Cargo.toml, plugin registration, etc.)
  3. Ask for your permission before making any modifications

That's it! The AI handles all the setup details while keeping you in control. 🎉

<details> <summary><strong>Manual Setup</strong></summary>

If you prefer to set up manually, see the Getting Started guide or the plugin documentation.

</details>

💬 Slash Commands (Prompts)

CommandDescription
/setupSet up or update the MCP bridge plugin in your Tauri project
/fix-webview-errorsFind and fix JavaScript errors in your webview
/selectVisually select an element in your app — returns metadata and screenshot

Just type the command in your AI assistant to start a guided workflow.


🧰 Available Tools (20 total)

<details> <summary><strong>Setup & Configuration</strong></summary>
ToolDescription
get_setup_instructionsGet setup/update instructions for the MCP Bridge plugin
</details> <details> <summary><strong>UI Automation</strong> — Screenshots, clicks, typing, and more</summary>
ToolDescription
driver_sessionStart/stop/status automation session
webview_find_elementFind elements by selector
read_logsRead console, Android, iOS, or system logs
webview_interactClick, scroll, swipe, focus, long-press
webview_screenshotCapture webview screenshots
webview_keyboardType text or send key events
webview_wait_forWait for elements, text, or events
webview_get_stylesGet computed CSS styles
webview_execute_jsExecute JavaScript in webview
webview_dom_snapshotGet structured accessibility tree snapshot
webview_select_elementVisual element picker — user clicks an element, returns metadata + screenshot
webview_get_pointed_elementGet metadata for element user Alt+Shift+Clicked
manage_windowList windows, get info, or resize

Multi-Window Support: All webview tools accept an optional windowId parameter to target specific windows. Use manage_window with action: "list" to discover available windows.

</details> <details> <summary><strong>IPC & Plugin</strong> — Deep Tauri integration</summary>
ToolDescription
ipc_execute_commandExecute Tauri IPC commands
ipc_get_backend_stateGet app metadata and state
ipc_monitorStart/stop IPC monitoring
ipc_get_capturedGet captured IPC traffic
ipc_emit_eventEmit custom events
</details> <details> <summary><strong>Mobile Development</strong> — Device listing</summary>
ToolDescription
list_devicesList Android devices and iOS simulators
</details>

🏗️ Architecture

code
┌─────────────────────────────────────────────────────────────────┐
│                        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

🧑‍💻 Development

bash
# 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>
code
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>
bash
# 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


Trademark Notice

TAURI® is a registered trademark of The Tauri Programme within the Commons Conservancy. https://tauri.app/

This project is not affiliated with, endorsed by, or sponsored by The Tauri Programme within the Commons Conservancy.

常见问题

io.github.hypothesi/mcp-server-tauri 是什么?

为 Tauri v2 应用提供的 Model Context Protocol server,用于集成标准化上下文能力。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描109.6k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描109.6k

接口设计评审

by alirezarezvani

Universal
热门

审查 REST API 设计是否符合行业规范,自动检查命名、HTTP 方法、状态码与文档覆盖,识别破坏性变更并给出设计评分,适合评审接口方案和版本迭代前把关。

做API和架构方案时,它能帮你提前揪出接口设计问题并对齐最佳实践,评审视角系统,团队协作更省心。

平台与服务
未扫描9.0k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
82.9k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.5k

评论