How to Use the Volcengine Speech Synthesis MCP in Mastra AI
Build complex audio workflows with Mastra AI using Volcengine Speech Synthesis.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Volcengine Speech Synthesis MCP to Mastra AI
Create your Vinkius account to connect Volcengine Speech Synthesis to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Run advanced TTS processes via the MCP Server.
The `synthesize_speech` tool is your workhorse. It lets you define specific voice parameters—speed, volume, and style—while handling multiple languages (Chinese, English, Japanese). You can automatically trigger this synthesis step within a multi-step workflow. This means if one part of your business process fails, the next step can still attempt to generate necessary audio content for reporting or user notification.
Create proprietary voices using Volcengine Speech Synthesis.
You'll use `create_custom_voice` to train a unique brand voice. Just upload 10-50 high-quality audio samples, wait for the training period (1-3 days), and then reference that new `custom voice_type` in subsequent synthesis calls. Your agent can now generate consistent audio across all user interactions, making your application sound professional from start to finish.
Manage complex multi-part text generation.
If the content needs are extensive—think full documentation or an audiobook chapter—use `synthesize_long_text`. This tool handles texts over 1024 characters, preventing workflow breaks that happen with simple API calls. It ensures your agent can process and generate long-form audio assets without needing to break the content up manually.
Set up Volcengine Speech Synthesis MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All Volcengine Speech Synthesis tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "volcengine-speech-synthesis-mcp-client",
servers: {
"volcengine-speech-synthesis-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Volcengine Speech Synthesis Agent",
model: openai("gpt-4o"),
instructions: "You have access to Volcengine Speech Synthesis tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Volcengine Speech Synthesis transactions"
);
console.log(result.text); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Volcengine Speech. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Volcengine Speech Synthesis MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Volcengine Speech Synthesis MCP today
We host it, we monitor it, we maintain it. You just paste one token.