Skip to main content
Glama

projtool

Status: M0–M5 complete, plus the post-M5 v3→v4 container-layout refactor. 34 MCP tools shipped; ~1970 unit + ~110 integration tests. The full MNIST workflow (retrofit → experiment → train → report → image build) runs end to end. See docs/development/M1-M5-roadmap.md for milestone detail.

projtool is a Python package + Claude Code MCP server that supports a single ML researcher running experiments across a local development machine and remote AutoDL GPU containers.

A retrofitted project lives under a single container directory (v4 layout):

  • <container>/code/main/ — the git repo holding model code. Each experiment gets an exp/<topic> branch in a sibling worktree under <container>/code/.

  • <container>/output/ — training products (metrics, figures, manifests). Synced from the remote via mutagen, large binary artifacts filtered out.

  • <container>/docs/ — an independent git repository holding analysis reports, organized by code-repo branch namespace; cross-branch summaries go in summary/.

  • <container>/data/ — datasets (may be a symlink to a NAS path).

Day zero: the user runs projtool setup once. From then on, every action goes through mcp__projtool__* tool calls in Claude Code: experiment creation, training launch, run polling, report writing, AutoDL instance lifecycle, and project-image builds.

Documentation

Related MCP server: mlagents-mcp

Project structure

src/projtool/
├── assets/            # data shipped to user projects (templates, skills, hooks)
├── setup_cli.py       # `projtool setup` entry point
├── project_layout.py  # ProjectLayout — single source of truth for container paths (v4)
├── project_config.py  # .proj-tool/project.toml reader/writer
├── state.py           # state.json + shared pydantic schemas
├── errors.py          # ProjtoolError hierarchy
├── mcp/               # MCP server + 34 tool handlers (mcp/tools/), manifest + report templates
├── retrofit/          # detect + write_template + check/apply upgrade
├── autodl/            # AutoDL API client + instance lifecycle
├── git_ops/           # subprocess wrappers for git, worktrees, docs repo
├── mutagen/           # subprocess wrappers for mutagen code/output/data sync sessions
├── ssh/               # subprocess wrappers for ssh / remote exec
└── diagnose/          # health-check helpers (stale-state detection)

The assets/ tree is data, not code. It gets packaged with the wheel and read at runtime via importlib.resources, then copied into user projects during retrofit. See CLAUDE.md for the asset/code boundary.

Development

Requires Python 3.11+.

git clone <this-repo>
cd projtool
python -m venv .venv
source .venv/bin/activate                   # Linux/macOS
# .venv\Scripts\activate                    # Windows
pip install -e ".[dev]"
pytest

Status

Milestone

Scope

Status

M0

autodl/ subpackage

✅ Done — see examples/m0_demo.py

M1

setup CLI + MCP server skeleton + instance lifecycle

✅ Done

M2

start_training + manifest + sync tools

✅ Done

M3

retrofit (detect + write_template + check/apply upgrade)

✅ Done

M4

reports + worktree management (new_experiment, start_report, commit_report)

✅ Done

M5

image build + remote exec + full MNIST e2e

✅ Done

post-M5

v3 → v4 container-layout refactor (template_version 0.5.0+)

✅ Done

See docs/development/M1-M5-roadmap.md for what each milestone covers.

License

MIT.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Enables Claude Code to interact with Jupyter notebooks, perform semantic search over knowledge files, and manage research projects.
    33
    4
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Controls Unity ML-Agents training runs from Claude Code, enabling launch, stop, resume, monitor, compare, and export via natural language.
    18
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents and MCP clients to manage AutoDL GPU instances programmatically, including creating, listing, powering on/off, executing commands, transferring files, and enforcing automatic shutdown.
    18 npm
    1
    MIT