OpenCode Integration with Veo MCP
📘 Overview: OpenCode MCP Overview →
The Google Veo series is currently the most distinctive video generation model in terms of “native audio + high resolution”—veo3 / veo31 can directly generate synchronized ambient sound and music while generating visuals, while the veo2-fast series is the most practical for “image-to-video” and “first-and-last-frame interpolation.” After connecting the Veo MCP Server in OpenCode, you can produce videos with sound in one go, saving the need for post-production audio syncing.
Veo MCP is suitable for scenarios such as product introduction videos that require native audio, film storyboard samples, and “transition animations between two design mockups.”
¶ Obtain an API Token
Before using the Veo MCP Server, you first 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, obtain your API Token, and keep it for later use.
- If you have not yet logged in or registered, you will be automatically redirected to the login page; after logging in or registering, you will automatically return to the current page.
- Confirm that the key is allowed to access the required APIs, and check the balance and limits in the console.

The API Key for general applications can be reused within its authorization scope. It is recommended to display only a masked form in documentation and screenshots, such as YOUR_ACEDATACLOUD_API_KEY; do not paste the complete Token into public repositories, Issues, screenshots, or chat records.
Want to use Claude Desktop / the Claude.ai web version to directly authorize with OAuth in one click? See the Claude.ai / Desktop tutorial for Veo MCP.
¶ Configure OpenCode
First run opencode --version. For 2.x users, set ACEDATACLOUD_API_KEY in the terminal, then run the following commands.
opencode mcp add veo --global --url https://veo.mcp.acedata.cloud/mcp --header 'Authorization=Bearer {env:ACEDATACLOUD_API_KEY}'
opencode reload
opencode mcp list
¶ OpenCode 1.x Configuration
OpenCode uses one opencode.json file to describe all MCP Servers. The file can be placed in two locations; choose one according to the “scope” below. The field structure is exactly the same in both locations; the only difference is priority.
It is strongly recommended to first write the Token to an environment variable:
export ACEDATACLOUD_API_KEY="replace with your actual Token"
Then reference it in opencode.json using the {env:ACEDATACLOUD_API_KEY} placeholder, to avoid writing the actual 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": {
"veo": {
"type": "remote",
"url": "https://veo.mcp.acedata.cloud/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}" }
}
}
}
Bearer API Key is used here.
"oauth": falsemakes OpenCode send request headers according to this configuration.
¶ Project-Level: Effective Only for the Current Project
File location: opencode.json in the root directory of the current project. For services with the same name, the definition in the project takes priority. Suitable for team sharing, single-repository customization, or temporarily enabling a certain MCP only in a specific project.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"veo": {
"type": "remote",
"url": "https://veo.mcp.acedata.cloud/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}" }
}
}
}
If the project-level opencode.json will be committed to Git, make sure to use the {env:ACEDATACLOUD_API_KEY} placeholder instead of the actual Token to avoid leaks.
Please start OpenCode from a terminal where this environment variable has already been set and exported.
¶ Verify the Connection
After configuration, run:
opencode mcp list
Seeing veo connected means the handshake was successful. If it fails, check whether ACEDATACLOUD_API_KEY has been exported, the hosted address, and whether Authorization includes the Bearer prefix. Models and tool Schemas will continue to change; please select a model from the current directory that supports native tool calling.
¶ Typical Scenarios
After configuration is complete, you can directly invoke it using natural language in an OpenCode session, without first switching to /mcp:
Image-to-Video + First and Last Frames + 1080p
Use these two design mockups as the first and last frames to generate a transition animation, then export it as 1080p
Video with Native Audio
Use veo3 to generate a video: a convenience store on a rainy night, the sound of rain on the glass door, the ding-dong of the doorbell, background light music
Video Extension
Extend this video by another 8 seconds, maintaining the same atmosphere
¶ Tool List
The following table lists commonly used tools. For complete names, see the real-time tool list of the hosted service.
| Tool | Description |
|---|---|
| veo_text_to_video | Generate video from text |
| veo_image_to_video | Generate video from images (supports first / last frames) |
| veo_get_1080p | Upgrade generated videos to 1080p |
| veo_get_1080p | Retrieve the 1080p high-definition version |
