Tauri Hasgard MCP Server
Inspect and drive a running Tauri app's native webviews: snapshot, click, type, screenshot.
Tauri Hasgard scores 70 (Good), licensed Apache-2.0 and written in Rust. It installs as a local process. It does not declare tools yet. Filed under Uncategorized. GitHub shows 3 stars. Package registries report about 262 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
70 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: apache-2.0.
License, quality and maintenance
Quality: Grade C
60/100 for listing completeness. Lost points: no listed tools, short summary, no docs link.
How quality is graded
Where the 70 comes from
22 + 20 + 7 + 10 + 4 + 7 = 70. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 7 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "nyssance-tauri-hasgard": { "command": "npx", "args": [ "-y", "tauri-hasgard@0.8.4" ], "env": { "TAURI_HASGARD_SOCKET": "", "TAURI_HASGARD_WINDOW": "", "TAURI_HASGARD_MCP_ENABLE_DANGEROUS_TOOLS": "" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
TAURI_HASGARD_SOCKET | Optional | Endpoint of the application to drive. Unset, the running application is discovered. |
TAURI_HASGARD_WINDOW | Optional | Window label used by tool calls that name none. |
TAURI_HASGARD_MCP_ENABLE_DANGEROUS_TOOLS | Optional | Set to true to expose the eval, ipc and drop tools, which run code or commands in the app. |
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
Tauri Hasgard
Hasgard is the automation bridge for Tauri 3. It connects to one running Tauri application and drives its real native webviews through a shared JSON-RPC protocol.
Use the same running app from:
- CLI — inspect windows, take accessibility snapshots, click, fill, press keys, capture screenshots and call IPC.
- MCP — give Claude Code, Codex or another MCP client the same tools.
- Playwright — write E2E tests with Playwright's test runner and assertions.
Hasgard does not launch a browser, emulate a Tauri webview or provide a fake Page. The app must be running and the plugin must be registered in it.
Quick start
1. Register the plugin
From your Tauri project's src-tauri directory:
cargo add tauri-plugin-hasgard tauri-runtime-wry@3.0.0-alpha.6
Register the plugin and the Wry runtime in your builder:
tauri::Builder::default()
.runtime(tauri_runtime_wry::Wry::default())
.plugin(tauri_plugin_hasgard::init())
.run(tauri::generate_context!())
.expect("failed to run Tauri application");
Grant the permission to every window you intend to automate. In src-tauri/capabilities/default.json:
{
"windows": ["*"],
"permissions": ["hasgard:default"]
}
Registering the plugin enables automation in every build, including release builds. If production builds must not expose it, conditionally add the .plugin(...) call in your application.
Start the app and leave it running. Hasgard attaches to an existing process:
bun run tauri dev
2. Check the connection
Install the CLI with any one of these methods:
npm install -g tauri-hasgard
# or: brew install nyssance/tap/tauri-hasgard
# or: scoop bucket add nyssance https://github.com/nyssance/scoop-bucket
# scoop install nyssance/tauri-hasgard
# or: cargo install tauri-hasgard-cli
Then inspect the running app:
$ tauri-hasgard ping
✓ Connected. Plugin and CLI both 0.8.4.
$ tauri-hasgard windows
main tauri://localhost My application
$ tauri-hasgard --window main snapshot -i
- textbox "Display name" [ref=e1]
- button "Save" [ref=e2]
The windows command gives you the label for --window. Snapshot refs are short-lived: take a new snapshot after the UI changes.
3. Drive the UI
tauri-hasgard --window main click '@e2'
tauri-hasgard --window main fill 'input[name=email]' 'me@example.com'
tauri-hasgard --window main press Enter
tauri-hasgard --window main wait '#saved'
tauri-hasgard --window main screenshot screen.png
Targets can be a ref from the latest snapshot or a CSS selector. Add --json for machine-readable output; run tauri-hasgard --help for the complete command list.
Connect an AI client
With the app running, register the MCP server in one command:
claude mcp add tauri-hasgard -- npx -y tauri-hasgard mcp
codex mcp add tauri-hasgard -- npx -y tauri-hasgard mcp
Check the connection with claude mcp list or codex mcp list, then ask the client to list the application's windows. The MCP server and CLI use the same plugin endpoint and the same tool semantics.
For an app that hosts its own agent, Hasgard also exposes an in-process MCP server. See the MCP guide.
Write Playwright tests
Requires Node.js 24 or newer.
Install the test fixture:
bun add --dev @nyssance/tauri-hasgard @playwright/test
The fixture launches or attaches to your app, then exposes HasgardApplication and HasgardWindow objects:
test("opens settings", async ({ hasgard, window }) => {
await window.getByRole("button", { name: "Settings", exact: true }).click()
const settings = await hasgard.waitForWindow("settings", 5_000)
await expect(settings.getByRole("heading", { name: "Settings" })).toBeVisible()
})
See the Playwright guide for fixture setup, lifecycle cleanup, locators and keyboard behavior. Tests run against real native windows; there is no mocked browser mode and no page fixture.
Supported platforms
| Component | Support |
|---|---|
| Tauri | 3.0.0-alpha.6 |
| Webview | Wry; CEF is opt-in |
| CLI binaries | macOS Apple Silicon, Windows x64, Linux x64 |
The CEF setup and its operation limits are documented in docs/cef.md.
Documentation
- CLI and MCP walkthrough
- MCP guide
- Playwright guide
- Protocol reference
- Architecture
- Troubleshooting
- Contributing
License
Apache-2.0. Upstream MIT notices are preserved in LICENSE and NOTICE.md.
Frequently asked questions
What is Tauri Hasgard MCP Server?
Inspect and drive a running Tauri app's native webviews: snapshot, click, type, screenshot.
How do I install Tauri Hasgard MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Tauri Hasgard MCP Server runs locally from the npm package tauri-hasgard with the command npx -y tauri-hasgard@0.8.4.
Is Tauri Hasgard MCP Server free and open source?
Yes. Tauri Hasgard MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Tauri Hasgard MCP Server support remote (HTTP) connections?
No remote endpoint is listed for Tauri Hasgard MCP Server. It runs locally on your machine over stdio, started by your MCP client.
How is Tauri Hasgard MCP Server's trust score calculated?
Tauri Hasgard MCP Server scores 70 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.