Back to MCP directory

tca-mcp-server

基于MCP协议的腾讯云代码分析MCP Server,精准跟踪管理代码分析发现的代码质量缺陷、代码规范、代码安全漏洞、无效代码,以及度量代码复杂度、重复代码、代码统计。新增测试

article

README

Tencent Cloud Code Analysis (TCA) MCP Server​

Official website (https://tca.tencent.com) MCP Server supporting MCP protocol for quickly starting code analysis and obtaining code analysis reports.

Tencent Cloud Code Analysis (TCA), which started in 2012 (internal code name: CodeDog), is a cloud-native, distributed, and high-performance comprehensive code analysis and tracking management platform integrating numerous code analysis tools. Its main functions are to continuously track and analyze code, observe project code quality, and support teams in inheriting code culture. For more information about Tencent Cloud Code Assistant, please visit the official website usage guide: https://tca.tencent.com/document/zh/guide/.

TCA MCP Server Usage Steps​

1,Create relevant resources on the TCA official website

Official website: https://tca.tencent.com/​

  • step1: [Create a team] Visit the TCA official website, log in, select to create a team, fill in relevant information, and wait for the application to be approved: create_team

  • step2: [Create a project team] After creating the team, click to select the team, and create a project team after entering: create a project team

  • step3: [Access the code repository] After creating the project team, click to select the project team, and select to access the code repository that needs to be analyzed after entering: repo

  • step4: [Create an analysis project] After successfully accessing the code repository, create an analysis project (it is recommended to first use the official experience plan in the figure for usage experience): create a project

2, Create a tca-mcp.ini configuration file in the code repository

Create a tca-mcp.ini configuration file in the code repository that needs code analysis. The configuration file is stored in the root directory of the code repository, and the content of the configuration file is as follows:

[config]
project_id=<project_id>
repo_id=<repo_id>
org_sid=<org_sid>
team_name=<team_name>

Relevant parameters can be obtained from the route of the corresponding page, as shown in the following figure:

tca-mcp-ini参数

Where 4iYVpci9nAX corresponds to org_sid; 19485 corresponds to repo_id; 234521 corresponds to project_id; first corresponds to team_name. Fill in according to the actual situation.

3, Configure TCA MCP Server

{
  "mcpServers": {
    "tca-mcp-server": {
      "command": "npx",
      "args": ["-y", "-p", "tca-mcp-server@latest", "tca-mcp-stdio"],
      "env": {
        "TCA_TOKEN": "<TCA_TOKEN>", 
        "TCA_USER_NAME": "<TCA_USER_NAME>"
      }
    }
  }
}

The corresponding TCA_TOKEN and TCA_USER_NAME are obtained from the TCA official website, [Personal Center] -> [Personal Token], and can be accessed at https://tca.tencent.com/user/token.

TCA MCP Server Development Steps​

Requirements: nodejs >= 22.0.0

1,npm run build 2, Manually add test configuration:

{
  "mcpServers": {
    "tca-mcp-server-test": {
      "command": "node",
      "args": ["/path/to/tca-mcp-server/dist/stdio.js"],
      "env": {
        "TCA_TOKEN": "<TCA_TOKEN>", 
        "TCA_USER_NAME": "<TCA_USER_NAME>",
      }
    }
  }
}
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client