MCP Server Tauri
Inspect, drive and debug a running Tauri v2 app's webview, windows and IPC from an AI assistant
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
Opens the app, which asks before it adds the server.
claude mcp add tauri-plugin -- npx tauri-plugin-mcp-server{
"mcpServers": {
"tauri-plugin": {
"command": "npx",
"args": [
"tauri-plugin-mcp-server"
]
}
}
}{
"mcpServers": {
"tauri-plugin": {
"command": "npx",
"args": [
"tauri-plugin-mcp-server"
]
}
}
}{
"servers": {
"tauri-plugin": {
"type": "stdio",
"command": "npx",
"args": [
"tauri-plugin-mcp-server"
]
}
}
}[mcp_servers.tauri-plugin]
command = "npx"
args = ["tauri-plugin-mcp-server"]gemini mcp add --scope user tauri-plugin npx -- tauri-plugin-mcp-serverTAURI_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. |
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.
| Runtime | Node.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.
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.
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.
take_screenshotquery_pageclickread_textinspect_elementdispatch_pointerapp_bridgetype_textpress_keymouse_actionnavigateexecute_jsmanage_storagemanage_windowwait_forrestart_appmanage_ipcquery_logslog_mark