tauri-plugin-mcp
by P3GLEG·★ 96·综合分 48
Tauri插件使AI代理能够通过截图、DOM访问和输入模拟来调试应用程序。
概述
Tauri-plugin-mcp 是一个全面的解决方案,通过模型上下文协议将 Cursor 和 Claude Code 等 AI 代理与 Tauri 应用程序连接起来。它提供了 10 个强大的工具,包括截图捕获、DOM 检查、输入模拟、窗口管理和 JavaScript 执行,使 AI 能够实时与 Tauri 应用程序交互和调试。该插件支持 IPC 和 TCP 连接,并具有适当的身份验证和安全措施。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要专门针对 Tauri 应用的 AI 驱动调试和交互时选择此插件,尤其是在开发工作流中。
什么时候不要选它
如果您不使用 Tauri,或者需要超出 Tauri 提供范围的跨桌面调试功能,请不要选择此插件。
此 server 暴露的工具
从 README 抽取出 10 个工具take_screenshotCaptures a screenshot of an application window.
query_pageInspects the current page with various modes.
clickClicks at x/y coordinates or via selector.
type_textTypes text into the page with various targeting options.
mouse_actionPerforms non-click mouse actions like hover, scroll, or drag.
navigateControls webview navigation to different URLs.
execute_jsRuns arbitrary JavaScript in the webview.
manage_storageHandles localStorage and cookie operations.
manage_windowControls window state, size, and zoom level.
wait_forWaits for a condition like text or element visibility.
可对比工具
安装
安装
- **安装 Tauri 插件**:
npm install tauri-plugin-mcp- **在您的 Tauri 应用程序中注册插件**:
#[cfg(debug_assertions)]
{
builder = builder.plugin(tauri_plugin_mcp::init_with_config(
tauri_plugin_mcp::PluginConfig::new("APPLICATION_NAME".to_string())
.start_socket_server(true)
.socket_path("/tmp/tauri-mcp.sock")
));
}- **配置您的 AI 代理**(例如,Claude Desktop):
{
"mcpServers": {
"tauri-mcp": {
"command": "npx",
"args": ["tauri-plugin-mcp-server"]
}
}
}FAQ
- 哪些 AI 代理支持这个 MCP 服务器?
- 目前明确支持 Cursor 和 Claude Code。任何实现 MCP 协议的代理都可以连接。
- 支持哪些平台?
- 该插件支持 macOS(原生输入注入)、Windows/Linux(基于 JS 的输入回退),所有三个平台都支持截图功能。
tauri-plugin-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。