> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI MCP integration guide

> openai MCP server integration

OpenAI MCP provides access to chat, Responses, image, vector, and audio capabilities through a single client connection. You can also enable only the five GPT Image tools locally.

## Connect to the Hosted Service

In a client that supports remote MCP, add a **Streamable HTTP** server at `https://openai.mcp.acedata.cloud/mcp`. When using OAuth, choose to sign in to Ace Data Cloud and confirm authorization in your browser.

| Client | How to Connect |
| - | - |
| Claude / Claude Desktop | Add a custom connector under Customize → Connectors, enter the hosted URL, and sign in. |
| Claude Code | Run `claude mcp add --transport http --scope user openai https://openai.mcp.acedata.cloud/mcp`, open `/mcp` in the session, select the server, and complete authorization. |
| Cursor | Create a new HTTP server in the MCP settings, enter the hosted URL, and sign in when prompted. |
| VS Code | Run **MCP: Add Server** from the Command Palette, select HTTP, and enter the hosted URL. You can then use **MCP: List Servers** to check the status. |

In Codex CLI, run the following command. Once complete, enter `/mcp` in the session to view the servers.

```bash theme={null}
codex mcp add openai --url https://openai.mcp.acedata.cloud/mcp
codex mcp login openai
```

To use fixed credentials, add the request header `Authorization: Bearer &lt;应用 API Key>` in the client's private settings and confirm that the application is authorized to call the selected API. You can create or copy a key in the console under Applications → General Applications → Key Management. [Application Console](https://platform.acedata.cloud/console/applications)

### Use an Application Key in Gemini CLI and OpenCode

First, save the application API key as the client environment variable `ACEDATACLOUD_API_TOKEN`. The following commands use macOS or Linux shell quoting.

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

In OpenCode 1.x, configure `type: "remote"`, the hosted URL, and `oauth: false` for this service in the `mcp` object of your personal `opencode.json`. Set the request header `Authorization` to `Bearer {env:ACEDATACLOUD_API_TOKEN}`. [OpenCode 1.x configuration](https://opencode.ai/v1/docs/mcp-servers/)

## Local stdio connection

After installing [uv](https://docs.astral.sh/uv/getting-started/installation/), local clients can start the MCP process using standard input and output. The process sends OpenAI requests to Ace Data Cloud.

Claude Desktop users can open the local MCP configuration from the developer settings, merge in the server entry below, replace the placeholder in their personal configuration with the application API key in plain text, and then restart the client. Clients that support private environment variables can also inject `ACEDATACLOUD_API_TOKEN` from a credential manager.

```json theme={null}
{
  "mcpServers": {
    "openai": {
      "command": "uvx",
      "args": [
        "mcp-openai-pro"
      ],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "YOUR_API_KEY"
      }
    }
  }
}
```

[mcp-openai-pro installation package](https://pypi.org/project/mcp-openai-pro/)

## Initial verification

After connecting, tell the assistant: "Please call only `openai_list_chat_models` or `openai_list_image_models` and list the models I can specify in the corresponding tool."

## Tools and usage examples

| Operation | Tools and parameters |
| - | - |
| Chat and Responses | Use `openai_chat_completion` and `openai_create_response`, respectively. |
| Images | `openai_generate_image` generates images from text; `openai_edit_image` combines a reference image with editing instructions. |
| Embeddings and audio | Use `openai_create_embedding`, `openai_text_to_speech`, or `openai_transcribe_audio`. |
| Asynchronous tasks | `openai_get_task` retrieves an existing task; `openai_list_tasks` displays task history. |
| Models and connection details | `openai_get_models` retrieves the model catalog, `openai_list_embedding_models` lists embedding models, and `openai_get_usage_guide` shows usage examples. `openai_get_realtime_connection_info` provides real-time connection configuration. |

In an image workflow, first select a model that supports editing from `openai_list_image_models`, then provide `openai_edit_image` with a product photo and the instruction "Keep the text on the packaging and change the background to light blue." If you choose asynchronous execution, save the returned `task_id` and have the assistant retrieve the result using the `id` parameter of `openai_get_task`.

## Using only GPT Image

In the local stdio configuration, keep the command as `uvx`, change the arguments to `["mcp-openai-pro", "--profile", "gpt-image"]`, and retain `ACEDATACLOUD_API_TOKEN`. Use `gpt_image_list_models` to view the models, and explicitly specify `model` in `gpt_image_generate` or `gpt_image_edit`. `gpt_image_get_task` and `gpt_image_list_tasks` are used to retrieve image tasks. The hosted URL above provides a general-purpose OpenAI toolset.

See the API documentation for parameter and response formats: [Chat Completions](https://platform.acedata.cloud/documents/openai-chat-completions), [Image Editing](https://platform.acedata.cloud/documents/openai-images-edits), and [Task Query](https://platform.acedata.cloud/documents/openai-tasks).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.