swanlab-mcp
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., "@swanlab-mcpList runs in project 'my-project' with state 'completed'"
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.
SwanLab MCP Server
A Model Context Protocol (MCP) server implementation for SwanLab, combining SwanLab-OpenAPI & FastMCP.
✨ Features
Core Features
Workspace Queries - List accessible workspaces and enumerate workspace projects
Project Queries - List projects and inspect a specific project with run summaries
Run Queries - Inspect runs with normalized fields (
id,state,profile,user)Metric Queries - Fetch metric tables with consistent
columns,rows, andtotalAPI Integration - Provide read-only access through SwanLab OpenAPI (
swanlab.Api)
Tech Stack
Language: Python 3.12+
Core Framework: FastMCP (v2.14.4+)
API Client: SwanLab SDK
Config Management: Pydantic Settings
Related MCP server: Grist MCP Server
🚀 Quick Start
❗️Configuration
Add the following configuration to your relative mcp config list
{
"mcpServers":
...
{
"swanlab-mcp": {
"command": "uvx",
"args": ["--from", "swanlab-mcp", "swanlab_mcp", "--transport", "stdio"],
"env": {
"SWANLAB_API_KEY": "your_api_key_here"
}
}
}
}For Claude Code Users, you can config like this:
claude mcp add --env SWANLAB_API_KEY=<your_api_key> -- swanlab_mcp uvx --from swanlab-mcp swanlab_mcp --transport stdioPrerequisites
Python >= 3.12
SwanLab API Key (get it from SwanLab)
Installation
# Using uv (recommended)
uv sync
# Or using pip
pip install -e .Configuration
Environment Variables
Create a .env file and configure your API key:
cp .env.template .envEdit the .env file:
SWANLAB_API_KEY=your_api_key_hereRunning
# Using stdio transport (default)
python -m swanlab_mcp
# Or using CLI
python -m swanlab_mcp --transport stdio
# Check version
python -m swanlab_mcp --versionUsage
After configuration, restart Claude Desktop to interact with SwanLab via the MCP protocol.
Available Tools:
swanlab_list_workspaces- List workspacesswanlab_get_workspace- Get workspace detailsswanlab_list_projects_in_workspace- List projects in one workspaceswanlab_list_projects- List projectsswanlab_get_project- Get project detailsswanlab_list_runs_in_project- List runs in one projectswanlab_list_runs- List runs with optional filters (state,config.*)swanlab_get_run- Get run detailsswanlab_get_run_config- Get run configswanlab_get_run_metadata- Get run metadataswanlab_get_run_requirements- Get run requirementsswanlab_list_run_metric_keys- List available metric keys for a runswanlab_get_run_metrics- Get run metric table
Resource Definitions:
workspace: collection of projects (
PERSONorTEAM) identified byusername.project: collection of runs identified by
path = username/project_name.run: single experiment identified by
path = username/project_name/experiment_id.metric: tabular run history returned as
{path, keys, x_axis, sample, columns, rows, total}.
🛠️ Development
Code Formatting
# Using Makefile
make format
# Or manually
uvx isort . --skip-gitignore
uvx ruff format . --quietLint Check
uvx ruff check .Pre-commit Hooks
bash scripts/install-hooks.sh📚 References & Acknowledgements
📄 License
MIT License
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.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.Last updated7833MIT
- FlicenseAqualityCmaintenanceEnables interaction with Grist documents, workspaces, and records via the Model Context Protocol. It supports comprehensive operations including SQL querying, schema management, and record CRUD functionality.Last updated11653
- Alicense-qualityDmaintenanceEnables interaction with Linear workspace through the Model Context Protocol, supporting issue management, project cycles, teams, and global search.Last updated674MIT

Comet ML MCP Serverofficial
Alicense-qualityBmaintenanceEnables interaction with Comet ML's experiment tracking platform through the Model Context Protocol, providing tools for experiment management, project organization, and advanced search.Last updated1Apache 2.0
Related MCP Connectors
Individual-analyst context layer: recall, remember, and reconcile your data and engineering context.
Read-only access to your VortexIQ store data: audits, KPIs, alerts, Brand DNA, reports, Ask VIQ.
Read-only China A-share data for AI agents: market, limit-up, capital flow and disclosures.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Nexisato/SwanLab-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server