为 Flutter IMKit 配置融云 Console MCP Server
仅在需要通过 AI 编程工具查询或管理融云控制台配置时使用本页。Console MCP Server 是可选工具,不是使用 rongcloud-im Skill 集成 Flutter IMKit 的前提条件。
融云 Console MCP Server 允许 AI 编程工具查询和管理融云控制台配置。如需 SDK 集成指导,请另外安装 rongcloud-im Skill;两者可以配合使用,但彼此独立。
MCP Server 地址:
https://console.rongcloud.cn/mcp/v1/endpoint
前提条件
- 已注册融云开发者账号并创建应用。
- 使用支持远程 HTTP MCP Server 的 AI 编程工具,例如 Cursor、Claude Code 或 Codex。
获取 Access Key
在融云控制台创建 Access Key,具体步骤请参见获取 Access Key。创建后,将 Access Key 保存在本地密钥管理工具或 AI 编程工具使用的环境变量中。
Access Key 属于敏感凭据。不要将其提交到代码仓库、写入客户端代码、粘贴到公开对话,或包含在截图中。不要向 AI 编程工具提供 App Secret。
MCP Server 使用远程 HTTP 传输,并通过以下请求头认证:
Authorization: <ACCESS_KEY>
配置 MCP Server
Cursor
创建或更新项目中的 .cursor/mcp.json:
{
"mcpServers": {
"rongcloud-console": {
"url": "https://console.rongcloud.cn/mcp/v1/endpoint",
"type": "http",
"headers": {
"Authorization": "YOUR_RONGCLOUD_MCP_ACCESS_KEY"
}
}
}
}
将占位符替换为 Access Key 后,重启 Cursor,并确认 rongcloud-console MCP Server 已启用。不要提交包含真实 Access Key 的 .cursor/mcp.json。
Claude Code
先通过环境变量保存 Access Key:
export RONGCLOUD_MCP_ACCESS_KEY="YOUR_RONGCLOUD_MCP_ACCESS_KEY"
添加远程 HTTP MCP Server:
claude mcp add --transport http \
rongcloud-console \
https://console.rongcloud.cn/mcp/v1/endpoint \
--header "Authorization: ${RONGCLOUD_MCP_ACCESS_KEY}"
验证配置:
claude mcp list
Codex
先通过环境变量保存 Access Key:
export RONGCLOUD_MCP_ACCESS_KEY="YOUR_RONGCLOUD_MCP_ACCESS_KEY"
添加远程 HTTP MCP Server:
codex mcp add rongcloud-console \
--url https://console.rongcloud.cn/mcp/v1/endpoint \
--bearer-token-env-var RONGCLOUD_MCP_ACCESS_KEY
验证配置:
codex mcp list
--bearer-token-env-var 可能会将凭据作为 Bearer Token 发送。如果连接时认证失败,请改用支持显式请求头的 MCP JSON 配置,并按 Authorization: <ACCESS_KEY> 传递原始 Access Key。
可用工具
Console MCP Server 提供以下工具:
| 类别 | 工具 |
|---|---|
| 用户 | issue_access_token、get_default_profile_visibility、set_default_profile_visibility |
| 消息 | get_message_synchronization、set_message_synchronization、get_offline_message_retention、set_offline_message_retention |
| 群组 | get_group_non_member_history_access、set_group_non_member_history_access、get_group_pre_join_history_access、set_group_pre_join_history_access、get_group_management_via_chat_sdk、set_group_management_via_chat_sdk |
| 好友 | get_restrict_direct_messaging_to_friends、set_restrict_direct_messaging_to_friends、get_friend_request_preference、set_friend_request_preference、get_profile_update_auto_messaging、set_profile_update_auto_messaging、get_presence_update_auto_messaging、set_presence_update_auto_messaging |
| 推送 | get_mobile_push_when_web_pc_online、set_mobile_push_when_web_pc_online、get_push_notification_language、set_push_notification_language |
| 聊天室 | get_open_channel_join_message_type_filter、set_open_channel_join_message_type_filter、get_open_channel_multiple_participation、set_open_channel_multiple_participation、get_open_channel_logout_sync、set_open_channel_logout_sync、get_open_channel_participant_event_auto_messaging、set_open_channel_participant_event_auto_messaging、get_open_channel_joined_participant_messaging、set_open_channel_joined_participant_messaging |
| 超级群 | get_community_pre_join_history_access、set_community_pre_join_history_access、get_community_push_notification_frequency、set_community_push_notification_frequency、get_community_message_access_restriction、set_community_message_access_restriction |
以 get_ 开头的工具用于查询当前配置,以 set_ 开头的工具会修改控制台配置。调用设置类工具前,请确认目标应用、当前值、期望值和变更影响。
部分配置可能延迟生效;超级群相关能力还可能受套餐或功能开通状态限制。
验证 MCP 连接
在 AI 编程工具中发送以下请求:
调用 `rongcloud-console` MCP Server,查询当前应用的消息同步配置。
不要修改任何控制台设置。
预期结果:AI 通过 MCP 查询配置;在没有明确授权时,不调用任何 set_ 工具。
故障排查
如果工具列表未加载或请求返回认证错误,请依次检查:
- MCP Server 地址是否为
https://console.rongcloud.cn/mcp/v1/endpoint。 Authorization请求头和 Access Key 是否正确。- 修改配置后是否已重启 AI 编程工具。
后续步骤
配置并验证 MCP 连接后,可返回使用 Skill继续集成。