OpenCode MCP Overview

OpenCode is proficient in reading code, modifying files, running commands, and explaining errors; MCP allows it to continue calling external tools within the same terminal session. AceData 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 subsequent 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 entire workflow of "writing code → supplementing README with images → creating release materials → searching reference materials → shortening links for sharing" all within the terminal session, which would otherwise require switching between browsers and tools.

Compared to IDE-like tools, OpenCode is more suitable for:

  • SSH remote development scenarios (MCP can be fully utilized 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 screens

What MCP Servers Does AceData Cloud Provide

One AceData Cloud API Token can access all the following MCP Servers. You can connect to just one or combine multiple according to your workflow.

MCP Server Domain Suitable for What Number of Tools OpenCode Tutorial
Suno AI Music Writing songs, composing, lyrics, covers, continuations, vocal separation 35 View Tutorial
Flux AI Drawing Quick image generation, commercial-grade images, Kontext image editing 6 View Tutorial
Seedream AI Drawing Chinese prompt image generation, product images, posters, image editing 6 View Tutorial
NanoBanana AI Image Editing Product background change, virtual fitting, character/object consistency editing 4 View Tutorial
Luma AI Video Text-to-video, image-to-video, video extension, frame control 8 View Tutorial
Veo AI Video Google Veo videos, native audio, 1080p / 4K 12 View Tutorial
Seedance AI Video Action videos, short videos, dubbing, vertical materials 7 View Tutorial
Google Search Real-time Search Google web, image, news, map, video search 11 View Tutorial
ShortURL Efficiency Tool Long link to short link, batch short links, share link organization 4 View Tutorial

The "Number of Tools" in the table was obtained through opencode mcp list + JSON-RPC tools/list as of 2026-05-31, with a total of 109 tools exposed across 10 MCP Servers.

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 an image service from Flux / Seedream / Midjourney; if you need videos, then connect to Luma / Veo / Seedance; if you need music or BGM, connect to Suno.

Where to Write Configuration

OpenCode uses the same opencode.json to describe providers 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.json in 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 omitted, OpenCode will treat 401 as an OAuth challenge, ultimately resulting in opencode mcp list reporting SSE error: Non-200 status code (401)
headers.Authorization Bearer <token>, it is recommended to use the {env:ACEDATACLOUD_API_KEY} placeholder 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 add 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). Configuration examples will not display the complete Token, but will use a format like 357265014ad145fc8ab2..... The real Token should only be stored in your local configuration or private environment variables.

Real Connectivity Verification

The following results come from OpenCode 1.15.13, where 10 AceData MCPs were simultaneously written to opencode.json in an isolated temporary directory, and then opencode mcp list was run to obtain the results. The Token has been redacted (357265014ad145fc8ab2....), and the temporary configuration has been deleted.

$ opencode --version
1.15.13

$ opencode mcp list

┌  MCP Servers
│
●  ✓ suno connected
│      https://suno.mcp.acedata.cloud/mcp
●  ✓ midjourney connected
│      https://midjourney.mcp.acedata.cloud/mcp
●  ✓ flux connected
│      https://flux.mcp.acedata.cloud/mcp
●  ✓ seedream connected
│      https://seedream.mcp.acedata.cloud/mcp
●  ✓ nanobanana connected
│      https://nanobanana.mcp.acedata.cloud/mcp
●  ✓ luma connected
│      https://luma.mcp.acedata.cloud/mcp
●  ✓ veo connected
│      https://veo.mcp.acedata.cloud/mcp
●  ✓ seedance connected
│      https://seedance.mcp.acedata.cloud/mcp
●  ✓ serp connected
│      https://serp.mcp.acedata.cloud/mcp
●  ✓ shorturl connected
│      https://shorturl.mcp.acedata.cloud/mcp
│
└  10 server(s)

Debugging a single MCP connection:

opencode mcp debug shorturl

Model Selection Practical Suggestions

To truly perform "dialogue + call MCP tools" together in OpenCode, model selection is crucial. Below are the conclusions drawn from actual testing with AceData Token:

Scenario Recommended Model Description
Dialogue + Many MCP Tools acedatacloud/gpt-5-mini or acedatacloud/gpt-5 Actual tests can successfully issue tool calls, such as having gpt-5 call shorturl_create to directly return https://surl.id/r/1uNdf1MEkM short link
Pure Dialogue / Reading Code / Not Calling MCP acedatacloud/claude-sonnet-4-6, acedatacloud/claude-haiku-4-5-20251001 The Claude series performs better on natural language tasks
Turn off MCP, Only Planning acedatacloud/claude-opus-4-7 Suitable for deep thinking on architecture and refactoring solutions

Known Limitations: When multiple MCPs are enabled simultaneously in opencode.json, Claude series models are prone to returning Improperly formed request upstream. The reason is that the JSON Schema of some MCP tools (such as the use of anyOf) exceeds the strict validation range of the Anthropic interface. To allow Claude to engage in dialogue + call tools simultaneously, it is recommended to first change the enabled status of temporarily unused MCPs to false in opencode.json, keeping only the necessary few; or directly switch to OpenAI series models as the dialogue model.

Common Workflows

Writing README and Generating Images in Terminal

Let OpenCode first understand the README draft of your new feature, then call Midjourney / Flux / Seedream to generate a banner, and finally paste the image URL back into the README.

Remote Server Troubleshooting + 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, and then use ShortURL MCP to compress the relevant links into short links to send to the group.

One-stop Release Material

Let OpenCode use the CHANGELOG to write a 30-second BGM with Suno, generate a preview video with Veo, and produce a main visual with Flux, all without leaving the terminal.

Next Steps

Select a service from the table above to enter a separate tutorial, first running 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.