by P3GLEG
Allows AI agents (e.g., Cursor, Claude Code) to debug within Tauri apps via screenshot capture, window management, DOM access, and simulated user inputs.
# Add to your Claude Code skills
git clone https://github.com/P3GLEG/tauri-plugin-mcpGuides for using ai agents skills like tauri-plugin-mcp.
tauri-plugin-mcp is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by P3GLEG. Allows AI agents (e.g., Cursor, Claude Code) to debug within Tauri apps via screenshot capture, window management, DOM access, and simulated user inputs. It has 101 GitHub stars.
tauri-plugin-mcp's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/P3GLEG/tauri-plugin-mcp" and add it to your Claude Code skills directory (see the Installation section above).
tauri-plugin-mcp is primarily written in Rust. It is open-source under P3GLEG on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh tauri-plugin-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
A Tauri plugin and MCP server that allow AI agents such as Cursor and Claude Code to interact with and debug your Tauri application through screenshots, DOM access, input simulation, and more.
npm install tauri-plugin-mcp
npm install -g tauri-plugin-mcp-server
# or run directly
npx tauri-plugin-mcp-server
Coming soon to crates.io. For now, use a git dependency:
[dependencies]
tauri-plugin-mcp = { git = "https://github.com/P3GLEG/tauri-plugin-mcp" }
The MCP server exposes 10 high-level tools to AI agents:
| Tool | Description |
|---|---|
| take_screenshot | Captures a screenshot of an application window. Saves full image to disk with small thumbnail inline (optimized for token efficiency). |
| query_page | Inspects the current page. Modes: map (structured element refs), html (raw DOM), state (URL/title/scroll/viewport), find_element (CSS pixel coordinates for clicking), app_info (app metadata, windows, monitors). |
| click | Clicks at x/y coordinates or via selector (ref, id, class, tag, text). Selector-based clicks auto-resolve element position. |
| type_text | Types text into the page. Supports a fields array for bulk form fill, selector targeting, or typing into the focused element. Works with inputs, textareas, contentEditable, React, Lexical, and Slate. |
| mouse_action | Non-click mouse actions: hover, scroll (by direction/amount/to element/to top/bottom), drag (start to end coordinates). |
| navigate | Webview navigation: goto (URL), back/forward (with optional delta), reload. |
| execute_js | Runs arbitrary JavaScript in the webview. Returns the result of the last statement or promise. |
| manage_storage | localStorage operations (get/set/remove/clear/keys) and cookie management (get/clear). |
| manage_window | Window control (list/focus/minimize/maximize/close/position/size/fullscreen), zoom, devtools, and webview state management. |
| wait_for | Waits for a condition: text appearing/disappearing, element visible/hidden/attached/detached. Useful after async content loads. |
Only include the MCP plugin in development builds:
#[cfg(debug_assertions)]
{
builder = builder.plugin(tauri_plugin_mcp::init_with_config(
tauri_plugin_mcp::PluginConfig::new("APPLICATION_NAME".to_string())
.start_socket_server(true)
// IPC socket (default — recommended)
.socket_path("/tmp/tauri-mcp.sock")
// Or TCP socket
// .tcp_localhost(4000)
// For multi-webview apps where the webview label differs from the window label
// .default_webview_label("preview".to_string())
// Optional auth token for TCP connections
// .auth_token("my-secret-token".to_string())
));
}
{
"mcpServers": {
"tauri-mcp": {
"command": "npx",
"args": ["tauri-plugin-mcp-server"]
}
}
}
With a custom socket path:
{
"mcpServers": {
"tauri-mcp": {
"command": "npx",
"args": ["tauri-plugin-mcp-server"],
"env": {
"TAURI_MCP_IPC_PATH": "/custom/path/to/socket"
}
}
}
}
For Docker, remote debugging, or when IPC doesn't work:
{
"mcpServers": {
"tauri-mcp": {
"command": "npx",
"args": ["tauri-plugin-mcp-server"],
"env": {
"TAURI_MCP_CONNECTION_TYPE": "tcp",
"TAURI_MCP_TCP_HOST": "127.0.0.1",
"TAURI_MCP_TCP_PORT": "4000"
}
}
}
}
Make sure your Tauri app uses the same connection mode:
.plugin(tauri_plugin_mcp::init_with_config(
tauri_plugin_mcp::PluginConfig::new("MyApp".to_string())
.tcp_localhost(4000)
))
pnpm install
pnpm run build # JS guest bindings
cargo build --release # Rust plugin
# MCP server
cd mcp-server-ts
pnpm install && pnpm build
AI Agent (Claude, Cursor, etc.)
↕ MCP protocol (stdio)
MCP Server (tauri-plugin-mcp-server)
↕ IPC socket or TCP
Tauri Plugin (Rust)
↕ Tauri events with correlation IDs
Guest JS (webview)
↕ DOM APIs
Your Application
src/) — Async socket server, command routing, native input injection (macOS), screenshot captureguest-js/) — DOM interaction, element resolution, form filling, event handlingmcp-server-ts/) — Translates MCP tool calls into socket commands0o600 permissions, deleted on shutdownNSEvent injection — no Accessibility permissions neededisTrusted=false, ~80% coverage)xcap"Connection refused" — Ensure your Tauri app is running and the socket server started. Check that both sides use the same connection mode (IPC or TCP).
"Socket file not found" (IPC) — Check that the socket path exists (look in /tmp on macOS/Linux). Try TCP mode as an alternative.
"Permission denied" — On Unix, check file permissions for the socket. TCP mode avoids file permission issues.
Testing your setup:
npx @modelcontextprotocol/inspector npx tauri-plugin-mcp-server
MIT