AI Integration (MCP)
前提说明
目前 Cursor 等智能编辑器功能的日渐强大,我们推出了一个功能强大的 MCP Server:Tencent RTC MCP Server,希望可以通过 Cursor + MCP 的方式来帮助开发者快速接入 TUICallKit 产品。
效果演示
1. 以 Flutter 工程接入为例,在 Chat 区域输入对应提示词后,执行 Tencent RTC MCP Server 的方法:
使用配置
要使用 MCP 服务器,Cursor 必须处于代理模式(AGENT MODE),Cursor IDE 通过 JSON 配置文件发现 MCP 服务器。可全局或按项目配置腾讯云 MCP 服务器。
安装
npx -y @tencent-rtc/mcp
项目级别配置
在项目目录中,创建
.cursor/mcp.json
文件。{"mcpServers": {"tencent-rtc": {"command": "npx","args": ["-y", "@tencent-rtc/mcp"]}}}
当您保存该文件时,会弹出下图的提示,选择 Enable。

可用性检查
在配置完成后,您可以在设置页面查看到对应的 MCP 配置,如果是绿色状态表示该 MCP Server 成功配置;

使用示例
打开 Cursor 的 Chat,通过提示词让
@tencentcloud/sdk-mcp
为您创建 TUICallKit 示例工程,推荐提示词:1. Please use tuicallkit to help me create an audio and video call project based on the Vue framework.2. Please add a click event to the "xxx" button, and use tuicallkit to initiate an audio and video call when it is clicked.3. Please integrate the tuicallkit component into this Android project.4. Please provide an example of how to use the TUICallKit.calls interface on the Flutter platform.