guarftrain 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., "@guarftrain MCP Servercheck my latest training run status and loss trend"
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.
Training Guardian Agent · 训练守护智能体
一行命令,训练脚本零行改动,获得完整守护能力。
One command. Zero changes to your training script. Full guardian capabilities.
guarftrain init && guarftrain watch -- python train.py --epochs 20What's New in v0.2.0
Feature | Description |
|
|
| 自动扫描训练脚本,生成 contract.yaml |
| 环境自检:Python/GPU/依赖/项目结构 |
Dashboard 远程配置 | 外部 Agent 通过 MCP 控制 Dashboard 图表/面板,用户操作受 dirty flag 保护 |
Agent 图表推荐 |
|
MCP 委托模式 | 外部 Claude Code 连接时内置 Agent 进入 provisional 模式,决策可被覆盖 |
增量图表更新 | Dashboard 实时推送图表数据,不再全量重建 |
依赖瘦身 | 核心安装 ~2MB,torch/anthropic 按需安装 |
Related MCP server: mlflow-mcp-server
What does it do? · 它做什么?
Phase · 阶段 | Capability · 能力 | How · 方式 |
训练前 Pre-flight | GPU 显存预估 + batch 推荐 |
|
训练中 During | GPU+Loss 监控告警 / 崩溃自动恢复 / LLM 决策 |
|
训练后 Post | 摘要+AI 解读 / Checkpoint 分析 / 模型可视化 / 推理 |
|
跨实验 Cross | 自然语言查询 / 实验对比 / 数据导入 |
|
外部接入 External | MCP 32 工具 + Dashboard 远程配置 + Agent 图表推荐 |
|
Quick Start · 快速开始
Install · 安装
# 方式 1: pip 安装(推荐,轻量核心 ~2MB,torch 已有不重装)
pip install guarftrain
# 方式 2: 从源码安装
git clone https://github.com/user/guarftrain.git
cd guarftrain
pip install .
# 按需安装可选组件
pip install guarftrain[agent] # AI 决策层 (anthropic)
pip install guarftrain[mcp] # MCP 外部 Agent 接入
pip install guarftrain[dashboard] # Web 控制面板
pip install guarftrain[full] # 全部安装Three steps to guard · 三步守护
# 1. 初始化项目(自动扫描训练脚本,生成配置)
cd /path/to/your-project
guarftrain init
# 2. 守护训练(纯规则,零外部依赖)
guarftrain watch -- python train.py --epochs 20
# 3. 或启用 AI + Dashboard + MCP
guarftrain watch --agent --with-dashboard --with-mcp -- python train.py --epochs 20What does the training script need? · 训练脚本要满足什么?
Four contracts (just good training hygiene):
--resume/--ckptflags for checkpoint resumptioncp_{epoch}/model.pthwithepoch/model_state_dict/optimizer_state_dictStructured logging:
epoch {n} loss {v} val_acc {v} lr {v}Importable:
train:build_model/train:get_dataloaders
Missing any one? Only the corresponding capability is disabled — training still runs.
四项契约(写好训练脚本的基本功),缺任一项只关对应能力,不阻断训练。
Architecture · 架构
┌─ Guardian Process (sidecar) ────────────────────────────────────┐
│ │
│ CLI (run.py) ──→ 14 subcommands │
│ ├─ watch ──→ Watchdog: Popen + crash recovery + CLI rewrite │
│ │ └─ Monitor: log tail + GPU poll + anomaly detect │
│ │ └─ AgentAdvisor: LLM decide → intervene │
│ ├─ serve ──→ MCP Server: 32 tools (22 read + 10 write) │
│ ├─ start ──→ Dashboard + MCP one-click │
│ └─ experiments / query / compare ──→ Cross-experiment analysis │
│ │
│ Decision Layers · 决策分层: │
│ ┌─ Contract (hard boundary, human-defined) │
│ ├─ Agent (LLM, optional, within action space) │
│ ├─ Rules (deterministic, always-on fallback) │
│ ├─ MCP (external agent access, dual-mode delegation) │
│ └─ Dashboard (remote config, dirty-flag user protection) │
│ │
│ Training Process: python train.py (0 changes required) │
└──────────────────────────────────────────────────────────────────┘CLI Commands · 命令速查
Command | Description |
| Auto-detect project + generate contract.yaml |
| Environment readiness check (deps, GPU, config) |
| Guard any training command |
| Dashboard + MCP one-click launch |
| Standalone MCP server |
| Validate training script contract |
| GPU memory estimate + batch recommendation |
| Scan existing checkpoints |
| List all historical experiments |
| Natural language query ("best lr?") |
| Compare two experiments |
| Model structure visualization (D3.js HTML) |
| Run inference with checkpoint |
| Image filtering + selection |
| Web control panel (standalone) |
| Project context management (init/show/scan/fill) |
MCP Tools · MCP 工具
24 read-only (always available, no auth):
get_training_status · get_metrics_history · list_checkpoints · compare_checkpoints · get_anomaly_history · get_recovery_history · get_summary · get_agent_decision_log · get_contract_status · list_contract_proposals · list_experiments · query_experiment · compare_experiments · get_model_structure · get_guardian_mode · get_gallery_config · get_import_format · inspect_source · get_training_log · get_post_training_checklist · get_pending_decisions · get_dashboard_config · recommend_charts · list_dashboard_templates
11 write (token auth + training-phase gating):
trigger_recovery · restart_with_params · stop_training · approve_contract_proposal · reject_contract_proposal · run_visualization · set_gallery_config · run_inference · submit_import · resolve_decision · set_dashboard_config
→ Full API reference: MCP_API_REFERENCE.md
Configuration · 配置
Three layers, zero secrets in YAML:
DEFAULTS < guardian.yaml < GUARDIAN_* env vars < CLI flags# configs/guardian.yaml — only override what you need
watchdog:
max_retries: 3
monitor:
poll_interval: 5
mcp:
enable_write_tools: true# Env override: GUARDIAN_ + section + __ + key
export GUARDIAN_WATCHDOG__MAX_RETRIES=5
export GUARDIAN_MCP_TOKEN=your-secret # write tool authProject Status · 项目状态
Metric | Value |
Version | 0.2.0 |
Modules | 16 (cp_1 ~ cp_16) |
Production code | ~10,500 lines |
Tests | 221 (CI on push) |
MCP tools | 35 (24 read + 11 write) |
CLI commands | 16 |
Test coverage | ~13% (core paths: 100%) |
Python | 3.10+ |
Docs · 文档索引
Document | Content |
Architecture & workflow (ZH) | |
User manual (ZH) | |
MCP integration guide (ZH) | |
35-tool API reference (ZH) | |
5-minute MCP onboarding (ZH) | |
Per-module completion report (ZH) | |
Module index cp_1~cp_16 (ZH) | |
MCP layer design doc (ZH) |
License
MIT
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
- Alicense-qualityCmaintenanceAn MCP server that enables AI agents to observe and interact with trackio experiment tracking, providing tools for managing ML experiments through natural language.3MIT
- AlicenseBqualityAmaintenanceMLflow MCP — 82 tools for experiments, runs, registered models, traces, assessments. MLflow 3 GenAI traces support with analyze-failed-traces workflow Prompt.82381MIT
- Alicense-qualityCmaintenanceExposes TensorBoard experiment data through a standardized MCP API, enabling AI coding agents to query and analyze scalars, tensors, histograms, distributions, and images from ML experiment logs.MIT
- Alicense-qualityDmaintenanceAI-powered interface for Kubeflow Training via MCP, enabling AI assistants to manage distributed training jobs, fine-tune LLMs, and monitor workloads on Kubernetes through natural language.Apache 2.0
Related MCP Connectors
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
A paid remote MCP for AI SDK benchmark dashboard, built to return verdicts, receipts, usage logs, an
A paid remote MCP for AI SDK eval dashboard, built to return verdicts, receipts, usage logs, and aud
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/Washington5533/guarftrain'
If you have feedback or need assistance with the MCP directory API, please join our Discord server