Spaces:
Paused
title: Weights & Biases MCP Server
emoji: πͺπ
colorFrom: yellow
colorTo: gray
sdk: docker
app_file: app.py
pinned: false
Weights & Biases MCP Server on HuggingFace Spaces
A Model Context Protocol (MCP) server for querying Weights & Biases data, hosted on HuggingFace Spaces.
This server allows MCP clients to:
- π Query W&B Models runs and sweeps
- π Query W&B Weave traces, evaluations and datasets
- π€ Query wandbot, the W&B support agent
- π Write text and charts to W&B Reports
π Quick Start - Use This Server Directly!
No Setup Required! π
You can use this server immediately with your own W&B API key:
- Get your W&B API key from wandb.ai/authorize
- Configure your MCP client with:
- Server URL:
https://niware-wandb-mcp-server.hf.space/mcp - Authentication: Your W&B API key as Bearer token
- Server URL:
- Start querying your W&B data!
That's it! No server configuration, no duplication needed. Each user provides their own API key, ensuring secure access to their own W&B projects.
π₯οΈ Using with MCP Clients
Mistral LeChat
- Go to Settings β Custom MCP Connectors
- Add a new connector:
- Server URL:
https://niware-wandb-mcp-server.hf.space/mcp - Authentication: Choose "API Key Authentication"
- API Key: Your W&B API key from wandb.ai/authorize
- Server URL:
Cursor
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"wandb": {
"transport": "http",
"url": "https://niware-wandb-mcp-server.hf.space/mcp",
"headers": {
"Authorization": "Bearer YOUR_WANDB_API_KEY",
"Accept": "application/json, text/event-stream"
}
}
}
}
Claude Desktop / Claude Code
Configure in your MCP settings with the server URL and Bearer token authentication.
π§ Available MCP Tools
W&B Models
query_wandb_tool: Execute GraphQL queries against W&B experiment tracking data
W&B Weave
query_weave_traces_tool: Query Weave evaluations and traces with filtering and paginationcount_weave_traces_tool: Count traces matching filters without returning data
Support & Reports
query_wandb_support_bot: Get help from wandbot, the W&B support agentcreate_wandb_report_tool: Create W&B Reports with markdown and visualizationsquery_wandb_entity_projects: List available W&B entities and projects
π Example Queries
How many openai.chat traces are in my wandb-team/my-project weave project?
Show me the latest 10 runs from my experiment tracking project and create a report with the results.
What's the best performing model in my latest sweep? Plot the results.
π» Run Locally (Optional)
Want to run your own instance or develop locally? Check out the main repository:
# Install and run from source
git clone https://github.com/wandb/wandb-mcp-server
cd wandb-mcp-server
uv run src/wandb_mcp_server/server.py --transport http
See the GitHub repository for installation instructions for various MCP clients.
π Troubleshooting
Connection Issues?
- Verify your API key: Ensure it's correctly copied from wandb.ai/authorize
- Check the endpoint: Must include
/mcpsuffix:https://niware-wandb-mcp-server.hf.space/mcp - Headers required: Include both
AuthorizationandAcceptheaders as shown above
Query Tips
- Always specify your W&B entity and project name in queries
- Be specific rather than overly broad in your questions
- Verify you have access to the projects you're querying
π Security
- Your API key is never stored - It's only used transiently for your requests
- Each user is isolated - Your key only accesses your W&B data
- No server configuration needed - The server doesn't have its own W&B access
- Industry-standard Bearer tokens - Same pattern as GitHub, OpenAI, etc.
π Resources
- Model Context Protocol Documentation
- Weights & Biases Documentation
- W&B Weave Documentation
- Source Code Repository
- Get Your W&B API Key
π License
This project is licensed under the MIT License. See the GitHub repository for details.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference