{
  "markdown": "# W&B MCP Server\n\nQuery and analyze your Weights & Biases data using natural language through the Model Context Protocol.\n\n[![CI](https://github.com/wandb/wandb-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/wandb/wandb-mcp-server/actions/workflows/ci.yml)\n[![Eval](https://github.com/wandb/wandb-mcp-server/actions/workflows/eval.yml/badge.svg)](https://github.com/wandb/wandb-mcp-server/actions/workflows/eval.yml)\n<!-- BEGIN EVAL BADGES -->\n[![SDK](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/wandb/wandb-mcp-server/main/.badges/sdk.json)](https://wandb.ai/wandb/mcp-server-ci/weave)\n[![MCP](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/wandb/wandb-mcp-server/main/.badges/mcp.json)](https://wandb.ai/wandb/mcp-server-ci/weave)\n<!-- END EVAL BADGES -->\n\n<div align=\"center\">\n  <a href=\"https://cursor.com/en/install-mcp?name=wandb&config=eyJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9tY3Aud2l0aHdhbmRiLmNvbS9tY3AiLCJoZWFkZXJzIjp7IkF1dGhvcml6YXRpb24iOiJCZWFyZXIge3tXQU5EQl9BUElfS0VZfX0iLCJBY2NlcHQiOiJhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L2V2ZW50LXN0cmVhbSJ9fQ%3D%3D\"><img src=\"https://cursor.com/deeplink/mcp-install-dark.svg\" alt=\"Cursor\" height=\"28\"/></a>\n  <a href=\"#claude-desktop\"><img src=\"https://img.shields.io/badge/Claude-6B5CE6?logo=anthropic&logoColor=white\" alt=\"Claude\" height=\"28\"/></a>\n  <a href=\"#openai\"><img src=\"https://img.shields.io/badge/OpenAI-412991?logo=openai&logoColor=white\" alt=\"OpenAI\" height=\"28\"/></a>\n  <a href=\"#gemini-cli\"><img src=\"https://img.shields.io/badge/Gemini-4285F4?logo=google&logoColor=white\" alt=\"Gemini\" height=\"28\"/></a>\n  <a href=\"#mistral-lechat\"><img src=\"https://img.shields.io/badge/LeChat-FF6B6B?logo=mistralai&logoColor=white\" alt=\"LeChat\" height=\"28\"/></a>\n  <a href=\"#vscode\"><img src=\"https://img.shields.io/badge/VSCode-007ACC?logo=visualstudiocode&logoColor=white\" alt=\"VSCode\" height=\"28\"/></a>\n</div>\n\n---\n\n## What Can This Server Do?\n\n<details open>\n<summary><strong>Example Use Cases</strong> (click command to copy)</summary>\n\n| **Analyze Experiments** | **Debug Traces** | **Create Reports** | **Get Help** |\n|:---|:---|:---|:---|\n| 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? |\n\n*\"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?\"*\n</details>\n\n<details>\n<summary><strong>Available Tools</strong></summary>\n\n| Tool | Description | Example Query |\n|------|-------------|---------------|\n| **infer_trace_schema_tool** | Discover field names, types, and sample values | *\"What fields are in my traces?\"* |\n| **query_weave_traces_tool** | Analyze LLM traces with `detail_level` control | *\"Show failed traces with full data\"* |\n| **count_weave_traces_tool** | Count traces and get storage metrics | *\"How many traces failed?\"* |\n| **query_wandb_tool** | Query W&B runs, metrics, and experiments | *\"Show me runs with loss < 0.1\"* |\n| **get_run_history_tool** | Sampled time-series metric data | *\"Show loss curve for run abc123\"* |\n| **create_wandb_report_tool** | Create reports with markdown, charts, and panels | *\"Create a report with loss plots\"* |\n| **log_analysis_to_wandb** | Log analysis metrics to W&B as a run | *\"Log these latency stats to W&B\"* |\n| **search_wandb_docs_tool** | Search official W&B documentation | *\"How do I create a Weave scorer?\"* |\n| **query_wandb_entity_projects** | List projects for an entity | *\"What projects exist?\"* |\n| **list_registries_tool** | List model registries in an organization | *\"What registries are available?\"* |\n| **list_registry_collections_tool** | List collections within a registry | *\"What models are in the prod registry?\"* |\n| **list_artifact_versions_tool** | List versions of an artifact collection | *\"Show versions of my model artifact\"* |\n| **get_artifact_details_tool** | Get full details of an artifact version | *\"What's in model-v2 artifact?\"* |\n| **compare_artifact_versions_tool** | Diff two artifact versions | *\"Compare model v1 vs v2\"* |\n| **list_wandb_automations_tool** | List W&B Automations | *\"What automations alert on run metrics or status for my team's runs?\"* |\n| **list_wandb_integrations_tool** | List registered integrations for W&B automations (e.g. Slack, webhook) | *\"Which Slack channels can my automations target?\"* |\n\n**Read-only deployment mode:** Set `WANDB_MCP_READ_ONLY=true` to omit the two write tools,\n`create_wandb_report_tool` and `log_analysis_to_wandb`, while keeping every existing read tool.\n`query_wandb_tool` is query-only in every mode, regardless of this setting.\n\n**Weave Agents (OTel) tools** — these read the OpenTelemetry/GenAI agent-spans data plane (the **Agents** tab), which is separate from the classic Weave calls above:\n\nThese tools are disabled by default. Enable them with `WANDB_MCP_ENABLE_WEAVE_AGENT_TOOLS=true`.\n\n| Tool | Description | Example Query |\n|------|-------------|---------------|\n| **list_weave_agents_tool** | List agents with aggregated stats (invocations, tokens, duration, errors) | *\"Which agents ran this week and how many errors did each have?\"* |\n| **list_weave_agent_versions_tool** | Per-version stats for one agent | *\"Did v2 of my agent regress on latency?\"* |\n| **query_weave_agent_spans_tool** | Query individual agent/LLM/tool spans (filter by agent, model, time) | *\"Show failed tool spans for my-agent yesterday\"* |\n| **get_weave_agent_span_stats_tool** | Time-bucketed metric series (tokens, cost, latency, error rate) | *\"Plot daily token usage by agent\"* |\n| **list_weave_agent_custom_attributes_tool** | Discover custom attribute keys on agent spans | *\"What custom attributes do my agent spans have?\"* |\n| **search_weave_agents_tool** | Full-text / structured message search, grouped by conversation | *\"Find conversations mentioning refunds\"* |\n| **get_weave_agent_trace_tool** | Structured chat/trajectory view for one trace (a turn) | *\"What did the agent do in trace abc123?\"* |\n| **get_weave_agent_conversation_tool** | Multi-turn chat view for a conversation | *\"Show the whole conversation conv-42\"* |\n\n**Schema-first workflow:** Call `infer_trace_schema_tool` first to discover fields, then `query_weave_traces_tool` with precise columns and `detail_level`:\n- `\"schema\"` -- structural fields only (fast browsing)\n- `\"summary\"` -- truncated inputs/outputs (default)\n- `\"full\"` -- everything untruncated (drill into specific traces)\n\n**Chart panels:** `create_wandb_report_tool` accepts a `panels` parameter for LinePlots, BarPlots, run comparisons, custom Vega charts, and ordered report layouts. Use `panel_grid` when multiple charts should share one runset, and use `heading` plus `markdown` blocks to interleave narrative sections with charts.\n\n**Docs search:** `search_wandb_docs_tool` proxies [docs.wandb.ai](https://docs.wandb.ai) so you get data tools + documentation search from a single MCP connection. Disable with `WANDB_MCP_PROXY_DOCS=false` if you connect the docs MCP separately.\n\n</details>\n\n<details>\n<summary><strong>Usage Tips</strong> (best practices)</summary>\n\n**→ Provide your W&B project and entity name**\nLLMs are not mind readers, ensure you specify the W&B Entity and W&B Project to the LLM.\n\n**→ Avoid asking overly broad questions**\nQuestions 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?\"\n\n**→ Ensure all data was retrieved**\nWhen 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.\n\n</details>\n\n---\n\n## Quick Start\n\nWe recommend using our **hosted server** at `https://mcp.withwandb.com` - no installation required! <br>\n\n> 🔑 Get your API key from [wandb.ai/authorize](https://wandb.ai/authorize) <br>\n\n> 🌐 To connect to a **W&B Dedicated / On-Prem Instance** currently only the **local** MCP configuration can be used with an additional `WANDB_BASE_URL` env variable (the default is `api.wandb.ai`)\n\n### Cursor\n<details>\n<summary>One-click installation</summary>\n\n  * Click on the button above to automatically add the config to Cursor\n  * Then add your WANDB_API_KEY in the respective field `Bearer YOUR_API_KEY` and connect\n\nFor manual or local installation, see [Option 2](#general-installation-guide) below.\n</details>\n\n### OpenAI Response API\n<details>\n<summary>Python client setup</summary>\n\n   ```python\nfrom openai import OpenAI\nimport os\n\nclient = OpenAI()\n\nresp = client.responses.create(\n    model=\"gpt-4o\",\n    tools=[{\n        \"type\": \"mcp\",\n        \"server_url\": \"https://mcp.withwandb.com/mcp\",\n        \"authorization\": os.getenv('WANDB_API_KEY'),\n        \"server_label\": \"WandB_MCP\",\n    }],\n    input=\"How many traces are in my project?\"\n)\nprint(resp.output_text)\n```\n\n> **Note**: OpenAI's MCP is server-side, so localhost URLs won't work. For local servers, see [Option 2](#general-installation-guide) with ngrok.\n</details>\n\n### Claude Code\n<details>\n<summary>One-command installation</summary>\n\n```bash\n# run in terminal\nclaude mcp add --transport http wandb https://mcp.withwandb.com/mcp --scope user --header \"Authorization: Bearer <your-api-key-here>\"\n```\n\nFor local installation, see [Option 2](#general-installation-guide) below.\n</details>\n\n### OpenAI Codex\n<details>\n<summary>One-command installation</summary>\n\n```bash\n# run in terminal\nexport WANDB_API_KEY=<your-api-key>\ncodex mcp add wandb --url https://mcp.withwandb.com/mcp --bearer-token-env-var WANDB_API_KEY\n```\n\nFor local installation, see [Option 2](#general-installation-guide) below.\n</details>\n\n### Gemini CLI\n<details>\n<summary>One-command installation</summary>\n\n```bash\n# Set your API key\nexport WANDB_API_KEY=\"your-api-key-here\"\n\n# Install the extension\ngemini extensions install https://github.com/wandb/wandb-mcp-server\n```\n\nThe extension will use the configuration from `gemini-extension.json` pointing to the hosted server.\n\nFor local installation, see [Option 2](#general-installation-guide) below.\n</details>\n\n### VSCode\n<details>\n<summary>Settings configuration</summary>\n\n```bash\n# Open settings\ncode ~/.vscode/mcp.json # or global mcp.json file\n```\n\n```json\n{\n  \"servers\": {\n    \"wandb\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.withwandb.com/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer YOUR_WANDB_API_KEY\"\n      }\n    }\n  }\n}\n```\n\nFor local installation, see [Option 2](#general-installation-guide) below.\n</details>\n\n### Mistral Chat\n<details>\n<summary>Configuration setup</summary>\n\nMistral Le Chat is currently the best supported chat assistant for API-key based MCP authentication.\n\nUse the **Custom MCP Connector** flow:\n\n1. Open Le Chat and go to **Connectors**.\n2. Add a custom MCP connector.\n3. Set the server URL to `https://mcp.withwandb.com/mcp`.\n4. Select HTTP Bearer Token or API Key authentication.\n5. Paste your W&B API key from [wandb.ai/authorize](https://wandb.ai/authorize).\n\nIf the UI asks for a token value, paste the raw W&B API key. If it asks for the full `Authorization` header value, use `Bearer <your-wandb-api-key>`.\n\nIf adding the W&B connector from the Le Chat connector directory returns an `integrations.addIntegrationFromStore` 500 error, use the Custom MCP Connector flow above. That error happens in Mistral's connector-store add flow before Le Chat reaches the W&B MCP endpoint.\n</details>\n\n### Claude Desktop\n<details>\n<summary>Configuration setup</summary>\n\nAdd to your Claude config file. Claude desktop currently doesn't support remote MCPs to be added so we're adding the local MCP. Be careful to add the full path to `uv` for the command because Claude Desktop potentially doesn't find your `uv` installation otherwise.\n\n```bash\n# macOS\nopen ~/Library/Application\\ Support/Claude/claude_desktop_config.json\n\n# Windows\nnotepad %APPDATA%\\Claude\\claude_desktop_config.json\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"wandb\": {\n     \"command\": \"/Users/niware_wb/.local/bin/uvx\",\n      \"args\": [\n        \"--from\",\n        \"git+https://github.com/wandb/wandb-mcp-server\",\n        \"wandb_mcp_server\"\n      ],\n      \"env\": {\n        \"WANDB_API_KEY\": \"<your-api-key>\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop to activate.\n</details>\n\nWe're working on adding OAuth support so that we can integrate with ChatGPT.\n\n---\n\n## General Installation Guide\n\n<details>\n<summary><strong>Option 1: Hosted Server (Recommended)</strong></summary>\n\nThe 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.\n\n### Using the Public Server\n\nThe easiest way is using our hosted server at `https://mcp.withwandb.com`.\n\n**Benefits:**\n- ✅ Zero installation\n- ✅ Always up-to-date\n- ✅ Automatic scaling\n- ✅ No maintenance\n\nSimply use the configurations shown in [Quick Start](#quick-start).\n</details>\n\n<details>\n<summary><strong>Option 2: Local Development (STDIO)</strong></summary>\n\nRun 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. **See below for client specific installation**.\n\n### Running the Server Locally\n\n**Quick Start:**\n```bash\n# Install uv if needed\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Install the server\nuv pip install git+https://github.com/wandb/wandb-mcp-server\n\n# Run with STDIO transport (for desktop clients)\nexport WANDB_API_KEY=\"your-api-key\"\nuvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_server\n```\n\n> 📖 For complete command line options and environment variables, see the [Command Line Reference](#command-line-reference) in the More Information section.\n\n### Manual Configuration\nAdd to your MCP client config (for detailed client-specific configs see below):\n\n```json\n{\n  \"mcpServers\": {\n    \"wandb\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"git+https://github.com/wandb/wandb-mcp-server\",\n        \"wandb_mcp_server\"\n      ],\n      \"env\": {\n        \"WANDB_API_KEY\": \"YOUR_API_KEY\",\n        \"WANDB_BASE_URL\": \"YOUR_BASE_URL\", #optional for dedicated or on-prem installations\n      }\n    }\n  }\n}\n```\n\n### Cursor\n1. Open Cursor Settings (`⌘,` or `Ctrl,`)\n2. Navigate to **Features** → **Model Context Protocol**\n3. Click **\"Install from Registry\"** or **\"Add MCP Server\"**\n4. Search for \"wandb\" or enter:\n   - **Name**: `wandb`\n   - **URL**: `https://mcp.withwandb.com/mcp`\n   - **API Key**: Your W&B API key\n\nManual hosted config in `mcp.json`:\n```\n\"wandb\": {\n  \"transport\": \"http\",\n  \"url\": \"https://mcp.withwandb.com/mcp\",\n  \"headers\": {\n    \"Authorization\": \"Bearer YOUR-API_KEY\",\n    \"Accept\": \"application/json, text/event-stream\"\n  }\n}\n```\nManual local (dedicated or on-prem) config in `mcp.json`:\n\n```\n\"wandb\": {\n  \"command\": \"uvx\",\n    \"args\": [\n      \"--from\",\n      \"git+https://github.com/wandb/wandb-mcp-server\",\n      \"wandb_mcp_server\"\n    ],\n    \"env\": {\n      \"WANDB_API_KEY\": \"YOUR-API_KEY\",\n      \"WANDB_BASE_URL\": \"https://your-wandb-instance.example.com\", # optional\n    }\n}\n```\n\n\n### Codex\n```bash\ncodex mcp add wandb \\\n    --env WANDB_API_KEY=your_api_key_here \\\n    --env WANDB_BASE_URL=https://your-wandb-instance.example.com \\\n    -- uvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_server\n```\n\n### Claude Code\nAdd `--scope user` for global config.\n```bash\nclaude mcp add wandb -e WANDB_API_KEY=your-api-key -e WANDB_BASE_URL=your-base-url -- uvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_server\n```\n\n### Claude Desktop\nSame as above.\n```bash\n# macOS\nopen ~/Library/Application\\ Support/Claude/claude_desktop_config.json\n\n# Windows\nnotepad %APPDATA%\\Claude\\claude_desktop_config.json\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"wandb\": {\n     \"command\": \"/Users/niware_wb/.local/bin/uvx\",\n      \"args\": [\n        \"--from\",\n        \"git+https://github.com/wandb/wandb-mcp-server\",\n        \"wandb_mcp_server\"\n      ],\n      \"env\": {\n        \"WANDB_API_KEY\": \"<your-api-key>\",\n        \"WANDB_BASE_URL\": \"https://your-wandb-instance.example.com\", # optional\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop to activate.\n\n### Testing with ngrok (for server-side clients)\n\nFor clients like OpenAI and LeChat that require public URLs:\n\n```bash\n# 1. Start HTTP server\nuvx wandb-mcp-server --transport http --port 8080\n\n# 2. Expose with ngrok\nngrok http 8080\n\n# 3. Use the ngrok URL in your client configuration\n```\n\n</details>\n\n<details>\n<summary><strong>Option 3: Self-Hosted HTTP Server (Advanced)</strong></summary>\n\nThis public repository focuses on the STDIO transport. If you need a fully managed HTTP deployment (Docker, Cloud Run, Hugging Face, etc.), start from this codebase and add your own HTTP entrypoint in a separate repo. The production-grade hosted server maintained by W&B now lives in a private repository built on top of this one.\n\n### Running HTTP Server Locally\n\nFor lightweight experimentation and testing, you can run the FastMCP HTTP transport directly:\n\n```bash\n# Basic HTTP server\nuvx wandb_mcp_server --transport http --host 0.0.0.0 --port 8080\n\n# With Weave tracing enabled\nuvx wandb_mcp_server \\\n  --transport http \\\n  --host 0.0.0.0 \\\n  --port 8080 \\\n  --weave_entity your-entity \\\n  --weave_project mcp-server-logs\n```\n\n> 📖 For all available command line options, see the [Command Line Reference](#command-line-reference) in the More Information section.\n\n**Note**: Clients must continue to provide their own W&B API key via Bearer token per the MCP spec.\n</details>\n\n<details>\n<summary><strong>Option 4: Dedicated / On-Prem Deployment</strong></summary>\n\nFor W&B Dedicated and On-Prem customers, the MCP server is available as an optional subchart in the `operator-wandb` Helm chart. Enable it with one line in your `WeightsAndBiases` CR:\n\n```yaml\nmcp-server:\n  install: true\n```\n\nThe server becomes accessible at `https://<your-instance>/mcp`. It automatically connects to your in-cluster Weave trace server and W&B API.\n\n**Requirements:**\n- `weave-trace` must be installed (`weave-trace.install: true`)\n- Operator chart version >= 0.42.0\n- Image `wandb/mcp-server:0.3.0` or later\n\n**Client configuration** for dedicated instances:\n\n```json\n{\n  \"mcpServers\": {\n    \"wandb\": {\n      \"url\": \"https://your-instance.wandb.io/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer YOUR_WANDB_API_KEY\"\n      }\n    }\n  }\n}\n```\n\nContact your W&B account team to enable MCP on your dedicated deployment.\n</details>\n\n---\n\n## More Information\n\n### Command Line Reference\n\nWhen running the server locally, you can customize its behavior with command line arguments:\n\n#### Available Arguments\n\n> **Note**: Arguments use underscores (e.g., `--wandb_api_key`), not dashes.\n\n| Argument | Type | Default | Description |\n|----------|------|---------|-------------|\n| `--transport` | string | `stdio` | Transport type: `stdio` for local MCP client communication or `http` for HTTP server |\n| `--host` | string | `localhost` | Host to bind HTTP server to (only used with `--transport http`) |\n| `--port` | integer | `8080` | Port to run the HTTP server on (only used with `--transport http`) |\n| `--wandb_api_key` | string | None | Weights & Biases API key for authentication |\n| `--weave_entity` | string | None | The W&B entity to log traced MCP server calls to |\n| `--weave_project` | string | `weave-mcp-server` | The W&B project to log traced MCP server calls to |\n\n#### Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `WANDB_API_KEY` | Your W&B API key (alternative to `--wandb_api_key` flag) | Yes |\n| `WANDB_BASE_URL` | Custom W&B instance URL (for dedicated/on-prem instances) | No |\n| `MCP_SERVER_LOG_LEVEL` | Logging verbosity: `DEBUG`, `INFO`, `WARNING`, `ERROR` | No |\n| `WANDB_SILENT` | Set to `\"False\"` to suppress W&B output | No |\n| `WEAVE_SILENT` | Set to `\"False\"` to suppress Weave output | No |\n| `WANDB_DEBUG` | Set to `\"true\"` to enable detailed W&B logging | No |\n| `MCP_AUTH_DISABLED` | Disable HTTP authentication (development only) | No |\n| `WANDB_MCP_PROXY_DOCS` | Enable/disable docs search proxy (default: `true`) | No |\n| `WANDB_MCP_ENABLE_WEAVE_TOOLS` | Enable Weave trace tools (default: `true`; set `false` for installs without a trace backend) | No |\n| `WANDB_MCP_ENABLE_WEAVE_AGENT_TOOLS` | Enable Weave Agents (OTel/GenAI) tools (default: `false`) | No |\n| `WANDB_MCP_READ_ONLY` | Omit report creation and analysis logging write tools (default: `false`) | No |\n| `MCP_ANALYTICS_DISABLED` | Disable structured MCP analytics events. Useful as a workaround for older stdio builds that wrote analytics to stdout. | No |\n| `MAX_RESPONSE_TOKENS` | Token budget for response truncation (default: `30000`) | No |\n\n#### Usage Examples\n\n**STDIO Transport (default for desktop clients):**\n```bash\n# Basic usage with environment variable\nexport WANDB_API_KEY=\"your-api-key\"\nuvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_server\n\n# Or with API key as argument\nuvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_server --wandb_api_key your-api-key\n```\n\nFor stdio clients such as Claude Desktop, stdout is reserved for MCP JSON-RPC\nmessages. The server routes logs and analytics to stderr in stdio mode so\ndesktop clients do not parse diagnostics as protocol messages. If you are using\nan older version and see JSON-RPC parse warnings containing analytics fields\nsuch as `schema_version` or `event_type`, set `MCP_ANALYTICS_DISABLED=true` as\na workaround.\n\n**HTTP Transport (for testing and development):**\n```bash\n# Basic HTTP server on localhost:8080\nuvx wandb_mcp_server --transport http --host 127.0.0.1 --port 8080\n\n# Bind to all interfaces with custom port\nuvx wandb_mcp_server --transport http --host 0.0.0.0 --port 9090\n```\n\n**With Weave Tracing (log MCP calls to W&B):**\n```bash\nuvx wandb_mcp_server \\\n  --transport http \\\n  --port 8080 \\\n  --weave_entity my-team \\\n  --weave_project mcp-monitoring\n```\n\n**View all options:**\n```bash\nuvx --from git+https://github.com/wandb/wandb-mcp-server wandb_mcp_server --help\n```\n\n### Contributing & Releasing\n\n- **[CONTRIBUTING.md](CONTRIBUTING.md)** -- Development setup, testing, PR process, architecture overview\n- **[RELEASING.md](RELEASING.md)** -- Version bumping, release checklist, deployment pipeline\n\n### Key Resources\n\n- **W&B Docs**: [docs.wandb.ai](https://docs.wandb.ai)\n- **Weave Docs**: [weave-docs.wandb.ai](https://weave-docs.wandb.ai)\n- **MCP Spec**: [modelcontextprotocol.io](https://modelcontextprotocol.io)\n\n### Example Code\n\n<details>\n<summary>Complete OpenAI Example</summary>\n\n```python\nfrom openai import OpenAI\nfrom dotenv import load_dotenv\nimport os\n\nload_dotenv()\n\nclient = OpenAI()\n\nresp = client.responses.create(\n    model=\"gpt-4o\",  # Use gpt-4o for larger context window\n    tools=[\n        {\n            \"type\": \"mcp\",\n            \"server_label\": \"wandb\",\n            \"server_description\": \"Query W&B data\",\n            \"server_url\": \"https://mcp.withwandb.com/mcp\",\n            \"authorization\": os.getenv('WANDB_API_KEY'),\n            \"require_approval\": \"never\",\n        },\n    ],\n    input=\"How many traces are in wandb-smle/hiring-agent-demo-public?\",\n)\n\nprint(resp.output_text)\n```\n</details>\n\n### Development\n\n#### Running Tests\n\nUnit tests run without API keys or network access:\n\n```bash\npip install -e \".[test]\"\npytest tests/ -v\n```\n\nCI runs automatically on every push and PR via GitHub Actions.\n\n#### Two-Repo Model\n\n| Repo | Visibility | Contains |\n|------|-----------|----------|\n| `wandb/wandb-mcp-server` | Public | Tool logic, core server, unit tests |\n| `wandb/wandb-mcp-server-internal` | Private | LLM evals, load tests, Dockerfile, Helm, CI/CD |\n\nThe internal repo installs the public repo as a pip dependency.\n\n### Support\n\n- [GitHub Issues](https://github.com/wandb/wandb-mcp-server/issues)\n- Email support@wandb.com\n",
  "bytes": 24705,
  "sha": "a55e6dc3fc88300e80406e9e8828500d7dd602ac4525b7f1c8384d88f133fbb6",
  "repo_slug": "wandb/wandb-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_wandb_wandb_mcp_server_fd5999ce/readme"
}