tencent cloud

Chat

Configure MCP server

Download
Focus Mode
Font Size
Last updated: 2026-09-23 15:11:07
MCP delivers AI-powered solutions for Chat knowledge queries and UI integration. By configuring MCP in your AI editor, you can quickly search for Chat documentation and implement feature integrations with speed and accuracy. These features are available across Web, Android, iOS, Flutter platforms.
Note:
Starting with MCP 1.6.0, support now includes queries for Chat components, SDK, server-side APIs, server-side callbacks, product billing, and configuration.

Capability List

Scenario
Capability Description
Example
Query
Query usage for UI components (e.g., ConversationList, MessageList).
“@tencent-rtc How do I render custom message cards in the Vue3 MessageList component?”
Query usage of SDK APIs without UI.
“@tencent-rtc How do I send voice messages using the Web Chat SDK integrated in H5?”
Query meanings of SDK and server-side error codes and recommended handling.
“@tencent-rtc Under what circumstances does the Web Chat SDK return error code 2025 during login?”
Query usage of server-side REST APIs (e.g., account import, server-side message sending).
“@tencent-rtc How do I send custom messages in a group using the REST API?”
Query webhook configuration and third-party webhook integration methods.
“@tencent-rtc What is the request body format for the State.StateChange callback in Chat webhook?”
Query package pricing, feature limits, multi-client login configuration, and intranet proxy.
“@tencent-rtc How do I implement intranet proxy with the Web Chat SDK?”
Query offline push integration methods, vendor configuration, and common considerations.
“@tencent-rtc How do I configure the iOS Push Certificate for offline push?”
Integration
Detects Vue3/React frameworks in context and generates UIKit code.
“@tencent-rtc Help me integrate the full Chat UIKit functionality in a Vue3 project.”
Detects Android/iOS/Flutter platforms in context and generates UIKit code.
“@tencent-rtc Help me integrate the complete Chat UIKit functionality in a Flutter project.”
Troubleshooting
Diagnoses issues encountered during UIKit or SDK integration based on error messages.
“@tencent-rtc After successfully adding the Android app to the project, Chat reports: Fail to create more groups. This sdkappid has reached group amount max limit.”

Preparing Account and Credentials

Create an application in the TRTC Console and obtain the following credentials. (If you haven't created an application yet, you can proceed without configuring SDKAppID):
Credential
Purpose
Where to Obtain
SDKAppID
MCP environment variable, required for basic queries.
SecretKey
MCP environment variable, required for MCP to generate test userSig.

Configuring MCP

Configuration Methods

Configure MCP in your AI editor (Cursor / Codex / Claude Code CLI / Claude Desktop / CodeBuddy / Trae, etc.).
Cursor
Codex
Claude Code CLI
Claude Desktop
CodeBuddy
Trae
Go to Settings > Select Tools & MCP > Add Custom MCP > Open the mcp.json file and configure the following:
{
"mcpServers": {
"tencent-rtc": {
"command": "npx",
"args": ["-y", "@tencent-rtc/mcp@latest"],
"env": {
"SDKAPPID": "YOUR_SDKAPPID",
"SECRETKEY": "YOUR_SECRET_KEY"
}
}
}
}
1. Run the following command to configure MCP, replacing SDKAPPID and SECRETKEY with your actual application information.
codex mcp add tencent-rtc \\
--env SDKAPPID=YOUR_SDK_APP_ID --env SECRETKEY=YOUR_SECRET_KEY \\
-- npx -y @tencent-rtc/mcp@latest
For project-level configuration, add --scope project to write to the .mcp.json file in your project root directory.
2. Run codex mcp list to verify MCP configuration. If tencent-rtc appears in the list, configuration is successful.
1. Run the following command to configure MCP, replacing SDKAPPID and SECRETKEY with your actual application information.
claude mcp add tencent-rtc \\
--env SDKAPPID=YOUR_SDK_APP_ID --env SECRETKEY=YOUR_SECRET_KEY \\
-- npx -y @tencent-rtc/mcp@latest
For project-level configuration, add --scope project to write to the .mcp.json file in your project root directory.
2. Run claude mcp list to verify MCP configuration. If tencent-rtc appears in the list, configuration is successful.
Go to Settings > select Developer > Edit Config > claude_desktop_config.json, and configure as follows:
{
"mcpServers": {
"tencent-rtc": {
"command": "npx",
"args": ["-y", "@tencent-rtc/mcp@latest"],
"env": {
"SDKAPPID": "YOUR_SDKAPPID",
"SECRETKEY": "YOUR_SECRET_KEY"
}
}
}
}
Go to Settings > select MCP > Configure MCP > open the mcp.json file and configure as follows:
{
"mcpServers": {
"tencent-rtc": {
"command": "npx",
"args": ["-y", "@tencent-rtc/mcp@latest"],
"env": {
"SDKAPPID": "YOUR_SDKAPPID",
"SECRETKEY": "YOUR_SECRET_KEY"
}
}
}
}
Go to Settings > Select MCP > Manually Add MCP > Raw Configuration (JSON) > Open the mcp.json file and configure the following:
{
"mcpServers": {
"tencent-rtc": {
"command": "npx",
"args": ["-y", "@tencent-rtc/mcp@latest"],
"env": {
"SDKAPPID": "YOUR_SDKAPPID",
"SECRETKEY": "YOUR_SECRET_KEY"
}
}
}
}

Environment Variables

SDKAPPID: Chat application ID.
SECRETKEY: SecretKey corresponding to SDKAppID, used to generate test userSig during integration.

Configuration Verification

Once you save the configuration, if you see tencent-rtc displayed as Connected (green) in your IDE’s MCP panel, the installation is complete.

Quick Start Guide

Quick Activation Tip:
Add the @tencent-rtc prefix to your query to skip generic intent search and directly access the latest official SDK and UI component capabilities for faster and more accurate responses.
Precise Activation (Recommended): “@tencent-rtc Help me check how to send voice messages using the Web Chat SDK integrated in H5.”
General Query: “Help me check how to send voice messages using the Web Chat SDK integrated in H5.”

Knowledge Query

Copy the following prompt into your IDE dialog to try the knowledge query feature:
@tencent-rtc Help me find the official documentation for Chat group message callbacks.

UIKit Integration

Copy the following prompt into your IDE dialog to integrate Chat UIKit:
Task: @tencent-rtc Integrate Chat UIKit to build a WeChat-like chat application (use full-featured mode and achieve minimum runnable)

Execution Requirements:
1. Auto-detect framework (React/Vue3/Flutter/Android/iOS).
2. If unable to detect, call `present_framework_choice` for user selection.
3. Invoke MCP tools by platform:
- Web: `get_web_chat_uikit_integration`
- Native: `get_native_chat_uikit_integration`
4. Parameters:
- `framework`: fill in according to actual framework
- `integrationMode`: `full-featured`
5. Call `get_usersig` to obtain credentials for 2 test userIDs, complete SDK initialization and login.
6. Generate a complete chat entry (conversation list + chat window + contacts/profile center) and login page, allowing users to select test accounts for login, and automatically complete routing or page registration.
7. Start the project and output: modified files, run commands, validation steps.

Acceptance Checklist:
- SDK initialized successfully
- User login successful
- Conversation list visible
- Able to send and receive messages

Common Troubleshooting:
- Invalid userSig: re-call `get_usersig`
- Login failed: check `SDKAPPID/SECRETKEY` environment variables
- Messages not displayed: check conversation ID format (e.g., `C2Cuserxxx`)

Constraints:
- Do not use deprecated APIs
- UserSig must be issued by server in production environment

FAQs

How to resolve connection failure for Cursor IDE configuration @tencent-rtc/mcp@latest?

If MCP fails to connect in Cursor, it may be caused by npx cache issues. Run the following command in your terminal to clear the cache, then reload and reconnect MCP.
rm -rf ~/.npm/_npx && npm cache verify

Appendix: Global Manual Installation

To install MCP globally, run the following command in your terminal:
npx -y @tencent-rtc/mcp@latest

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback