create_project
在指定仓库下创建一个分析项目。分析项目 = 分析方案 + 代码分支。 -orgSid: 团队标识 -teamName: 项目组名称 -repoId: 代码仓库 ID -scanSchemeName: 分析方案名称(可通过 list_schemes 获取,也可使用 TCA 官方体验方案) -branch: 代码分支名称,默认为 master
Run Tencent Cloud Code Analysis on a repository from the agent — discover your teams and projects, wire up a repository with its credentials, start a scan, and read the unresolved issues back.
LABSCO SUMMARY
Enterprise analysis platforms are keyed on organisation, team, repository and project identifiers that live in a web console. Most integrations require them up front, which means the first thing a user does is go hunting. Here the tools walk the hierarchy from what the token can see, and then write the config file from what they found. create_repo insisting that list_scm_auths be called first is the same instinct applied to credentials: the repository cannot be connected without one, so the tool text makes the ordering explicit rather than letting the call fail. Tool descriptions and parameters are in Chinese.
A client for Tencent Cloud Code Analysis covering both halves: the discovery and setup path that gets a repository connected, and the scanning path that runs analysis and returns findings.
TCA_TOKEN and TCA_USER_NAME, plus a tca-mcp.ini config file — which setup_config can generate once discovery has found your organisation, team and repository.
One command plus a key — npx -y -p tca-mcp-server@latest tca-mcp-stdio, then supply credentials
USE CASES
Walk down from your organisations to teams, repositories and analysis projects, then generate the config file from what was found.
Check which code credentials exist first, add one if not, connect the repository, and create the analysis project from a scheme and a branch.
Start the analysis, follow the job to completion, then read the unresolved issues rather than the summary.
Get the report link for people who want the full view rather than the issue list in a chat.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
create_project在指定仓库下创建一个分析项目。分析项目 = 分析方案 + 代码分支。 -orgSid: 团队标识 -teamName: 项目组名称 -repoId: 代码仓库 ID -scanSchemeName: 分析方案名称(可通过 list_schemes 获取,也可使用 TCA 官方体验方案) -branch: 代码分支名称,默认为 master
create_repo将代码仓库接入到 TCA 指定的项目组中。 【重要】调用此工具前,必须先调用 list_scm_auths 获取用户的凭证列表,并将对应的凭证信息传入授权参数。 如果不传授权信息,接入仓库大概率会失败(仅公开仓库可以不传授权)。 -orgSid: 团队标识 -teamName: 项目组名称 -scmUrl: 代码仓库地址(如 https://github.com/user/repo.git),必填 -scmType: 代码管理工具类型,可选值:git、svn,默认为 git -name: 代码库别名(可选,最大128字符) -scmAuthType: 授权方式,可选值:http(用户名密码)、ssh(SSH Key)、oauth(OAuth)、private_token(Private Token)。从 list_scm_auths 返回结果的 auth_type 字段获取。 -scmAccountId: 关联的用户名密码授权 ID,从 list_scm_auths 返回结果中 auth_type 为 http 的凭证的 scm_account 字段获取 -scmSshId: 关联的 SSH 授权 ID,从 list_scm_auths 返回结果中 auth_type 为 ssh 的凭证的 scm_ssh 字段获取 -scmOauthId: 关联的 OAuth 授权 ID,从 list_scm_auths 返回结果中 auth_type 为 oauth 的凭证的 scm_oauth 字段获取 -scmPrivateTokenId: 关联的 Private Token 授权 ID,从 list_scm_auths 返回结果中 auth_type 为 private_token 的凭证的 scm_private_token 字段获取 -createdFrom: 创建渠道(可选) -symbol: 代码库标志(可选),可选值:1=腾讯ISV合作伙伴, 2=私有代码库
create_scm_account在 TCA 上创建一个用户名密码类型的代码库凭证。 当用户提供了代码仓库的用户名和密码/Token 时,可以调用此工具自动在 TCA 上创建凭证, 然后将返回的凭证 ID 用于 create_repo 接入仓库。 注意:对于 GitHub/GitLab 等平台,密码字段通常填写的是 Personal Access Token(PAT),而非登录密码。 -scmUsername: 用户名 -scmPassword: 密码或 Token
create_scm_ssh在 TCA 上创建一个 SSH 类型的代码库凭证。 当用户提供了 SSH 私钥时,可以调用此工具自动在 TCA 上创建凭证, 然后将返回的凭证 ID 用于 create_repo 接入仓库。 -name: 凭证名称(用于标识) -sshPrivateKey: SSH 私钥内容 -password: SSH 私钥密码(可选,如果私钥有密码保护)
create_team在指定团队下创建一个新的项目组。 -orgSid: 团队标识 -teamName: 项目组名称(英文,用于URL路径) -displayName: 项目组显示名称(支持中文)
job_detail获取任务详情, 参数如下: -mcpConfigFile: mcp配置文件路径,当前项目根目录查找 tca-mcp.ini(绝对路径)(可选,如果不传则需要传入 orgSid、teamName、repoId、projectId) -orgSid: 团队标识(可选,如果不传 mcpConfigFile 则必填) -teamName: 项目组名称(可选,如果不传 mcpConfigFile 则必填) -repoId: 代码仓库 ID(可选,如果不传 mcpConfigFile 则必填) -projectId: 分析项目 ID(可选,如果不传 mcpConfigFile 则必填) -jobId: 任务id
job_list获取当前任务列表, 参数如下: -mcpConfigFile: mcp配置文件路径,当前项目根目录查找 tca-mcp.ini(绝对路径)(可选,如果不传则需要传入 orgSid、teamName、repoId、projectId) -orgSid: 团队标识(可选,如果不传 mcpConfigFile 则必填) -teamName: 项目组名称(可选,如果不传 mcpConfigFile 则必填) -repoId: 代码仓库 ID(可选,如果不传 mcpConfigFile 则必填) -projectId: 分析项目 ID(可选,如果不传 mcpConfigFile 则必填) -offset: 偏移量 -limit: 限制数量 -state: 查询任务状态, (0为等待中,1为执行中,2为关闭,3为入库中,4正在初始化, 5初始化完成 可多选,格式为1,2,3)
list_orgs列出当前用户在 TCA 上的所有团队,返回团队列表,包含 org_sid 等信息。 用于自动发现用户的团队配置,无需额外参数。
list_projects列出指定仓库下的所有分析项目,返回分析项目列表,包含 project_id、分析方案、分支等信息。 -orgSid: 团队标识 -teamName: 项目组名称 -repoId: 代码仓库 ID
list_repos列出指定项目组下的所有已接入的代码仓库,返回仓库列表,包含 repo_id、scm_url 等信息。 -orgSid: 团队标识 -teamName: 项目组名称
list_schemes列出指定仓库下可用的分析方案,返回分析方案列表。 -orgSid: 团队标识 -teamName: 项目组名称 -repoId: 代码仓库 ID
list_scm_auths列出当前用户在 TCA 上已配置的所有代码库凭证(包括用户名密码、SSH Key、OAuth、Private Token 等)。 返回凭证列表,每个凭证包含 id、auth_type(凭证类型)、scm_account/scm_ssh/scm_oauth/scm_private_token 等信息。 【重要】在调用 create_repo 接入代码仓库之前,必须先调用此工具获取凭证列表, 然后根据凭证类型和 ID 填入 create_repo 的授权参数,否则接入仓库会因为缺少授权而失败。 -orgSid: 团队标识
list_teams列出指定团队下的所有项目组,返回项目组列表,包含 team_name 等信息。 -orgSid: 团队标识,从 list_orgs 返回结果中获取
setup_config根据获取到的 TCA 配置参数,自动生成 tca-mcp.ini 配置文件到指定路径。 在通过 list_orgs → list_teams → list_repos → list_projects 获取到所有参数后调用此工具。 -configPath: 配置文件保存路径(绝对路径,通常为项目根目录下的 tca-mcp.ini) -orgSid: 团队标识 -teamName: 项目组名称 -repoId: 代码仓库 ID -projectId: 分析项目 ID
start_scan启动tca代码分析 参数如下: -mcpConfigFile: mcp配置文件路径,当前项目根目录查找 tca-mcp.ini(绝对路径)(可选,如果不传则需要传入 orgSid、teamName、repoId、projectId) -orgSid: 团队标识(可选,如果不传 mcpConfigFile 则必填) -teamName: 项目组名称(可选,如果不传 mcpConfigFile 则必填) -repoId: 代码仓库 ID(可选,如果不传 mcpConfigFile 则必填) -projectId: 分析项目 ID(可选,如果不传 mcpConfigFile 则必填) -incrScan: 是否增量扫描 -forceCreate: 如果已经存在扫描结果,是否强制启动新扫描
tca_issue_list获取当前项目未解决的问题列表, 参数如下: -mcpConfigFile: mcp配置文件路径,当前项目根目录查找 tca-mcp.ini(绝对路径)(可选,如果不传则需要传入 orgSid、teamName、repoId、projectId) -orgSid: 团队标识(可选,如果不传 mcpConfigFile 则必填) -teamName: 项目组名称(可选,如果不传 mcpConfigFile 则必填) -repoId: 代码仓库 ID(可选,如果不传 mcpConfigFile 则必填) -projectId: 分析项目 ID(可选,如果不传 mcpConfigFile 则必填) -state: 查询任务状态, (0为等待中,1为执行中,2为关闭,3为入库中,4正在初始化, 5初始化完成 可多选,格式为1,2,3) -severity: 问题严重程度, (0为低,1为中,2为高) -offset: 偏移量 -limit: 限制数量
tca_issue_reporttca报告链接, 参数如下: -mcpConfigFile: mcp配置文件路径,当前项目根目录查找 tca-mcp.ini(绝对路径)(可选,如果不传则需要传入 orgSid、teamName、repoId、projectId) -orgSid: 团队标识(可选,如果不传 mcpConfigFile 则必填) -teamName: 项目组名称(可选,如果不传 mcpConfigFile 则必填) -repoId: 代码仓库 ID(可选,如果不传 mcpConfigFile 则必填) -projectId: 分析项目 ID(可选,如果不传 mcpConfigFile 则必填) -jobId: 任务id, 启动分析任务后,从返回结果中获取
BEFORE YOU INSTALL
17 tools when we connected. Five tools create things in your TCA account, including source-control credentials. Scans won't run until a tca-mcp.ini file with four identifiers is in the repository root.
The documented client runs the server on your machine.
CONTEXT COST
Rated by the size of the 17 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y -p tca-mcp-server@latest tca-mcp-stdio{
"mcpServers": {
"tca-mcp-server": {
"command": "npx",
"args": [
"-y",
"-p",
"tca-mcp-server@latest",
"tca-mcp-stdio"
],
"env": {
"TCA_TOKEN": "<YOUR_TCA_TOKEN>",
"TCA_USER_NAME": "<YOUR_TCA_USER_NAME>"
}
}
}
}