docs.rs failed to build tauri-mcp-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
tauri-mcp-0.1.4
Tauri MCP Server
A Model Context Protocol (MCP) server for testing and interacting with Tauri v2 applications. This tool enables AI assistants to better understand, debug, and interact with Tauri apps during development.
Features
Core Tools
-
Process Management
launch_app- Launch Tauri applications with argumentsstop_app- Gracefully stop running appsget_app_logs- Capture stdout/stderr outputmonitor_resources- Track CPU, memory, and disk usage
-
Window Manipulation
take_screenshot- Capture app window screenshotsget_window_info- Get window dimensions, position, and state
-
Input Simulation
send_keyboard_input- Simulate keyboard inputsend_mouse_click- Simulate mouse clicks- Mouse movement, dragging, and scrolling support
-
Debugging Tools
execute_js- Execute JavaScript in the webviewget_devtools_info- Get DevTools connection info- WebDriver integration for advanced testing
- Console log capture
-
IPC Interaction
list_ipc_handlers- List registered Tauri commandscall_ipc_command- Call Tauri IPC commands- Event emission and listening
Installation
From Source
# Clone the repository
# Build and install
Using Cargo
Usage
As a Standalone Server
# Start the MCP server
# With custom host and port
# With a specific Tauri app
Configuration
Create a tauri-mcp.toml file for configuration:
= true
= true
= false
= false
= false
Environment Variables
TAURI_MCP_LOG_LEVEL- Set log level (trace, debug, info, warn, error)TAURI_MCP_CONFIG- Path to config file (default: tauri-mcp.toml)
MCP Integration
Claude Desktop Configuration
Add to your Claude Desktop configuration:
Available MCP Tools
All tools are exposed through the MCP protocol and can be called by AI assistants:
// Launch a Tauri app
await ;
// Take a screenshot
await ;
// Execute JavaScript
await ;
// Send keyboard input
await ;
Platform Support
- macOS - Full support including window management
- Windows - Full support with native window APIs
- Linux - X11 support (Wayland in progress)
Development
Building
# Debug build
# Release build
# Run tests
Project Structure
tauri-mcp/
├── src/
│ ├── main.rs # Entry point
│ ├── server.rs # MCP server implementation
│ ├── tools/ # Tool implementations
│ │ ├── process.rs # Process management
│ │ ├── window.rs # Window manipulation
│ │ ├── input.rs # Input simulation
│ │ ├── debug.rs # Debugging tools
│ │ └── ipc.rs # IPC interaction
│ └── utils/ # Utility modules
├── examples/ # Example Tauri apps
└── tests/ # Integration tests
Examples
Testing a Tauri App
# Launch the server
# In your AI assistant:
# 1. Launch the app
# 2. Take a screenshot
# 3. Send some input
# 4. Check the logs
# 5. Stop the app
Automated Testing Script
=
# Launch app
= await
=
# Wait for app to start
await
# Take screenshot
await
# Send input
await
# Get logs
= await
# Stop app
await
Troubleshooting
Common Issues
-
Permission Denied on macOS
- Grant accessibility permissions in System Preferences
- Required for input simulation
-
Screenshot Fails
- Ensure screen recording permissions are granted
- Check if the app window is visible
-
WebDriver Connection Failed
- Ensure the Tauri app has DevTools enabled
- Check if ChromeDriver is installed for WebDriver support
Debug Mode
Enable debug logging:
TAURI_MCP_LOG_LEVEL=debug
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with the MCP SDK
- Designed for Tauri v2 applications
- Input simulation powered by enigo
- Screenshot functionality via screenshots-rs