How to Use the Comet ML MCP in Mastra AI
Build resilient ML ops workflows in Mastra AI using direct tools for Comet ML experiment control.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Comet ML MCP to Mastra AI
Create your Vinkius account to connect Comet ML 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.
Automated Comet ML experiment branching
Use `list_experiments` to trigger logic based on specific run limits. Your Mastra agents decide the next step based on the routing arrays returned. If an experiment hits a threshold, the workflow branches automatically. You handle the failure or success states without writing custom glue code.
Parameter inspection for logic gates
Call `get_experiment_params` to pull API taxonomy types into your agent memory. You build conditional rules that depend on actual run properties. This creates a tight loop between your ML experiments and your automation logic. The agent knows exactly what the model state is before moving forward.
Reliable workflow integration
The MCP server allows Mastra to perform structural extractions of your projects. You query `list_projects` to define the scope of your agent's work. It supports retries on failed tool calls. If the connection to your ML logs drops, the agent waits and tries again.
Set up Comet ML 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 Comet ML 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: "comet-ml-mcp-client",
servers: {
"comet-ml-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Comet ML Agent",
model: openai("gpt-4o"),
instructions: "You have access to Comet ML tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Comet ML 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 Comet ML. 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 Comet ML MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Comet ML MCP today
We host it, we monitor it, we maintain it. You just paste one token.