OpenCode Integration with Seedream MCP
📘 Overview:OpenCode MCP Overview →
Seedream's understanding of Chinese prompts and its performance in product images and poster scenarios has always been stable, especially in "editing existing images based on descriptions," which can almost be directly handed over to design colleagues. After connecting the Seedream MCP Server in OpenCode, you can directly describe the image you want in Chinese, or let the AI modify the existing images you paste in.
Seedream MCP is suitable for e-commerce product images, event posters, social media graphics, as well as "secondary editing" scenarios like modifying text on posters and adjusting visual elements.
¶ Obtain API Token
Before using the Seedream MCP Server, you need to prepare an Ace Data Cloud API Token. OpenCode and Claude Code share the same set of tokens, and the acquisition process is the same:
- Open the Ace Data Cloud Console - Application List to obtain your API Token for backup.
- If you are not logged in or registered, you will be automatically redirected to the login page; after logging in or registering, you will be automatically returned to the current page.
- The first application will have a free quota granted, allowing you to experience the Seedream MCP service for free.

One token can be used for all MCP Servers provided by Ace Data Cloud, and there is no need to apply separately for Seedream. The documentation and screenshots suggest displaying only a masked format, such as YOUR_ACEDATACLOUD_API_KEY, and do not paste the complete token into public repositories, issues, screenshots, or chat records.
Want to use Claude Desktop / Claude.ai web version for direct OAuth one-click authorization? Please see the Claude.ai / Desktop tutorial for Seedream MCP.
¶ Configure OpenCode
OpenCode uses a single opencode.json to describe all MCP Servers. The file can be placed in two locations; choose one according to the "scope" below. The field structure in both locations is exactly the same, with the only difference being priority.
It is strongly recommended to first write the token to an environment variable:
export ACEDATACLOUD_API_KEY="replace with your real token"
Then reference it in opencode.json using the {env:ACEDATACLOUD_API_KEY} placeholder to avoid writing the real token into the file.
¶ Global: Shared by all projects
File location: ~/.config/opencode/opencode.json, suitable for "my own machine, configured once, usable by all projects."
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"seedream": {
"type": "remote",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}" }
}
}
}
⚠️
"oauth": falsecannot be omitted. AceData's MCP Server uses Bearer Token authentication and does not go through the OAuth process; OpenCode will automatically redirect 401 as an OAuth challenge, causingopencode mcp listto showSSE error: Non-200 status code (401). Explicitly declaring"oauth": falseallows OpenCode to call directly withAuthorization: Bearer ..., andopencode mcp debug seedreamwill also echoOAuth explicitly disabled, indicating it is effective.
¶ Project-level: Effective only for the current project
File location: opencode.json in the current project root directory, which will override the global configuration. Suitable for team sharing, single repository customization, or temporarily enabling a specific MCP in a certain project.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"seedream": {
"type": "remote",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}" }
}
}
}
If the project-level opencode.json will be submitted to Git, please ensure to use the {env:ACEDATACLOUD_API_KEY} placeholder instead of the real token to avoid leakage.
💡 If the
.envin Shell is not explicitlyexported, you need to useset -a && source .env && set +ato pass the variables to the OpenCode process; otherwise,opencode debug configwill show"Authorization": "Bearer "(placeholder not resolved).
¶ Verify Connection
After configuration, run:
opencode mcp list
opencode mcp debug seedream
Seeing seedream connected indicates a successful handshake. If it fails, check whether ACEDATACLOUD_API_KEY has been exported, whether oauth is set to false, and whether Authorization includes the Bearer prefix. The model and tool schema will continue to change, so please select models that support native tool calls from the current directory.
¶ Typical Scenarios
After configuration, you can directly call using natural language in the OpenCode session without switching to /mcp:
Generate an image with a Chinese sentence
Generate a Spring Festival promotional poster: red background, golden fortune character, milk tea shop products, square
Edit text on an existing image
Change "v1.0" on this poster to "v2.0", keeping everything else the same
Generate a product image with a white background
Generate a product image with a white background: a minimalist style table lamp, viewed from a 45-degree angle
¶ Tool List
The table below lists the main tools; you can obtain the current complete list by using curl -X POST https://seedream.mcp.acedata.cloud/mcp -H 'Authorization: Bearer <token>' -H 'Accept: application/json' -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}':
| Tool | Description |
|---|---|
| seedream_generate_image | Generate images from text |
| seedream_edit_image | Edit existing images (change text, change elements) |
