# Tauri Hasgard

> Tauri Hasgard is an open-source MCP server for developer tools. MCP server that lets AI clients inspect and drive a running Tauri desktop app's webviews. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** macOS, Windows, Linux, CLI, API, Self-hosted
- **Repository:** https://github.com/nyssance/tauri-hasgard
- **MCP Registry name:** io.github.nyssance/tauri-hasgard
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-20

## About

The README says Hasgard exposes the native webviews of a running Tauri 3 app to outside clients, so a model, a terminal or a Playwright test can read the UI and act on it the way a user would. The MCP server, published on npm as tauri-hasgard, wraps the same plugin that the CLI and Playwright package use, so one registered plugin inside the app serves all three.

The MCP tools cover taking an accessibility-style snapshot of interactive elements with refs, clicking, typing, pressing keys, taking screenshots and reading logs. Targets can be a snapshot ref or a CSS selector. Three tools that run code or commands inside the app (eval, ipc and drop) are hidden unless the TAURI_HASGARD_MCP_ENABLE_DANGEROUS_TOOLS variable is set to true.

It suits developers who build Tauri desktop apps and want an AI coding client such as Claude Code or Codex to test or debug the interface. Setup requires adding the plugin to the Rust project and granting the hasgard:default permission in a capability file.

## Features

- **Interactive element snapshots:** Lists buttons, text boxes and other interactive elements with refs that later commands can target.
- **Click and type actions:** Clicks elements, fills fields by CSS selector and sends key presses to a chosen window.
- **Screenshots and logs:** Captures a window screenshot and reads the app's logs for the selected window.
- **Window targeting:** Lists window labels and lets tool calls name a window, with a default set by environment variable.
- **Gated dangerous tools:** Eval, ipc and drop tools that run code or commands stay off unless explicitly enabled.
- **Shared plugin for CLI and tests:** The same in-app plugin also powers the command-line tool and the Playwright package.

## Good for

- Letting Claude Code or Codex check that a Tauri app's UI renders and responds correctly
- Debugging a running desktop app by inspecting its elements and logs from an AI client
- Capturing screenshots of specific Tauri windows during development
- Driving a Tauri app's interface from scripts or terminal commands alongside the MCP server

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add tauri-hasgard -- npx -y tauri-hasgard
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add tauri-hasgard -- npx -y tauri-hasgard
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.tauri-hasgard]
command = "npx"
args = ["-y", "tauri-hasgard"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user tauri-hasgard npx -- -y tauri-hasgard

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
```

## FAQ

### How do I connect Tauri Hasgard to Claude Code?

The README gives the command: claude mcp add tauri-hasgard -- npx -y tauri-hasgard mcp, run while the app is running.

### Are the dangerous tools enabled by default?

No. The eval, ipc and drop tools are exposed only when TAURI_HASGARD_MCP_ENABLE_DANGEROUS_TOOLS is set to true.

### Which platforms are supported?

The README lists macOS Apple Silicon, Windows x64 and Linux x64 for desktop, and Tauri 3 as the supported version.

### Does the plugin stay active in release builds?

The README says it is active in every build that registers it, including release builds, so developers must gate the plugin call themselves if needed.

### Is Tauri Hasgard free?

Yes. Tauri Hasgard is open source, so you can use and self-host it for free.

### How do I add Tauri Hasgard to Claude Code?

Run this command in your terminal: claude mcp add tauri-hasgard -- npx -y tauri-hasgard

### What are the best alternatives to Tauri Hasgard?

The closest alternatives to Tauri Hasgard are MCP Server Tauri, Victauri, Coding Tools MCP, taria and Playwright MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [MCP Server Tauri](https://ai-powered.com/mcp/mcp-server-tauri-2): MCP Server Tauri is an open-source MCP server for developer tools.
- [Victauri](https://ai-powered.com/mcp/victauri): Victauri is an MCP server for developer tools.
- [Coding Tools MCP](https://ai-powered.com/mcp/coding-tools-mcp): Coding Tools MCP is an open-source MCP server for developer tools.
- [taria](https://ai-powered.com/mcp/taria): taria is an open-source MCP server for developer tools.
- [Playwright MCP](https://ai-powered.com/mcp/playwright-mcp): Playwright MCP is an open-source MCP server for browser automation.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [McpMux](https://ai-powered.com/mcp/mcpmux): McpMux is an open-source MCP server for developer tools.
- [Terminal MCP Server](https://ai-powered.com/mcp/terminal-mcp-server): Terminal MCP Server is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/tauri-hasgard
