跳到主要内容

为 Android IMKit 配置融云 Console MCP Server

仅在需要通过 AI 编程工具查询或管理融云控制台配置时使用本页。Console MCP Server 是可选工具,不是使用 rongcloud-im Skill 集成 Android IMKit 的前提条件。

融云 Console MCP Server 允许 AI 编程工具查询和管理融云控制台配置。如需 SDK 集成指导,请另外安装 rongcloud-im Skill;两者可以配合使用,但彼此独立。

MCP Server 地址

text
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 传输,并通过以下请求头认证:

HTTP
Authorization: <ACCESS_KEY>

配置 MCP Server

Cursor

创建或更新项目中的 .cursor/mcp.json

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:

bash
export RONGCLOUD_MCP_ACCESS_KEY="YOUR_RONGCLOUD_MCP_ACCESS_KEY"

添加远程 HTTP MCP Server:

bash
claude mcp add --transport http \
rongcloud-console \
https://console.rongcloud.cn/mcp/v1/endpoint \
--header "Authorization: ${RONGCLOUD_MCP_ACCESS_KEY}"

验证配置:

bash
claude mcp list

Codex

先通过环境变量保存 Access Key:

bash
export RONGCLOUD_MCP_ACCESS_KEY="YOUR_RONGCLOUD_MCP_ACCESS_KEY"

添加远程 HTTP MCP Server:

bash
codex mcp add rongcloud-console \
--url https://console.rongcloud.cn/mcp/v1/endpoint \
--bearer-token-env-var RONGCLOUD_MCP_ACCESS_KEY

验证配置:

bash
codex mcp list
备注

--bearer-token-env-var 可能会将凭据作为 Bearer Token 发送。如果连接时认证失败,请改用支持显式请求头的 MCP JSON 配置,并按 Authorization: <ACCESS_KEY> 传递原始 Access Key。

可用工具

Console MCP Server 提供以下工具:

类别工具
用户issue_access_tokenget_default_profile_visibilityset_default_profile_visibility
消息get_message_synchronizationset_message_synchronizationget_offline_message_retentionset_offline_message_retention
群组get_group_non_member_history_accessset_group_non_member_history_accessget_group_pre_join_history_accessset_group_pre_join_history_accessget_group_management_via_chat_sdkset_group_management_via_chat_sdk
好友get_restrict_direct_messaging_to_friendsset_restrict_direct_messaging_to_friendsget_friend_request_preferenceset_friend_request_preferenceget_profile_update_auto_messagingset_profile_update_auto_messagingget_presence_update_auto_messagingset_presence_update_auto_messaging
推送get_mobile_push_when_web_pc_onlineset_mobile_push_when_web_pc_onlineget_push_notification_languageset_push_notification_language
聊天室get_open_channel_join_message_type_filterset_open_channel_join_message_type_filterget_open_channel_multiple_participationset_open_channel_multiple_participationget_open_channel_logout_syncset_open_channel_logout_syncget_open_channel_participant_event_auto_messagingset_open_channel_participant_event_auto_messagingget_open_channel_joined_participant_messagingset_open_channel_joined_participant_messaging
超级群get_community_pre_join_history_accessset_community_pre_join_history_accessget_community_push_notification_frequencyset_community_push_notification_frequencyget_community_message_access_restrictionset_community_message_access_restriction

get_ 开头的工具用于查询当前配置,以 set_ 开头的工具会修改控制台配置。调用设置类工具前,请确认目标应用、当前值、期望值和变更影响。

备注

部分配置可能延迟生效;超级群相关能力还可能受套餐或功能开通状态限制。

验证 MCP 连接

在 AI 编程工具中发送以下请求:

text
调用 `rongcloud-console` MCP Server,查询当前应用的消息同步配置。
不要修改任何控制台设置。

预期结果:AI 通过 MCP 查询配置;在没有明确授权时,不调用任何 set_ 工具。

故障排查

如果工具列表未加载或请求返回认证错误,请依次检查:

  • MCP Server 地址是否为 https://console.rongcloud.cn/mcp/v1/endpoint
  • Authorization 请求头和 Access Key 是否正确。
  • 修改配置后是否已重启 AI 编程工具。

后续步骤

配置并验证 MCP 连接后,可返回使用 Skill继续集成。