tccc-mcp-server

v0.0.41
@tencentcloud/tccc-mcp-server Checked 3 days ago Published 1 month ago

MCP server for Tencent Cloud Contact Center (TCCC)

tccc-mcp-server enables AI assistants to quickly integrate with Tencent Cloud Contact Center (TCCC) via MCP (Model Context Protocol). Then just ask your AI assistant in natural language: The following APIs have real business impact. AI clients should confirm with the user before invoking them (their tool descriptions carry an auto-generated ⚠️ marker):

Summary extracted from the README.

@tencentcloud/tccc-mcp-server

English | 简体中文

tccc-mcp-server enables AI assistants to quickly integrate with Tencent Cloud Contact Center (TCCC) via MCP (Model Context Protocol).

Quick start

1. Get credentials

Variable Required Description Where to get it
TENCENTCLOUD_SECRET_ID ✅ Tencent Cloud SecretId (starts with AKID) CAM - API Key Management
TENCENTCLOUD_SECRET_KEY ✅ Tencent Cloud SecretKey (32-char random string) Same as above

⚠️ Don't swap the key pair: SecretId starts with AKID; SecretKey is a 32-character random string. If reversed you'll get The SecretId is not found.

2. Add to your MCP client

WorkBuddy / Cursor / Claude Desktop / Cline (universal format)

{
  "mcpServers": {
    "tccc": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@tencentcloud/tccc-mcp-server"],
      "env": {
        "TENCENTCLOUD_SECRET_ID": "AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "TENCENTCLOUD_SECRET_KEY": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "TCCC_SDK_APP_ID": "1400000000"
      },
      "timeout": 60000
    }
  }
}

Config file locations:

Client Location
WorkBuddy ~/.workbuddy/mcp.json
Cursor project .cursor/mcp.json or global ~/.cursor/mcp.json
Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
Cline MCP panel in VS Code settings

Restart your client after editing — MCP processes are spawned at client startup. The first npx run downloads the package (a few seconds); keep timeout at 60 s or higher.

Offline / air-gapped environments

npm install -g @tencentcloud/tccc-mcp-server
which tccc-mcp-server   # get the absolute path
{
  "mcpServers": {
    "tccc": {
      "type": "stdio",
      "command": "/usr/local/bin/tccc-mcp-server",
      "env": { "...": "..." }
    }
  }
}

3. Verify

npx -y @tencentcloud/tccc-mcp-server --help
npx -y @tencentcloud/tccc-mcp-server --version

Then just ask your AI assistant in natural language:

Which TCCC applications do I have? List the agents under SdkAppId 1400000000 Pull the call records from the last 24 hours How many voice AI agents are there in this application? How can I try the TCCC AI agent / AI outbound call demo?

⚠️ Destructive operations

The following APIs have real business impact. AI clients should confirm with the user before invoking them (their tool descriptions carry an auto-generated ⚠️ marker):

DeleteCCCInstance · DeleteStaff · DeleteExtension · DeleteCCCSkillGroup · DeletePredictiveDialingCampaign · AbortPredictiveDialingCampaign · HangUpCall · StopAutoCalloutTask · ForceMemberOffline · ResetExtensionPassword · UnbindNumberCallOutSkillGroup …

Special notes:

  • DeleteStaff has no recycle bin. Deleted agents can only be recreated; the original staff number is not restored.
  • Bulk-modify APIs usually overwrite the full configuration — read the current state first and keep a backup before modifying.

Security recommendations

  1. Use a CAM sub-account key restricted to QcloudCCCReadOnlyAccess or a minimal custom policy. Never use your root account key.
  2. Keep keys only in your local env config; never commit them to version control.
  3. Enable CloudAudit for production operations.

Troubleshooting

Q: Tools load fine, but calls fail with InvalidParameterValue | SdkAppId invalid

Run the list tool to see which application IDs actually exist under your key:

describe_cccbuy_info_list

If the target ID is not in the list, your key belongs to a different Tencent Cloud account (TCCC apps are not visible across accounts) — switch keys; it's not a typo in the ID.

Q: UnknownParameter: SdkAppId not recognized

Some APIs (e.g. DescribeCCCBuyInfoList) don't take SdkAppId. The server checks each tool's schema before injecting the default, so this shouldn't happen; if it does, file an issue.

Q: How do I create a new TCCC application / instance?

Call create_ccc_instance with just an InstanceName. The SdkAppId in the response is the TCCC application ID — a plain number such as 1400255946 or 1600162487 (the number range is not fixed) — use it for every later call, or put it in TCCC_SDK_APP_ID. A single Tencent Cloud account can hold at most 20 applications.

Q: A query returns empty

Suspect a typo in the identifier first. Manually typed values like agent emails or domains are common typo sources (e.g. gmai.com missing an l).

Known limitations

  • Rate limits: most APIs allow 20 requests/second; UploadIvrAudio and CreateCompanyApply only 1/second. Throttle bulk operations yourself.
  • File-related APIs like UploadIvrAudio take a COS URL, not a file stream — upload the file first.
  • Covers only the ccc service of API 3.0 (OpenAPI). TCCC WebSocket / client-SDK signaling is out of scope.

Development

npm install
npm run generate   # re-parse SDK type definitions into src/tools.json
npm start          # run locally (stdio)

Tool definitions are generated from ccc_models.d.ts (251 structs) and ccc_client.d.ts (84 methods) under node_modules/tencentcloud-sdk-nodejs-ccc/tencentcloud/services/ccc/v20200210/. Field descriptions come straight from the official JSDoc. After an SDK upgrade, run npm run generate to sync.

prepublishOnly re-runs generate automatically before each publish, so the shipped schema always matches the SDK version.

License

MIT


简体中文

English | 简体中文

tccc-mcp-server 通过 MCP(Model Context Protocol)向 AI 助手提供 Tencent Cloud Contact Center (TCCC) 快速集成能力。

快速开始

1. 准备凭据

变量 必填 说明 获取地址
TENCENTCLOUD_SECRET_ID ✅ 腾讯云 SecretId,AKID 开头 CAM 密钥管理
TENCENTCLOUD_SECRET_KEY ✅ 腾讯云 SecretKey,32 位随机串 同上

⚠️ SecretId / SecretKey 不要填反:SecretId 以 AKID 开头,SecretKey 是 32 位随机串。填反会报 The SecretId is not found。

2. 配置到 MCP 客户端

WorkBuddy / Cursor / Claude Desktop / Cline(通用格式)

{
  "mcpServers": {
    "tccc": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@tencentcloud/tccc-mcp-server"],
      "env": {
        "TENCENTCLOUD_SECRET_ID": "AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "TENCENTCLOUD_SECRET_KEY": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "TCCC_SDK_APP_ID": "1400000000"
      },
      "timeout": 60000
    }
  }
}

配置文件位置:

客户端 位置
WorkBuddy ~/.workbuddy/mcp.json
Cursor 项目 .cursor/mcp.json 或全局 ~/.cursor/mcp.json
Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)
Cline VS Code 设置里的 MCP 面板

改完重启客户端,MCP 进程是客户端启动时拉起的。首次启动 npx 会下载包(几秒),timeout 建议不低于 60 秒。

离线 / 内网环境

npm install -g @tencentcloud/tccc-mcp-server
which tccc-mcp-server   # 拿到绝对路径
{
  "mcpServers": {
    "tccc": {
      "type": "stdio",
      "command": "/usr/local/bin/tccc-mcp-server",
      "env": { "...": "..." }
    }
  }
}

3. 验证

npx -y @tencentcloud/tccc-mcp-server --help
npx -y @tencentcloud/tccc-mcp-server --version

配好凭据后直接问你的 AI:

我有哪些 TCCC 应用? 查一下 1400000000 下面的座席 最近 24 小时的通话记录拉出来 这个应用下有多少个 AI 智能体? 我怎么体验 TCCC AI 智能体 / 智能体对话 / AI 外呼?

⚠️ 危险操作

以下操作有实际业务影响,AI 调用前应当二次确认(工具描述里已自动打上 ⚠️ 标记):

DeleteCCCInstance · DeleteStaff · DeleteExtension · DeleteCCCSkillGroup · DeletePredictiveDialingCampaign · AbortPredictiveDialingCampaign · HangUpCall · StopAutoCalloutTask · ForceMemberOffline · ResetExtensionPassword · UnbindNumberCallOutSkillGroup ……

特别注意:

  • DeleteStaff 没有回收站,删除后只能重建,原工号不会自动恢复。
  • 批量修改类接口通常是全量覆盖,改之前先查一遍现有配置做备份。

安全建议

  1. 用 CAM 子账号密钥,只授予 QcloudCCCReadOnlyAccess 或按需的最小策略,不要使用主账号密钥。
  2. 密钥只放在本地 env 里,不要提交到版本库。
  3. 生产环境建议开启操作审计(CloudAudit)。

常见问题

Q:工具都加载了,但调用报 InvalidParameterValue | SdkAppId invalid

先跑列表接口确认这对密钥下真实存在的应用 ID:

describe_cccbuy_info_list

如果目标 ID 不在返回列表里,说明密钥属于另一个腾讯云账号(TCCC 应用不跨账号可见)—— 换密钥即可,不是 ID 写错。

Q:报 UnknownParameter: SdkAppId not recognized

部分接口(如 DescribeCCCBuyInfoList)不需要 SdkAppId。server 会自动判断,不会给没有该字段的接口注入;如果仍出现请提 issue。

Q:怎么新建一个 TCCC 应用 / 实例?

调用 create_ccc_instance,只传 InstanceName(实例名称)。返回结果里的 SdkAppId 就是 TCCC 应用 ID(纯数字,如 1400255946、1600162487,号段不固定),后续所有接口用它,也可以配到 TCCC_SDK_APP_ID。一个腾讯云账号最多创建 20 个应用。

Q:查询返回空

先怀疑标识符拼写。座席邮箱、域名这类手工输入的值常有 typo(例如 gmai.com 少了 l)。

已知限制

  • 频率限制:多数接口 20 次/秒,UploadIvrAudio、CreateCompanyApply 为 1 次/秒,批量操作需自行节流。
  • UploadIvrAudio 等涉及文件的接口,参数里是 COS 链接而非文件流,需先自行上传。
  • 仅覆盖 API 3.0 的 ccc 服务,不含 TCCC 的 WebSocket / SDK 侧信令。

开发

npm install
npm run generate   # 重新解析 SDK 类型定义,生成 src/tools.json
npm start          # 本地启动(stdio)

工具定义来自 node_modules/tencentcloud-sdk-nodejs-ccc/tencentcloud/services/ccc/v20200210/ 下的 ccc_models.d.ts(251 个结构体)和 ccc_client.d.ts(84 个方法),字段注释直接取自官方 JSDoc。SDK 升级后跑 npm run generate 即可同步。

SDK 未收录的接口(当前是 CreateCCCInstance、DeleteCCCInstance、ModifyCCCInstanceInfo)不参与生成,手工维护在 src/extra-api-tools.mjs;若 SDK 升级后收录了同名 Action,启动时会自动去重,以自动生成的定义为准。

发布前 prepublishOnly 会自动重跑 generate,保证产物与 SDK 版本一致。

License

MIT