Configuring CodeArts Check MCP
- In the upper left corner of IDE, choose , and open the repo-demo project.
- Click
in the upper right corner of CodeArts Agent IDE to open the settings page. - In the navigation pane on the left, choose MCP.
- Download CodeArts Check MCP from official download website to the local PC and decompress it.
- Click Configure MCP, copy the following configuration information, and paste it to the mcp_settings.json file. For details about the parameters and their example values, see Table 1. After the configuration is complete, press shortcut keys (Ctrl+S for Windows/Linux and Command (⌘)+S for macOS) to save the settings and wait until the tool is started.
{ "mcpServers": { "CodeArts Check MCP": { "disabled": false, "timeout": 600000, "command": [ "D:\\Program Files\\nodejs\\node.exe", "D:\\codeartscheck-ts-mcp-server-1.0.0\\package\\dist\\index.js" ], "environment": { "region": "ap-southeast-3", "ak": "your_ak", "sk": "your_sk" }, "type": "local" } } }Table 1 Parameters Parameter
Example Value
Description
mcpServers
See the configuration information below.
Top-level node, which contains all registered MCP servers.
CodeArts Check MCP
/
(Mandatory) A unique name (maximum 64 characters) used to distinguish between different MCP servers.
NOTE:If the server name exceeds 64 characters, the request may fail with one of the following errors. For details, refer to the definition of Tools under Core Server Features.
- type: session.error info
- length over limit, maximum is 64
disabled
false
(Mandatory) Whether to disable the MCP server. The default value is false. Value:
- false: enabled
- true: disabled
timeout
600000
Timeout interval (ms). After the timeout interval expires, the client reports an error.
command
"command": [ "D:\\Program Files\\nodejs\\node.exe", "D:\\codeartscheck-ts-mcp-server-1.0.0\\package\\dist\\index.js" ],(Mandatory) It consists of two parts:
- "D:\\Program Files\\nodejs\\node.exe": path of the executable file for running the MCP server.
- "D:\\codeartscheck-ts-mcp-server-1.0.0\\package\\dist\\index.js": path for storing the index.js file after the package obtained in 4 is decompressed.
environment
{ "region": "ap-southeast-3", "ak": "your_ak", "sk": "your_sk" }(Optional) Environment variables, including areas, AK, and SK, passed to the MCP server. These variables must be strings.
The value of environment.region must be fixed to ap-southeast-3. The methods of obtaining environment.ak and environment.sk are as follows:
- Create access keys by referring to Access Keys.
- In the Create Access Key dialog box, select the agreement check box and click Next. Enter a description for the access key and click OK.
After the access key is created, download and save it. Once the dialog box is closed, the key cannot be obtained.
- You can obtain the values of environment.ak and environment.sk from the credentials.csv file that you have downloaded and saved.
type
local
Communication protocol of the MCP server. The value is local.
- Click
in the upper right corner of CodeArts Agent IDE to open the settings page. - In the navigation pane on the left, choose MCP.
- On the Installed tab, the MCP server CodeArts Check MCP has been configured and takes effect, as shown in the following figure.
Locally Configuring a Check Task ID
- As shown in the following figure, create a codeartscheck folder under .codeartsdoer and create a task.md file in the codeartscheck folder. Figure 1 Creating a task.md file
- Log in to CodeArts console, and select AP-Singapore.
- Click Go to Workspace in the upper right corner to go to the CodeArts project homepage.
- Click the req-demo card to go to the homepage of the project.
- In the navigation pane, choose Code > Check to go to the CodeArts Check homepage.
- On the Tasks tab, click repo-demo-check to go to the Overview page of the scan task repo-demo-check.
- Copy the ID of the scan task (that is, the character string between "task" and "detail" in the URL of the current browser).
- As shown in the following figure, enter the task ID in the task.md file and save the file. Figure 2 Filling in the task.md file
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot