使用 MCP Apps 和 MCP-UI
基于 MCP Apps 或 MCP-UI 构建的扩展,可以让 goose Desktop 提供更可交互、参与感更强的用户体验。你不再只是阅读纯文本回复、手动输入提示词,而是可以直接点击和操作图形界面。
MCP Apps 现在已经是交互式 UI 的官方 MCP 规范。MCP-UI 扩展在 goose 中仍然可用,但如果你要开发新扩展,推荐直接使用 MCP Apps。
本页介绍的功能仍属实验特性,正在持续开发中。后续版本中行为和支持范围可能会变化。
MCP Apps
MCP Apps 通过官方的 MCP Apps 规范 为 goose 带来交互式界面。根据扩展实现方式,应用可以在独立沙箱窗口中启动,也可以直接嵌入聊天窗口。
在独立窗口中启动 App
有些 MCP Apps 可以单独弹出窗口,这样你不用先给 goose 发消息,就能直接进入界面。
- 点击左上角的 按钮打开侧边栏
- 点击侧边栏里的
Apps - 浏览当前可用的 MCP Apps
- 点击
Launch在新窗口中打开对应应用
如果你想在侧边栏里看到 Apps 页面,需要先在 Extensions 页面启用 Apps 扩展。你也可以用它来创建自己的独立 App。
Apps 页面会展示三类内容:通过 Apps 扩展创建的自定义 HTML 应用、导入的 HTML 应用,以及已启用 MCP Apps 扩展中提供的应用。你可以在这些应用里点击按钮、填写表单、触发其它控件操作。只要通过 CORS 放行,它们就可以通过 MCP 调用工具和读取资源,但不能直接和 goose 本体对话。
导入 HTML App
你也可以导入别人通过 Apps 扩展生成并分享给你的应用:
- 点击左上角的 按钮打开侧边栏
- 点击
Apps - 点击
Import App,选择本地.html文件,然后点击Open
在聊天窗口中使用 Apps
有些 MCP Apps 会在 goose 调用返回 UI 的工具时,直接内嵌到当前对话中。这样你就能在聊天流里完成选择、填写表单或触发操作,而不用离开当前会话。
如果不确定某个 UI 是否支持在聊天窗口内加载,直接问 goose 即可。
MCP-UI
MCP-UI 是更早期的一套交互式 UI 规范,主要把内容嵌入聊天窗口中。虽然现在更推荐 MCP Apps,但 MCP-UI 扩展在 goose 中仍然可以正常工作。
试用一下
你可以亲自体验 goose 中的交互式回复。本练习会添加一个扩展,连接到 Andrew Harvard 提供的 MCP-UI Demos。
- goose Desktop
- goose CLI
- Launch the installer
- Click
Yesto confirm the installation - Click the button in the top-left to open the sidebar
- Navigate to the chat
- Run the
configurecommand:
goose configure
- Choose to add a
Remote Extension (Streamable HTTP).
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ○ Command-line Extension
│ ● Remote Extension (Streamable HTTP) (Connect to a remote extension via MCP Streamable HTTP)
└
- Give your extension a name.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◆ What would you like to call this extension?
│ rich_demo
└
- Enter the Streamable HTTP endpoint URI.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ rich_demo
│
◆ What is the Streamable HTTP endpoint URI?
│ https://mcp-aharvard.netlify.app/mcp
└
- Enter the number of seconds goose should wait for actions to complete before timing out. Default is
300seconds.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ rich_demo
│
◇ What is the Streamable HTTP endpoint URI?
│ https://mcp-aharvard.netlify.app/mcp
│
◆ Please set the timeout for this tool (in secs):
│ 300
└
- Enter a description for this extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ rich_demo
│
◇ What is the Streamable HTTP endpoint URI?
│ https://mcp-aharvard.netlify.app/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◆ Enter a description for this extension:
│ Demo interactive extension
└
- Choose
Nowhen asked to add custom headers.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ rich_demo
│
◇ What is the Streamable HTTP endpoint URI?
│ https://mcp-aharvard.netlify.app/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Enter a description for this extension:
│ Demo interactive extension
│
◆ Would you like to add custom headers?
│ No
│
└ Added rich_demo extension
在 goose Desktop 中,你可以试着问:
Help me select seats for my flight
这时你看到的就不只是纯文本,而会是一个可交互的界面,例如:
- 可视化座位图,显示可选和已占座位
- 可实时点击选择
- 包含航班细节的预订确认界面
你也可以继续试这些 demo:
Plan my next trip based on my moodWhat's the weather in Philadelphia?
给扩展开发者
如果你想为自己的扩展加入交互能力,可以参考: