MCP
CodeArts Agent CLI connects to an MCP server using the Model Context Protocol (MCP). It leverages the server's extra tools and resources to enhance its capabilities.
Disclaimer
MCP servers are built, published, and maintained by third-party developers or organizations. CodeArts Agent does not review, verify, or endorse the code implementation, security, stability, data processing practices, or service quality of third-party MCP servers.
CodeArts Agent shall not be held liable for any risks arising from the use of third-party MCP servers, including but not limited to issues caused by defects in the MCP servers themselves, configuration errors, service anomalies, API changes, call failures, or the accuracy, completeness, and security of returned data.
Certain MCP servers may be inaccessible in specific countries or regions due to applicable laws and regulations, network constraints, policy adjustments by third-party services, or changes in service availability. CodeArts Agent has no control over these factors and cannot guarantee that all MCP servers will remain continuously available or fully functional across different regions or network environments.
Before using a third-party MCP server, users should independently assess its suitability and security risks, and ensure compliance with local laws and regulations as well as the terms of use and licensing requirements of the relevant third party.
For MCP servers involving sensitive operations on code, data, files, or account permissions, users are advised to fully understand their scope of permissions, data processing methods, and security policies before use, and to implement necessary security measures based on their specific business scenarios.
MCP Configuration Paths
You can configure the following two types of MCP servers. The configuration path corresponding to each type is shown in Table 1.
- Local mode: Tool processes run directly on your computer. CodeArts Agent CLI launches and communicates with them directly.
- Remote mode: Tools are deployed on another machine or cloud server. CodeArts Agent CLI communicates with them through HTTP or WebSocket.
| Type | Level | Application Scope | Configuration Path and File |
|---|---|---|---|
| Local/Remote mode | Project | Current project | In the .codeartsdoer folder under your project's root directory, use codearts_cli.jsonc or codearts_cli.json as the configuration file. |
| User | All projects of the current user | In the ~/.codeartsdoer directory of the current user, use codearts_cli.jsonc or codearts_cli.json as the configuration file. The tilde (~) indicates the home directory of the current user. In Windows, it is equivalent to C:\Users\Username\. In macOS, it is equivalent to /Users/Username/. In Linux, it is equivalent to /home/Username/. |
| Parameter | Mandatory or Not | Type | Description |
|---|---|---|---|
| type | Yes | String | Fixed value: local. |
| command | Yes | String array | Execution commands and parameter list required to start the MCP service. |
| environment | No | Object | Environment variables to be injected when MCP servers are running. |
| enabled | No | Boolean | Whether to enable an MCP server. |
| timeout | No | Number | Response timeout interval for obtaining the MCP service tool, in milliseconds. The default interval is 100,000 ms. |
| Parameter | Mandatory or Not | Type | Description |
|---|---|---|---|
| type | Yes | String | Fixed value: remote. |
| url | Yes | String | Complete URL of a remote MCP server. |
| headers | No | Object | Request header. |
| environment | No | Object | Environment variables to be injected when MCP servers are running. |
| oauth | No | Object | OAuth authentication configuration. |
| enabled | No | Boolean | Whether to enable an MCP server. |
| timeout | No | Number | Response timeout interval for obtaining the MCP service tool, in milliseconds. The default interval is 5,000 ms. |
MCP Server Configuration Example
The following demonstrates the configuration steps for a remote MCP server through actual operations on a Windows system.
- Create the codearts_cli.jsonc file in the %USERPROFILE%/.codeartsdoer/ directory.
- In the created codearts_cli.jsonc file, configure the following content and restart CodeArts Agent CLI.
{ "mcp": { // EdgeOne Pages Deploy MCP is a dedicated service that allows you to quickly deploy web applications on EdgeOne Pages and generate public access links. This enables you to instantly preview and share AI-generated web pages. "edgeone-pages": { "type": "remote", "url": "https://mcp-on-edge.edgeone.site/mcp-server", "enabled": true, "timeout": 45000, "headers": { // API request authentication header, which is optional "Authorization": "Bearer edgeone_token_your_secret" } } } } - Check whether the MCP configuration takes effect.
/mcps
The status of edgeone-pages is Enabled, indicating that the MCP server is enabled.
Figure 1 Enabled status
- Enter a prompt to invoke the MCP server and complete the task you want to perform.
Generate and release a snake game.
AI invokes the MCP server and creates a snake game.
Figure 2 MCP server invoked successfully
What is your overall rating for this page?
Thank 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