工具调用实战示例
mcp-ui通过natural language instruction即可触发工具调用,操作极为直观:
- Browser Automation::
- 在聊天框输入指令,如“打开谷歌搜索xAI”。
- AI会调用内置的浏览器工具自动执行操作,返回结果。
- Weather Enquiry::
- 输入“今天北京天气如何”或“上海天气预报”。
- 系统会通过集成的天气服务API返回实时数据,以Markdown格式展示。
caveat:需确保MCP后端服务(npm run mcp:server
)正常运行,且已正确配置API密钥。桌面版用户还可结合文件操作指令(如“读取notes.txt”)实现更复杂的本地交互。
This answer comes from the articlemcp-ui: a clean AI chat interface based on the MCP protocolThe