Claude Code
In addition to the native configuration, CodeArts Agent CLI supports Claude Code for MCP server configuration. If you already have the MCP configuration file of Claude Code, you can use it in CodeArts Agent CLI without rewriting it. The two methods are equivalent in functions. You can choose either of them.
You can configure a project-level MCP server. Table 1 MCP server configuration path lists the configuration path.
| Level | Application Scope | Configuration Path |
|---|---|---|
| Project | Current project | Project root directory/.codeartsdoer/mcp/mcp_settings.json |
Local MCP Server
The stdio transmission mode is used to connect to the MCP server through a local process.
Parameters
| Parameter | Type | Description |
|---|---|---|
| command | String | Command for starting the MCP server process, such as npx, uvx, node, and python. This parameter is mandatory. |
| args | String array | Parameters of the startup command |
| env | Object | Environment variables, which are used to transfer configurations such as the API key |
| disabled | Boolean | Whether to enable the MCP server |
| timeout | Numeric | Connection timeout interval, in milliseconds |
Configuration Example
This section uses Windows as an example to describe how to configure a local MCP server.
- In the D:/tmp/test_hc_cli/.codeartsdoer/ directory, create the mcp/mcp_settings.json file, write the following configuration to the file, and restart the CodeArts Agent CLI:
{ "mcpServers": { "git-mcp-server": { "transportType": "stdio", "disabled": false, "timeout": 100000, "args": [ "@cyanheads/git-mcp-server" ], "command": "npx", "env": { "GIT_SIGN_COMMITS": "false", "MCP_LOG_LEVEL": "info" } } } } - Run the following command to check whether the configuration has taken effect:
/mcps
The status of git-mcp-server is Enabled, indicating that the MCP server is enabled.
Figure 1 Status
- In the TUI dialog box, enter the following instruction.
What can git-mcp-server do?
The function description and usage method are returned, indicating that the configuration of the local MCP server has taken effect.
Remote MCP Server
Streamable HTTP is used to connect to the remote MCP server.
Parameters
| Parameter | Type | Description |
|---|---|---|
| url | String | HTTP URL of the MCP server. This parameter is mandatory. |
| headers | Object | HTTP request header, which is used for authentication |
| disabled | Boolean | Whether to enable the MCP server |
| timeout | Numeric | Connection timeout interval, in milliseconds |
| autoApprove | String array | List of tools that are automatically approved |
Configuration Example
This section uses Windows as an example.
- In the D:/tmp/test_hc_cli/.codeartsdoer/ directory, create the mcp/mcp_settings.json file, write the following configuration to the file, and restart the CodeArts Agent CLI:
{ "mcpServers": { "socket-mcp": { "url": "https://mcp.socket.dev/", "headers": { "Content-Type": "application/json" }, "timeout": 30000, "disabled": false } } }The MCP server scans dependencies to evaluate the quality and security of software packages.
- Run the following command to check whether the configuration has taken effect:
/mcps
The status of socket-mcp is Enabled, indicating that the MCP server is enabled.
Figure 2 Status
- In the TUI dialog box, enter the following command and press Enter:
Check the security score of express 4.18.2.
The security score is returned, indicating that the configuration of the remote MCP server has taken effect.
Figure 3 MCP server configuration has taken effect
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