Skip to content
MCP server

Tauri Hasgard

MCP server that lets AI clients inspect and drive a running Tauri desktop app's webviews

Runs locally

Tauri Hasgard is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
macOS, Windows, Linux
Runs
Locally
Version
0.8.4
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

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

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "tauri-hasgard": {
      "command": "npx",
      "args": [
        "-y",
        "tauri-hasgard"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

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

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

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

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

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

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

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

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

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

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

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • TAURI_HASGARD_SOCKETEndpoint of the application to drive. Unset, the running application is discovered.
  • TAURI_HASGARD_WINDOWWindow label used by tool calls that name none.
  • TAURI_HASGARD_MCP_ENABLE_DANGEROUS_TOOLSSet to true to expose the eval, ipc and drop tools, which run code or commands in the app.

About Tauri Hasgard

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.

What it does

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

Pricing

Open source

Apache-2.0 licensed; free to use.

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.

How AIPoweredBot checks servers