- Cursor
- Visual Studio Code (VS Code)
- Claude Code
- Codex
- Gemini CLI
- Mistral LeChat
- Claude Desktop
W&B MCP Server capabilities
You can use the MCP server to analyze experiments, debug traces, create reports, and get help with integrating your applications with W&B features. The following example prompts demonstrate some of the types of tasks your agent can do when connected to the MCP server:- Show me the top 5 runs by eval/accuracy in your-team-name/your-project-name?
- How did the latency of my hiring agent predict traces evolve over the last few 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?
Available tools
The W&B MCP server gives your agents access to the following tools:| 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?” |
Use W&B’s remote MCP server
W&B provides a hosted MCP server athttps://mcp.withwandb.com that requires no installation. The following instructions show how to configure the hosted server with various AI assistants and IDEs.
Prerequisites
- A W&B Dedicated Cloud deployment.
- A W&B API key. You can create a new one at wandb.ai/authorize.
- Set your key as an environment variable named
WANDB_API_KEY.
Configure your MCP client
Select the tab containing your MCP client’s instructions:- Cursor
- Claude Code
- Codex
- OpenAI
- Gemini CLI
- Mistral LeChat
You can install the W&B server in Cursor automatically using a one-click installation link (requires adding
Bearer <your-wandb-api-key> in the Authorization field), or manually using the following instructions:- On macOS, open the Cursor menu, select Settings, and then select Cursor Settings. On Windows or Linux, open the Preferences menu, select Settings, and then select Cursor Settings.
- From the Cursor Settings menu, select Tools and MCP. This opens the Tools menu.
- In the Installed MCP Servers section, select Add Custom MCP. This opens the
mcp.jsonconfiguration file. - In the configuration file, in the
mcpServersJSON object, add the followingwandbobject:
- Restart Cursor to make the changes take effect.
- Verify that the chat agent has access to the W&B MCP server by entering the prompt “List the projects in my W&B account.”
Set up a local version of the W&B MCP server
If you need to run the MCP server locally for W&B Self-Managed deployments, development, testing, or air-gapped environments, you can install and run it on your machine.Prerequisites
- A W&B API key. You can create a new one at wandb.ai/authorize.
- Set your key as an environment variable named
WANDB_API_KEY. - Set the
WANDB_BASE_URLenvironment variable if you are using W&B Self-Managed. - Python 3.10 or higher
- uv (recommended) or pip
Install and configure the MCP server
To install the MPC server locally: To install the W&B MCP server on your local machine, use one of the following installation commands:- uv
- pip
- Install directly from GitHub
- Cursor
- VS Code
- Claude Code
- Codex
- Claude Desktop
Add the following to your
mcp.json configuration:ngrok, update your MCP client configuration to use the ngrok URL.
Usage tips
- Provide your W&B project and entity name: Specify the W&B entity and project in your queries for accurate results.
- Avoid overly broad questions: Instead of “what is my best evaluation?”, ask “what eval had the highest f1 score?”
- Verify data retrieval: When asking broad questions like “what are my best performing runs?”, ask the assistant to confirm it retrieved all available runs.