wandb-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wandb-mcp-serverShow top 3 runs by accuracy in wandb/demo-project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
title: Weights & Biases MCP Server emoji: ๐ช๐ colorFrom: yellow colorTo: gray sdk: docker app_file: app.py pinned: false
W&B MCP Server
Query and analyze your Weights & Biases data using natural language through the Model Context Protocol.
What Can This Server Do?
Analyze Experiments | Debug Traces | Create Reports | Get Help |
Show me the top 5 runs by eval/accuracy in wandb-smle/hiring-agent-demo-public? | How did the latency of my hiring agent predict traces evolve over the last months? | Generate a wandb report comparing the decisions made by the hiring agent last month | How do I create a leaderboard in Weave - ask SupportBot? |
New tools for auto-clustering coming soon: "Go through the last 100 traces of my last training run in grpo-cuda/axolotl-grpo and tell me why rollout traces of my RL experiment were bad sometimes?"
Tool | Description | Example Query |
query_wandb_tool | Query W&B runs, metrics, and experiments | "Show me runs with loss < 0.1" |
query_weave_traces_tool | Analyze LLM traces and evaluations | "What's the average latency?" |
count_weave_traces_tool | Count traces and get storage metrics | "How many traces failed?" |
create_wandb_report_tool | Create W&B reports programmatically | "Create a performance report" |
query_wandb_entity_projects | List projects for an entity | "What projects exist?" |
query_wandb_support_bot | Get help from W&B documentation | "How do I use sweeps?" |
โ Provide your W&B project and entity name
LLMs are not mind readers, ensure you specify the W&B Entity and W&B Project to the LLM.
โ Avoid asking overly broad questions
Questions such as "what is my best evaluation?" are probably overly broad and you'll get to an answer faster by refining your question to be more specific such as: "what eval had the highest f1 score?"
โ Ensure all data was retrieved
When asking broad, general questions such as "what are my best performing runs/evaluations?" it's always a good idea to ask the LLM to check that it retrieved all the available runs. The MCP tools are designed to fetch the correct amount of data, but sometimes there can be a tendency from the LLMs to only retrieve the latest runs or the last N runs.
Quick Start
We recommend using our hosted server at https://mcp.withwandb.com - no installation required!
๐ Get your API key from wandb.ai/authorize
Cursor
Open Cursor Settings (
โ,orCtrl,)Navigate to Features โ Model Context Protocol
Click "Install from Registry" or "Add MCP Server"
Search for "wandb" or enter:
Name:
wandbURL:
https://mcp.withwandb.com/mcpAPI Key: Your W&B API key
For local installation, see Option 2 below.
Claude Desktop
Add to your Claude config file:
# macOS
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Windows
notepad %APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"wandb": {
"url": "https://mcp.withwandb.com/mcp",
"apiKey": "YOUR_WANDB_API_KEY"
}
}
}Restart Claude Desktop to activate.
For local installation, see Option 2 below.
OpenAI Response API
from openai import OpenAI
import os
client = OpenAI()
resp = client.responses.create(
model="gpt-4o",
tools=[{
"type": "mcp",
"server_url": "https://mcp.withwandb.com/mcp",
"authorization": os.getenv('WANDB_API_KEY'),
}],
input="How many traces are in my project?"
)
print(resp.output_text)Note: OpenAI's MCP is server-side, so localhost URLs won't work. For local servers, see Option 2 with ngrok.
Gemini CLI
# Set your API key
export WANDB_API_KEY="your-api-key-here"
# Install the extension
gemini extensions install https://github.com/wandb/wandb-mcp-serverThe extension will use the configuration from gemini-extension.json pointing to the hosted server.
For local installation, see Option 2 below.
Mistral LeChat
In LeChat settings, add an MCP server:
URL:
https://mcp.withwandb.com/mcpAPI Key: Your W&B API key
For local installation, see Option 2 below.
VSCode
# Open settings
code ~/.config/Code/User/settings.json{
"mcp.servers": {
"wandb": {
"url": "https://mcp.withwandb.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_WANDB_API_KEY"
}
}
}
}For local installation, see Option 2 below.
General Installation Guide
The hosted server provides a zero-configuration experience with enterprise-grade reliability. This server is maintained by the W&B team, automatically updated with new features, and scales to handle any workload. Perfect for teams and production use cases where you want to focus on your ML work rather than infrastructure.
Using the Public Server
The easiest way is using our hosted server at https://mcp.withwandb.com.
Benefits:
โ Zero installation
โ Always up-to-date
โ Automatic scaling
โ No maintenance
Simply use the configurations shown in Quick Start.
Run the MCP server locally for development, testing, or when you need full control over your data. The local server runs directly on your machine with STDIO transport for desktop clients or HTTP transport for web-based clients. Ideal for developers who want to customize the server or work in air-gapped environments.
Manual Configuration
Add to your MCP client config:
{
"mcpServers": {
"wandb": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/wandb/wandb-mcp-server",
"wandb_mcp_server"
],
"env": {
"WANDB_API_KEY": "YOUR_API_KEY"
}
}
}
}Prerequisites
Python 3.10+
uv (recommended) or pip
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | shInstallation
# Using uv (recommended)
uv pip install wandb-mcp-server
# Or from GitHub
pip install git+https://github.com/wandb/wandb-mcp-serverClient-Specific Installation Commands
Cursor (Project-only)
Enable the server for a specific project:
uvx --from git+https://github.com/wandb/wandb-mcp-server add_to_client --config_path .cursor/mcp.json && uvx wandb loginCursor (Global)
Enable the server for all Cursor projects:
uvx --from git+https://github.com/wandb/wandb-mcp-server add_to_client --config_path ~/.cursor/mcp.json && uvx wandb loginWindsurf
uvx --from git+https://github.com/wandb/wandb-mcp-server add_to_client --config_path ~/.codeium/windsurf/mcp_config.json && uvx wandb loginClaude Code
claude mcp add wandb -- uvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_server && uvx wandb loginWith API key:
claude mcp add wandb -e WANDB_API_KEY=your-api-key -- uvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_serverClaude Desktop
uvx --from git+https://github.com/wandb/wandb-mcp-server add_to_client --config_path "~/Library/Application Support/Claude/claude_desktop_config.json" && uvx wandb loginTesting with ngrok (for server-side clients)
For clients like OpenAI and LeChat that require public URLs:
# 1. Start HTTP server
uvx wandb-mcp-server --transport http --port 8080
# 2. Expose with ngrok
ngrok http 8080
# 3. Use the ngrok URL in your client configurationNote: These utilities are inspired by the OpenMCP Server Registry add-to-client pattern.
Deploy your own W&B MCP server for team-wide access or custom infrastructure requirements. This option gives you complete control over deployment, security, and scaling while maintaining compatibility with all MCP clients. Perfect for organizations that need on-premises deployment or want to integrate with existing infrastructure.
Using Docker
docker run -p 7860:7860 \
-e WANDB_API_KEY=your-server-key \
ghcr.io/wandb/wandb-mcp-serverFrom Source
# Clone repository
git clone https://github.com/wandb/wandb-mcp-server
cd wandb-mcp-server
# Install and run
uv pip install -r requirements.txt
uv run app.pyDeploy to HuggingFace Spaces
Fork wandb-mcp-server
Create new Space on Hugging Face
Choose "Docker" SDK
Connect your fork
Add
WANDB_API_KEYas secret (optional)
Server URL: https://YOUR-SPACE.hf.space/mcp
More Information
Documentation & Testing
๐ Documentation: docs/ - Development and debugging guides
๐งช Testing Guide: tests/README.md - Comprehensive testing instructions
๐ Load Testing: tests/load_test.py - Performance and stress testing
Key Resources
W&B Docs: docs.wandb.ai
Weave Docs: weave-docs.wandb.ai
MCP Spec: modelcontextprotocol.io
Example Code
from openai import OpenAI
from dotenv import load_dotenv
import os
load_dotenv()
client = OpenAI()
resp = client.responses.create(
model="gpt-4o", # Use gpt-4o for larger context window
tools=[
{
"type": "mcp",
"server_label": "wandb",
"server_description": "Query W&B data",
"server_url": "https://mcp.withwandb.com/mcp",
"authorization": os.getenv('WANDB_API_KEY'),
"require_approval": "never",
},
],
input="How many traces are in wandb-smle/hiring-agent-demo-public?",
)
print(resp.output_text)Support
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/caentzminger/wandb-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server