Skip to content

Getting Started with MCP Server Tauri

This guide will walk you through integrating MCP Server Tauri into your existing Tauri application.

Prerequisites

Before you begin, ensure you have:

  • An existing Tauri 2.x application
  • Node.js 20+ and npm
  • Rust and Cargo
  • An MCP-compatible AI Assistant (Claude Code, Cursor, Windsurf, VS Code, etc.)

Step 1: Configure Your AI Assistant

First, add the MCP server to your AI assistant using install-mcp:

bash
npx -y install-mcp @hypothesi/tauri-mcp-server --client claude-code

Supported clients: claude-code, cursor, windsurf, vscode, cline, roo-cline, claude, zed, goose, warp, codex

Manual Configuration

If you prefer to configure manually, add to your MCP config:

json
{
  "mcpServers": {
    "tauri": {
      "command": "npx",
      "args": ["-y", "@hypothesi/tauri-mcp-server"]
    }
  }
}

Config file locations:

  • Claude Code: Cmd/Ctrl+Shift+P → "MCP: Edit Config"
  • Cursor: Cursor SettingsMCPNew MCP Server
  • VS Code: Add to settings.json under mcp.servers
  • Windsurf: Cascade pane → MCPs icon → settings icon
  • Cline: See Cline MCP configuration guide

Restart your AI assistant after adding the configuration.

Step 2: Configure Your Tauri App

Now add the MCP Bridge plugin to your Tauri app. Pick your path:

Just ask your AI assistant to help set up the MCP Bridge plugin:

"Help me set up the Tauri MCP Bridge plugin"

Your AI will use the tauri_get_setup_instructions tool to get the latest setup steps, then:

  1. Examine your project to see what's already configured
  2. Show you what changes are needed (Cargo.toml, plugin registration, etc.)
  3. Ask for your permission before making any modifications

Safe by design

The AI will always ask before making changes. You stay in control while getting expert guidance tailored to your specific project structure.

Alternative: Use the /setup Slash Command

If your editor supports MCP prompts, you can also type:

/setup

If Neither Works

Some MCP clients don't support prompts or tools with empty schemas yet. If the above methods don't work, copy the setup instructions below and paste them into your AI assistant:

Preview instructions

The copied text contains step-by-step instructions for:

  1. Adding the Rust plugin to Cargo.toml
  2. Registering the plugin in your app's entry point
  3. Enabling withGlobalTauri in tauri.conf.json
  4. Adding plugin permissions to capabilities

🔧 Manual Setup

Prefer to do it yourself? Click here for step-by-step instructions

1. Install the Rust Plugin

From your src-tauri directory:

bash
cargo add tauri-plugin-mcp-bridge

Or manually add to Cargo.toml: tauri-plugin-mcp-bridge = "0.6"

2. Register the Plugin

In your app's entry point (src-tauri/src/lib.rs or src-tauri/src/main.rs):

rust
let mut builder = tauri::Builder::default();
// ... your other plugins and configuration

#[cfg(debug_assertions)]
{
    builder = builder.plugin(tauri_plugin_mcp_bridge::init());
}

builder
    .run(tauri::generate_context!())
    .expect("error while running tauri application");

3. Enable Global Tauri

In src-tauri/tauri.conf.json, add:

json
{
  "app": {
    "withGlobalTauri": true
  }
}

Required

Without withGlobalTauri, the MCP server cannot communicate with your app's webview.

4. Add Plugin Permissions

Add to src-tauri/capabilities/default.json:

json
{
  "permissions": [
    "mcp-bridge:default"
  ]
}

🚀 Start Building!

Run your app and start talking to your AI assistant:

bash
cargo tauri dev

Now try these:

"Take a screenshot of my app"

"Click the submit button"

"Start monitoring IPC calls and show me what's happening"

"Find all the input fields in my app"

"Check the console for any JavaScript errors"

The AI connects to your running app and can see, click, type, and debug—just like a human tester, but faster.

More Slash Commands

CommandWhat it does
/setupConfigure the MCP bridge (you just used this!)
/fix-webview-errorsFind and fix JavaScript errors automatically

See the Prompts documentation for details.

Prompts Not Working?

Some MCP clients don't support slash commands yet. See the manual prompt instructions section above for a workaround.

Next Steps

Troubleshooting

MCP Server Not Loading

If your AI assistant doesn't recognize the Tauri tools:

  1. Verify the MCP configuration is correct
  2. Restart your AI assistant application
  3. Check for error messages in the assistant's logs

Connection Failed

If the AI can't connect to your Tauri app:

  1. Make sure your app is running (cargo tauri dev)
  2. Verify withGlobalTauri is enabled in tauri.conf.json
  3. Check that mcp-bridge:default permission is added
  4. Look for WebSocket errors in your app's console (port 9223)

Need Help?

This is an unofficial community project. Not affiliated with, endorsed by, or associated with the Tauri project or CrabNebula Ltd.