Connect to the Hosted Service
In your client, select remote MCP (Streamable HTTP) and enterhttps://aichat.mcp.acedata.cloud/mcp as the server address. Select OAuth, then follow the browser prompts to sign in to Ace Data Cloud and authorize access.
If using an application API key, select the application used for chat on the application management page. Check that the allowed APIs include the AI Chat, AI Chat v2, or Claude Messages API you intend to use, and confirm the balance. Set the request header to
Authorization: Bearer <应用 API Key> in the client’s private credential settings. Applications and API Keys
Using an Application Key with Gemini CLI and OpenCode
First, set the environment variableACEDATACLOUD_API_TOKEN to the application API key in the terminal where you launch the client. The following commands use macOS or Linux shell quoting and save a reference to the variable.
In OpenCode 1.x, add a service named
aichat to the mcp object in your personal opencode.json. Set type to remote, url to the address above, oauth to false, and headers.Authorization to Bearer {env:ACEDATACLOUD_API_TOKEN}. OpenCode 1.x configuration
Connect locally via stdio
Install uv, open the local MCP configuration in Claude Desktop’s developer settings, and merge the following entry into your user configuration. Replace the placeholder with your application’s API key, save, and restart the client. Other clients that support stdio can also run theuvx mcp-aichat command and pass the key to the process as an environment variable.
Verify the connection and available tools
Open the client’s tool list, find AI Chat, and first ask the assistant to callaichat_list_models to list the models supported by AI Chat v2. This query checks whether the client has loaded the tools without submitting a business request.
Example request
Ask the assistant to useaichat_create_conversation_v2 for a simple text-based question and answer, passing in the following parameters.
action="retrieve" and id to query the conversation. max_turns=1 is suitable for a single question and answer that does not require external tools. To let the v2 assistant execute tools within a request, you can separately set an iteration limit. Model calls are billed based on actual usage.
Before making a request, check the service page for current pricing and availability. AI Chat service · AI Chat API · AI Chat v2 API
