Skip to main content

Crate victauri_plugin

Crate victauri_plugin 

Source
Expand description

Victauri — full-stack introspection for Tauri apps via an embedded MCP server.

Add this plugin to your Tauri app for AI-agent-driven testing and debugging: DOM snapshots, IPC tracing, cross-boundary verification, and more tools — all accessible over the Model Context Protocol.

§Quick Start

tauri::Builder::default()
    .plugin(victauri_plugin::init())
    .run(tauri::generate_context!())
    .unwrap();

In debug builds this starts an MCP server on port 7373. In release builds the plugin is a no-op with zero overhead.

§Configuration

Authentication is enabled by default with an auto-generated token (printed to logs). Use .auth_disabled() to opt out, or .auth_token("...") to set a specific token.

tauri::Builder::default()
    .plugin(
        victauri_plugin::VictauriBuilder::new()
            .port(8080)
            .strict_privacy_mode()
            .build(),
    )
    .run(tauri::generate_context!())
    .unwrap();

Re-exports§

pub use error::BuilderError;
pub use privacy::PrivacyProfile;

Modules§

auth
Bearer-token authentication, rate limiting, and security middlewares.
bridge
Runtime-erased webview bridge trait and its Tauri implementation.
error
Typed error enums for the victauri-plugin crate.
js_bridge
JS bridge script generation for webview injection.
mcp
MCP server, tool handler, and parameter types.
privacy
Privacy controls: command allowlists, blocklists, and tool disabling.
redaction
Output redaction for API keys, tokens, emails, and sensitive JSON keys.

Macros§

register_commands
Register command schemas with the Victauri plugin at app setup time.

Structs§

CommandInfo
Metadata for a registered Tauri command, including intent and schema information.
VictauriBuilder
Builder for configuring the Victauri plugin before adding it to a Tauri app.
VictauriState
Runtime state shared between the MCP server and all tool handlers.

Functions§

init
Initialize the Victauri plugin with default settings (port 7373 or VICTAURI_PORT env var).
init_auto_discover
Initialize the Victauri plugin with auto-discovery of all #[inspectable] commands.

Type Aliases§

PendingCallbacks
Map of pending JavaScript eval callbacks, keyed by request ID. Each entry holds a oneshot sender that resolves when the webview returns a result.

Attribute Macros§

inspectable
Marks a #[tauri::command] as inspectable by Victauri.