TrainTools MCP server
io.github.AparajeetS/traintools·v0.6.2Recommend paper-backed diagnostics for PyTorch and Hugging Face training problems.
0 stars
Reviews
Write oneNobody has reviewed TrainTools yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
TrainTools tools (4)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
explain_training_diagnosticExplain one diagnostic, including when not to trust it.
generate_training_integrationGenerate a minimal PyTorch or Hugging Face integration snippet.
list_training_diagnosticsList TrainTools capabilities, requirements, and limitations.
recommend_training_diagnosticsRecommend diagnostics for a concrete ML training symptom.
Public scan report
scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it
- Code scan25 source files scanned20/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 65 days ago12/15
- Maintainer identityregistry namespace matches repository owner6/10
Findings (1)
- mediumeval / new Function used
exec.evaltraintools-0.6.2/traintools/callbacks/huggingface.py: …aptured batch (the model is switched to eval() during estimation to exclude dropout/B…
How TrainTools compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 77/100
- higher than 50% of 48,255 servers
- Tools
- 4
- the typical server has 7
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
What its tools let an agent do: 3 read · 1 create
Install TrainTools in Claude Code, Cursor or VS Code
claude mcp add traintools -- uvx traintools
What the publisher says
From the TrainTools repository's README, as published. We do not edit it. Read it on GitHub
traintools
<!-- mcp-name: io.github.AparajeetS/traintools -->
Paper-backed ML training diagnostics for PyTorch. Small tools that answer practical questions while a run is still alive.
Source on GitHub | PyPI
Have a real run or false alarm to share? Use the diagnostic report template.
pip install traintoolsNot sure which tool fits the problem?
traintools recommend "my loss became NaN and gradients explode"
traintools integration gradient-health --framework pytorchAgents can use the JSON CLI, the agent guide, llms.txt, or the optional local MCP server:
pip install "traintools[mcp]"
traintools-mcpThe same local, read-only server is discoverable through the official MCP Registry and can be launched without a persistent install:
uvx --with mcp traintools mcpFor AI coding assistants: start with traintools recommend "" --json, then insert the smallest diagnostic snippet into the user's existing loop. The agent-facing entrypoints are AGENTS.md, llms.txt, JSON schemas, and the optional MCP server.
Tools
Quick Start
from traintools import BatchInspector, GradientHealthMonitor
from traintools.callbacks.pytorch import TraintoolsTracker
tracker = TraintoolsTracker(model, loss_fn)
batch_inspector = BatchInspector(expected_num_classes=10)
grad_health = GradientHealthMonitor(max_grad_norm=1.0)
for step, (x, y) in enumerate(dataloader):
batch_report = batch_inspector.inspect(x, y, step=step)
if not batch_report.ok:
print(batch_report)
loss = loss_fn(model(x), y)
loss.backward()
grad_report = grad_health.inspect(model, step=step, lr=optimizer.param_groups[0]["lr"])
if not grad_report.ok:
print(grad_report)
optimizer.step()
optimizer.zero_grad()
decision = tracker.step(step=step, inputs=x, targets=y, val_loss=val_loss)
if decision and decision.should_stop:
breakHuggingFace Trainer:
from transformers import Trainer
from traintools.callbacks.huggingface import TraintoolsCallback
trainer = Trainer(model=model, ..., callbacks=[TraintoolsCallback()])Gradient Noise Scale
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
TrainTools: common questions
- Is TrainTools MCP server safe?
- Mostly: it is graded B (77/100). Read the TrainTools safety report
- How do I install TrainTools?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does TrainTools need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is TrainTools maintained?
- The last commit was 105 days ago (2026-07-22). The latest release is v0.6.2.
- How does TrainTools compare with other MCP servers?
- safety score 77/100 (higher than 50% of 48,255 servers); tools 4 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.