Tauri Plugin MCP

Inspect, drive and debug a running Tauri desktop app during development from an MCP client

By Pegleg (individual) TypeScript Local · stdio Developer toolsTestingBrowser automation

47 popularity score ★ 113 ↓ 861/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add tauri-plugin -- npx tauri-plugin-mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "tauri-plugin": {
      "command": "npx",
      "args": [
        "tauri-plugin-mcp-server"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "tauri-plugin": {
      "command": "npx",
      "args": [
        "tauri-plugin-mcp-server"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "tauri-plugin": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "tauri-plugin-mcp-server"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.tauri-plugin]
command = "npx"
args = ["tauri-plugin-mcp-server"]
Gemini CLITerminal
gemini mcp add --scope user tauri-plugin npx -- tauri-plugin-mcp-server

Settings 6

TAURI_MCP_IPC_PATH Optional: Socket path to connect to; defaults to /tmp/tauri-mcp.sock (the tauri-mcp.sock named pipe on Windows).
TAURI_MCP_CONNECTION_TYPE Optional: Set to tcp to connect over TCP instead of the IPC socket.
TAURI_MCP_TCP_HOST Optional: Host to connect to in TCP mode, e.g. 127.0.0.1.
TAURI_MCP_TCP_PORT Optional: Port to connect to in TCP mode; must match the plugin's port.
TAURI_MCP_AUTH_TOKEN Optional: Auth token; if unset, it is read from the .token file next to the socket.
TAURI_DEV_URL Optional: Dev server URL that restart_app loads in the webview after a restart.

What it does

Tauri Plugin MCP has two parts. One is a Rust plugin plus a small JavaScript binding that you add to your own Tauri app's development build. The other is a Node MCP server, the npm package tauri-plugin-mcp-server, that your MCP client starts over stdio. The server connects to the plugin through a local socket: by default a Unix socket at /tmp/tauri-mcp.sock (a named pipe on Windows), or TCP if you set TAURI_MCP_CONNECTION_TYPE=tcp. It then passes tool calls through to the app.

With it, an assistant can take window screenshots, map or dump the page DOM, read text and computed styles, click, type, press keys, scroll and drag, navigate the webview, run arbitrary JavaScript, read and change localStorage and cookies, control windows, and wait for elements to appear. It can also call Tauri commands over IPC, watch IPC traffic and events, restart the app, and query buffered Rust and console logs. You use it to debug and QA your own app while it runs under `tauri dev`. It does nothing for apps that do not include the plugin.

Version 0.3.1's own source (mcp-server-ts/src/tools/index.ts at the v0.3.1 tag) registers 19 tools, as the GitHub README says. The README bundled in the npm package still says 13 and leaves out press_key, manage_ipc, read_text, inspect_element, dispatch_pointer and app_bridge. That package README also documents a TAURI_DEV_URL setting the main README does not mention. restart_app uses it to send the webview back to the dev server after a restart.

What it needs

RuntimeNode.js

Node.js to run the server with npx. You also need your own Tauri v2 app with the tauri-plugin-mcp Rust crate registered (for now from git, since the crates.io release is still to come), plus the tauri-plugin-mcp npm guest binding with setupPluginListeners() called in the frontend. The app must be running with the socket server started. Raw-coordinate and native mouse actions on macOS need Accessibility permission for the process that runs the app.

Limits

Works only with a Tauri app built with the plugin, and only while it runs. Without the guest binding, execute_js, query_page, type_text, selector clicks and wait_for time out. Native input injection is macOS-only. On Windows and Linux, input falls back to synthetic JS events (isTrusted=false), about 80% coverage per the README. If tauri.conf.json has a capabilities allowlist that leaves out the mcp capability, logging and IPC capture return nothing. restart_app refuses under `tauri dev`. By default, alert/confirm/prompt are stubbed and answer on their own (confirm returns false). The socket server will not start in release builds unless .allow_release_builds(true) is set.

Who it suits

It suits developers building Tauri desktop apps who want an assistant to see and operate the app's webview while they debug or test, mainly on macOS, where native input is supported. It is unofficial and needs code changes in your app, so it is not a way to automate a Tauri app you did not build. For plain websites, a browser-automation server is the simpler choice. The makers mean it for development builds only.

Tools 19

take_screenshot
Captures an app window, saving the full image to disk and returning a small thumbnail
query_page
Returns an element map, raw HTML, page state, element coordinates or app and window info
click
Clicks an element found by selector, or at x/y coordinates
read_text
Returns the visible text of elements matching a CSS selector, capped in size
inspect_element
Reports an element's bounding box, computed styles, classes and attributes
dispatch_pointer
Sends synthetic pointer sequences (hover, down, up, drag, double-click) to an element
app_bridge
Lists and calls helper functions the app registered for MCP use
type_text
Types into fields, fills forms, picks select options and attaches files
press_key
Sends special keys and modifier combinations such as Escape, Tab or cmd+a
mouse_action
Hovers, scrolls or drags with the mouse
navigate
Loads a URL, goes back or forward, or reloads the webview
execute_js
Runs any JavaScript in the webview and returns the result
manage_storage
Reads, sets and clears localStorage keys; reads or clears cookies
manage_window
Lists, focuses, resizes, moves, minimizes or closes windows; sets zoom and devtools
wait_for
Waits until text or an element appears, disappears or changes visibility
restart_app
Restarts the Tauri app and waits until it responds again
manage_ipc
Invokes Tauri commands, inspects captured IPC traffic, and emits or waits for events
query_logs
Filters and pages through buffered Rust, console and dialog logs
log_mark
Writes begin/end markers to the log buffer to scope a later log query

Similar servers