Get the FREE Ultimate OpenClaw Setup Guide →

tauri-plugin

Allows AI agents (e.g., Cursor, Claude Code) to debug within Tauri apps via screenshot capture, window management, DOM access, and simulated user inputs.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio p3gleg-tauri-plugin-mcp npx tauri-plugin-mcp-server

How to use

This MCP server exposes a suite of high-level tools that allow an AI agent to interact with and debug a Tauri application. It runs as a server (via an IPC or TCP socket) and translates MCP tool calls into actions within the guest environment, including taking screenshots, inspecting the DOM, clicking, typing, mouse actions, navigation, executing JavaScript, and managing storage or window state. To get started, run the MCP server CLI (for example with npx tauri-plugin-mcp-server) and connect your AI agent to the configured IPC socket or TCP endpoint. The server supports both IPC sockets and TCP connections, with optional authentication for TCP if needed. The 10 tools cover: take_screenshot, query_page, click, type_text, mouse_action, navigate, execute_js, manage_storage, manage_window, and wait_for, enabling comprehensive automation and debugging of your Tauri app from an AI agent.

Once connected, you can request a screenshot to capture the current window, query the page for structure or state, perform clicks or text entry, simulate mouse actions, navigate within the webview, run arbitrary JavaScript, and manipulate storage or window properties. You can also wait for specific conditions (elements appearing, text changes, or visibility) to synchronize with dynamic content. The tools are designed to work with a variety of AI agents and can be used to build automated testing, debugging, or interaction flows for your Tauri application.

How to install

Prerequisites:

  • Node.js and npm or pnpm
  • Optional: Rust toolchain if you plan to build the Tauri plugin from source
  • Git (for dependencies or git-based installs)

Installation steps:

  1. Install the MCP client bindings (guest JS) for your app:
npm install tauri-plugin-mcp
  1. Install the MCP server CLI globally (or run via npx):
# Global install
npm install -g tauri-plugin-mcp-server

# Or run directly with npx
npx tauri-plugin-mcp-server
  1. If you want to build from source (optional):
# In the repo root, install JS bindings
pnpm install
pnpm run build

# Build the Rust plugin (requires Rust/toolchain)
pnpm install -w --ignore-scripts
cargo build --release

# Build the MCP server packages
cd mcp-server-ts
pnpm install
pnpm build
  1. Run the MCP server and connect your agent using the provided configuration (see mcp_config example).

Additional notes

Tips and notes:

  • Default connection mode is IPC via a socket path; you can switch to TCP by configuring TAURI_MCP_CONNECTION_TYPE and related host/port env vars as shown in the README.
  • For TCP connections, consider setting an auth token to secure access; non-loopback TCP without auth is rejected.
  • If you see a “Connection refused” error, ensure the MCP server is started and both sides use the same connection type (IPC vs TCP).
  • When debugging, you can test with the CLI example: npx tauri-plugin-mcp-server and verify the server is listening before connecting the agent.
  • The npm package name for the server CLI is tauri-plugin-mcp-server; the core plugin library is tauri-plugin-mcp. Ensure you align the client and server versions to avoid protocol mismatches.
  • For multi-webview or custom socket paths, you can override the default IPC socket path via environment variables or configuration as shown in the examples.

Related MCP Servers

Sponsor this space

Reach thousands of developers