OpenCode MCP Overview
OpenCode itself is good at reading code, modifying files, running commands, and explaining errors; MCP allows it to continue calling external tools within the same terminal session. Ace Data Cloud has made capabilities like music, images, videos, search, and short links into a managed remote MCP Server, so you don't need to start services locally or maintain different accounts for each tool.
This article serves as an overview entry, focusing on helping you determine: what OpenCode MCP can do, which service to connect to first, and where to find detailed tutorials for each service. Specific configuration writing, Token acquisition, and the differences between global and project locations will be elaborated in the following articles for each individual service.
If your OpenCode cannot call the model properly, please first refer to the OpenCode Terminal Configuration Tutorial. If you want to directly connect to Claude Code instead of OpenCode, please refer to the Claude Code MCP Overview.
¶ Why Connect MCP in OpenCode
OpenCode is a fully open-source terminal programming Agent, and its strengths lie in "native terminal experience + interchangeable models." After integrating MCP, it can complete the long list of tasks that originally required switching between browsers and tools, such as "writing code → supplementing README with images → creating release materials → researching reference materials → shortening links for sharing," all within the terminal session.
Compared to IDE-like tools, OpenCode is more suitable for:
- SSH remote development scenarios (MCP can be fully used without a GUI)
- Using scripts/CI to integrate MCP calls into automated workflows
- Engineers who prefer keyboard flow and do not want plugins obstructing their screen
¶ What MCP Servers Does Ace Data Cloud Provide
One Ace Data Cloud API Token can use all the following MCP Servers. You can connect to just one or combine multiple according to your workflow.
| MCP Server | Type | Main Capabilities | Tutorial |
|---|---|---|---|
| Suno | AI Music | Writing songs, composing, lyrics, covers, continuations, vocal separation | View Tutorial |
| Flux | AI Drawing | Quick image generation, commercial-grade images, Kontext image editing | View Tutorial |
| Seedream | AI Drawing | Chinese prompt image generation, product images, posters, image editing | View Tutorial |
| NanoBanana | AI Image Editing | Product background change, virtual try-on, consistency editing for people/objects | View Tutorial |
| Luma | AI Video | Text-to-video, image-to-video, video extension, frame control | View Tutorial |
| Veo | AI Video | Google Veo videos, native audio, 1080p / 4K | View Tutorial |
| Seedance | AI Video | Action videos, short videos, dubbing, vertical materials | View Tutorial |
| Google Search | Real-time Search | Google web, images, news, maps, video search | View Tutorial |
| ShortURL | Efficiency Tool | Long link to short link, batch short links, sharing link organization | View Tutorial |
¶ Recommended Selection
If you just want to confirm that MCP can run, it is recommended to start with Google Search MCP or ShortURL MCP: quick calls, intuitive results, and low cost. When creating content and marketing materials, you can choose one image service from Flux / Seedream / NanoBanana; connect to Luma / Veo / Seedance when video is needed; and connect to Suno for music or BGM.
¶ Where to Write Configuration
OpenCode uses the same opencode.json to describe Provider and MCP. The two locations only differ in priority:
- Global:
~/.config/opencode/opencode.json, shared by all projects, suitable for "my own machine, configured once." - Project-level:
opencode.jsonin the current project root directory, effective only for that project, will override global settings, suitable for team sharing or single repository customization.
Regardless of where it is placed, the structure is the same, with each service having a segment of mcp.<name> configuration:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"shorturl": {
"type": "remote",
"url": "https://shorturl.mcp.acedata.cloud/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}" }
}
}
}
Field descriptions:
| Field | Description |
|---|---|
type |
Fixed as remote, representing a remote hosted MCP Server |
url |
The corresponding service address provided by AceData |
enabled |
Whether to enable, change to false to temporarily disable a certain MCP |
oauth |
Must be explicitly set to false. AceData MCP uses Bearer Token authentication, not OAuth; if this line is not written, OpenCode will treat 401 as an OAuth challenge, ultimately reporting SSE error: Non-200 status code (401) for opencode mcp list |
headers.Authorization |
Bearer <token>, it is recommended to use the placeholder {env:ACEDATACLOUD_API_KEY} to reference the environment variable |
{env:ACEDATACLOUD_API_KEY} allows OpenCode to read the Token from the environment variable at startup, avoiding writing the real Token directly into the file. It is recommended to export ACEDATACLOUD_API_KEY="yourToken" in ~/.zshrc / ~/.bashrc. If the Token is written in a .env file without export, it needs to be exported to the OpenCode process using set -a && source .env && set +a, otherwise opencode debug config will show "Authorization": "Bearer " (placeholder not resolved).
The configuration example will not write the complete Token, but will display it in a form similar to YOUR_ACEDATACLOUD_API_KEY. Please keep the real Token only in your local configuration or private environment variables.
¶ Verify Connection
After configuration, run:
opencode mcp list
opencode mcp debug shorturl
The target service shows connected, which indicates a successful handshake. In case of failure, check whether ACEDATACLOUD_API_KEY has been exported, whether oauth is set to false, and whether Authorization includes the Bearer prefix.
The model directory and tool schema will continue to change; select models that support native tool calls from the current model list, and only enable the MCPs required for the tasks. Do not fix the number of models or tools based on historical version snapshots.
¶ Common Workflows
¶ Write README and Generate Images in Terminal
Let OpenCode first understand the README draft of your new feature, then call Flux / Seedream / NanoBanana to generate a banner, and finally paste the image URL back into the README.
¶ Troubleshoot Issues on Remote Server + Research
After SSHing into the server, start opencode, allowing it to combine local logs and Google search MCP to find matching community posts or issues, then use ShortURL MCP to compress the relevant links into short links and send them to the group.
¶ One-stop Release Material
Let OpenCode use Suno to write a 30-second BGM based on the CHANGELOG, use Veo to generate a preview video, and use Flux to produce a main visual, all without leaving the terminal.
¶ Next Steps
Select a service from the table above to enter a separate tutorial, and first run a single service in the project opencode.json. After confirming that opencode mcp list shows ✓ connected, decide whether to upgrade it to the global ~/.config/opencode/opencode.json, allowing all projects to call it directly.
