How to Use the Deepgram MCP in Mastra AI
Build failure-proof audio workflows. Transcribe, generate speech, and manage keys with Deepgram tools inside your Mastra AI agents.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Deepgram MCP to Mastra AI
Create your Vinkius account to connect Deepgram 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.
Create Conditional Audio Workflows
This server's tools plug directly into Mastra AI's workflow engine. Your agent can use `transcribe_audio_url` to get text from an audio file, and then use Mastra's logic to decide the next step. If the transcript contains 'urgent', it can trigger another action. If not, it can archive the file. This isn't just a simple API call. You're building stateful, multi-step jobs. For example: transcribe a customer service call, check the text for negative sentiment, and if found, automatically create a ticket in your helpdesk. Mastra handles the branching logic for you.
Reliable Deepgram Account Automation
Use the `get_project_usage` tool to have an agent monitor your Deepgram API credits. Mastra's real power here is its built-in resilience. If the API call to check your usage fails for some reason, Mastra automatically retries with exponential backoff. You don't need to write any error-handling code for that. Your agent will either get the data or fail gracefully after multiple attempts, letting you build monitoring that you can actually trust. This MCP Server makes your backend agents more robust.
Chain Tools for Complex Tasks
Mastra AI excels at chaining operations. An agent can process a batch of data, generate a summary, and then immediately call the `convert_text_to_speech` tool to turn that summary into an audio report. Because Mastra manages the state between steps, you can build sophisticated pipelines. The output of one Deepgram tool becomes the input for the next part of your workflow, whether that's another tool call or some custom code.
Set up Deepgram 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 Deepgram 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: "deepgram-alternative-mcp-client",
servers: {
"deepgram-alternative-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Deepgram Agent",
model: openai("gpt-4o"),
instructions: "You have access to Deepgram tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Deepgram 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 Deepgram. 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 Deepgram MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Deepgram MCP today
We host it, we monitor it, we maintain it. You just paste one token.