4,500+ servers built on MCP Fusion
Vinkius
Weights & Biases logo
Vinkius
Mastra AI logo

How to Use the Weights & Biases MCP in Mastra AI

Automate ML operations and manage W&B resources using the Mastra AI agent framework.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Weights & Biases MCP on Cursor AI Code Editor MCP Client Weights & Biases MCP on Claude Desktop App MCP Integration Weights & Biases MCP on OpenAI Agents SDK MCP Compatible Weights & Biases MCP on Visual Studio Code MCP Extension Client Weights & Biases MCP on GitHub Copilot AI Agent MCP Integration Weights & Biases MCP on Google Gemini AI MCP Integration Weights & Biases MCP on Lovable AI Development MCP Client Weights & Biases MCP on Mistral AI Agents MCP Compatible Weights & Biases MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
Mastra AI

Connect Weights & Biases MCP to Mastra AI

Create your Vinkius account to connect Weights & Biases 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.

GDPR Free for Subscribers

Discovering W&B Resources for Workflows

To start a workflow, you first need to locate the right project. Use `list_wandb_projects` to get all accessible projects in your W&B account. This output allows your agent framework to branch logic based on which resource is available. The Mastra AI client then knows exactly where to look for artifacts or reports, making complex multi-step workflows reliable.

Analyzing Run Details for Decision Making

When a workflow hits a decision point, it needs metrics. The `get_run_details` tool fetches full run data, including summary performance and config details. Your Mastra AI agent can read these results to decide if the next step should be retrying or failing. This is critical for building robust workflows that handle failure gracefully based on W&B's actual output.

Managing Sweeps and Runs in Automation

You can systematically check both runs (`list_project_runs`) and hyperparameter sweeps (`list_project_sweeps`). These tools give the agent a complete picture of experimental history within a W&B project. The Mastra AI framework uses this data to ensure that before deploying, all necessary optimization steps have been completed and documented.

Setup guide

Set up Weights & Biases MCP in Mastra AI

Prerequisites

  • Node.js 18+ and a TypeScript project
  • @mastra/mcp + @mastra/core packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run npm install @mastra/mcp @mastra/core plus your preferred model provider (e.g. @ai-sdk/openai).

  2. 2

    Configure the MCPClient

    Create an MCPClient with your Vinkius endpoint as a URL object. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Discover and inject tools

    Call mcpClient.listTools() and spread the result into your agent's tools object. All Weights & Biases tools become native Mastra tools.

  4. 4

    Run with any model

    Swap openai("gpt-4o") for any AI SDK-compatible provider. Call agent.generate() and the agent routes tool calls through MCP automatically.

agent.ts
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";

const mcpClient = new MCPClient({
  id: "weights-biases-mcp-client",
  servers: {
    "weights-biases-mcp": {
      url: new URL(
        "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
      ),
    },
  },
});

const agent = new Agent({
  name: "Weights & Biases Agent",
  model: openai("gpt-4o"),
  instructions: "You have access to Weights & Biases tools.",
  tools: {
    ...(await mcpClient.listTools()),
  },
});

const result = await agent.generate(
  "List recent Weights & Biases 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 Weights & Biases. 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 Weights & Biases MCP in Mastra AI

Just call `list_wandb_projects`. This returns a comprehensive list of every project under your W&B entity. The agent framework uses this initial data to scope the entire subsequent workflow.
The server handles metadata like run IDs, artifact names, and project configurations. It processes structured records—not raw logs—which is ideal for automated decision-making within complex workflows.
Yes. The `list_project_runs` tool retrieves every run ID from a specified W&B project. This allows the agent to iterate through the entire history, which is necessary for comprehensive auditing.
The `list_project_reports` tool fetches all saved analysis report names from a W&B project. This helps the agent confirm if required documentation exists before proceeding to deployment.
The server touches metadata such as artifact names and project configurations. Because the Mastra AI framework is building complex automated operations, ensure your API credentials limit access only to essential W&B projects.

Start using the Weights & Biases MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 6 tools

We've already built the connector for Weights & Biases. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 6 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.