AI Chat MCP Integration Guide

AI Chat MCP allows assistants to call multiple models through Ace Data Cloud’s conversation service, create new conversations, continue conversations, or retrieve saved conversations by ID. The models supported by each conversation API can be queried separately within the tool.

Connect to the Hosted Service

Select remote MCP (Streamable HTTP) in the client and enter https://aichat.mcp.acedata.cloud/mcp as the server address. After selecting OAuth, follow the browser prompts to log in to Ace Data Cloud and authorize access.

Client How to connect
Claude / Claude Desktop Add a custom connector under “Customize → Connectors,” paste the server address, and log in.
Claude Code Run claude mcp add --transport http --scope user aichat https://aichat.mcp.acedata.cloud/mcp, open /mcp in the session, select the server, and complete authorization.
Codex CLI Run codex mcp add aichat --url https://aichat.mcp.acedata.cloud/mcp, then run codex mcp login aichat.
Cursor Create an HTTP server in the MCP settings, enter the address, and follow the prompts to log in when connecting.
VS Code Run MCP: Add Server from the command palette, select HTTP and enter the address, then use MCP: List Servers to check the status.

If using an application API Key, select the application used for conversations on the application management page, check whether the allowed APIs include the AI Chat, AI Chat v2, or Claude Messages API being used, and confirm the balance. In the client’s private credential settings, set the request header to Authorization: Bearer <application API Key>. Applications and API Keys

Use an Application Key with Gemini CLI and OpenCode

First, set the environment variable ACEDATACLOUD_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 the variable reference.

Client How to connect
Gemini CLI Run gemini mcp add --scope user --transport http aichat https://aichat.mcp.acedata.cloud/mcp --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}', then check with gemini mcp list.
OpenCode 2.x Run opencode mcp add aichat --global --url https://aichat.mcp.acedata.cloud/mcp --header 'Authorization=Bearer {env:ACEDATACLOUD_API_TOKEN}', then run opencode reload and opencode mcp list.

For 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 the user configuration. Replace the placeholder with the application API Key, save, and restart the client. Other clients that support stdio can also run the uvx mcp-aichat command and pass the key to the process as an environment variable.

{
  "mcpServers": {
    "aichat": {
      "command": "uvx",
      "args": [
        "mcp-aichat"
      ],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "YOUR_API_KEY"
      }
    }
  }
}

The local process still calls the Ace Data Cloud API. Store the key in your personal client configuration or credential manager. mcp-aichat Package

Verify the Connection and Available Tools

Open the client’s tool list, find AI Chat, and first ask the assistant to call aichat_list_models and list the models supported by AI Chat v2. This query can check whether the client has loaded the tools without submitting a service request.

Purpose Tool Usage
View models aichat_list_models Select the required model identifier for each API.
Start a conversation aichat_create_conversation Write a question in question and optionally specify a model. The return value contains the answer and conversation information.
Use v2 conversations aichat_create_conversation_v2 Create, continue, or retrieve a conversation. Use action="retrieve" and id to retrieve by ID.
Send Claude messages aichat_create_message Select model from the native Messages model list, and pass in messages and a positive integer max_tokens. This tool requires access to the Claude Messages API.
View integration instructions aichat_get_usage_guide View multi-turn Q&A and parameter examples.

Invocation Example

Ask the assistant to use aichat_create_conversation_v2 to start a simple text Q&A, passing in the following parameters.

{
  "action": "chat",
  "question": "将这条反馈改成一个清楚的标题:我希望查到上次导出的文件。",
  "stateful": true,
  "max_turns": 1
}

Keep the returned conversation ID; you can then use action="retrieve" and id to retrieve the conversation. max_turns=1 is suitable for a single Q&A that does not require external tools; if you want the v2 assistant to execute tools within one request, you can set the iteration limit separately. Model calls are billed according to actual usage.

Before making an actual call, you can check current pricing and availability on the service page. AI Chat Service · AI Chat API · AI Chat v2 API