ML Tracker MCP Server
Allows pushing logged experiment runs to Google Sheets, appending formatted rows and auto-creating the target spreadsheet, exposed via the push_to_sheets MCP tool and CLI.
Allows pushing logged experiment runs to a Notion database, creating a page per run with metrics as number properties, parameters as a JSON code block, and embedded charts, exposed via the push_to_notion MCP tool and CLI.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ML Experiment Tracker
Automated ML experiment tracker powered by Claude Code.
Log runs from any ML framework, auto-generate charts, and push results to Notion and Google Sheets via an MCP server — all in one line of code.
Why this exists
Existing tools (MLflow, W&B, Neptune) are powerful but heavyweight — they require a running server, a cloud account, or complex setup just to log a training run. This project takes a different approach:
Zero-server local storage — SQLite under
~/.ml_tracker/experiments.dbOne-line API —
log_run(experiment, params, metrics)and you're doneClaude Code MCP integration — ask Claude natural questions like "which run had the best F1 last week?" or "compare my top 3 models"
Automatic dashboards — results flow to Notion and Google Sheets without any manual copy-paste
Framework-agnostic — works with sklearn, PyTorch, XGBoost, Keras, or plain Python
Related MCP server: MCP Database Server
Quick Start
git clone https://github.com/tonyc973/ml-experiment-tracker
cd ml-experiment-tracker
pip install -e ".[all]"
cp .env.example .env # fill in your API keysfrom ml_tracker import log_run
run = log_run(
experiment="MyProject_Baseline",
params={"learning_rate": 0.001, "epochs": 50, "batch_size": 32},
metrics={"accuracy": 0.9423, "f1": 0.9311, "roc_auc": 0.9701},
tags={"model": "xgboost", "dataset": "churn_v2"},
)
# ✓ Run logged a3f8b21e | MyProject_Baseline | metrics: ['accuracy', 'f1', 'roc_auc']That's it. The run is saved locally and, if credentials are configured, synced to your Notion database and Google Sheet automatically.
Features
Feature | Description |
Local SQLite storage | All runs saved to |
Auto chart generation | Metric bar charts and learning curves saved per run |
Notion sync | Creates a rich database page per run with embedded charts |
Google Sheets sync | Appends formatted rows; auto-creates the spreadsheet |
MCP server | 8 tools for Claude Code — query, compare, and push runs via natural language |
CLI |
|
Context manager |
|
Environment capture | Python version, library versions, git commit logged automatically |
Context Manager (auto-timing)
from ml_tracker import start_run
with start_run("CaliforniaHousing", params={"model": "GradientBoosting", "lr": 0.05}) as run:
model.fit(X_train, y_train)
run.metrics["rmse"] = compute_rmse(model, X_test, y_test)
run.metrics["r2"] = model.score(X_test, y_test)
# Duration is measured automaticallyLearning Curves
history = {"train_loss": [], "val_accuracy": []}
for epoch in range(50):
loss = train_one_epoch(model, loader)
acc = evaluate(model, val_loader)
history["train_loss"].append((epoch, loss))
history["val_accuracy"].append((epoch, acc))
log_run(
experiment="NeuralNet_Sweep",
params={"hidden": [128, 64], "lr": 0.001},
metrics={"final_accuracy": acc},
metrics_history=history, # → generates learning_curves.png automatically
)Notion Setup
Go to notion.so/my-integrations → New integration
Copy the Internal Integration Token → set as
NOTION_TOKENCreate a Notion database, open it, copy the ID from the URL → set as
NOTION_DATABASE_IDShare the database with your integration (click Share → Invite)
export NOTION_TOKEN=secret_xxxxx
export NOTION_DATABASE_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThe tracker will create a Notion page for each run with:
All metrics as number properties (filterable/sortable)
Params as a JSON code block
Metric charts embedded as images
Google Sheets Setup
Go to Google Cloud Console → APIs & Services → Credentials
Create a Service Account → download the JSON key
Enable Google Sheets API and Google Drive API
Share your target spreadsheet with the service account's
client_email
export GOOGLE_CREDS_JSON='{"type":"service_account","project_id":"..."}'
# OR
export GOOGLE_CREDS_FILE=./service_account.json
export GOOGLE_SHEET_NAME="ML Experiment Results"MCP Server (Claude Code Integration)
Add to your Claude Desktop or Claude Code config:
{
"mcpServers": {
"ml-tracker": {
"command": "python",
"args": ["-m", "ml_tracker.server"],
"cwd": "/path/to/ml-experiment-tracker/src"
}
}
}Then ask Claude:
"What experiments have I run?"
"Which run had the best F1 score in BreastCancer_Classification?"
"Compare runs abc12345 and def67890 side by side."
"Push run abc12345 to Notion."
"Generate a comparison chart for accuracy across all MLP runs."
Available MCP Tools
Tool | Description |
| Log a new run with params, metrics, tags |
| List recent runs, optionally filtered by experiment |
| Find the run with the best metric value |
| Side-by-side comparison of multiple runs |
| Push a run to your Notion database |
| Push a run to Google Sheets |
| Bar chart comparing a metric across runs |
| List all experiment names |
| Stats (min/max/mean/stdev) for all metrics |
CLI
# List recent runs
ml-tracker list
ml-tracker list MyExperiment --limit 20
# Find the best run
ml-tracker best MyExperiment --metric accuracy
ml-tracker best MyExperiment --metric val_loss --lower
# List all experiments
ml-tracker experiments
# Push a run to dashboards
ml-tracker push abc12345 --notion
ml-tracker push abc12345 --sheets
ml-tracker push abc12345 --notion --sheetsProject Structure
ml-experiment-tracker/
├── src/ml_tracker/
│ ├── __init__.py # Public API: log_run, start_run, get_runs, ...
│ ├── models.py # ExperimentRun dataclass
│ ├── tracker.py # SQLite storage, log_run(), start_run(), get_*()
│ ├── visualizer.py # matplotlib chart generation
│ ├── notion_backend.py # Notion API integration
│ ├── sheets_backend.py # Google Sheets / gspread integration
│ ├── server.py # MCP server (8 tools)
│ └── cli.py # Typer CLI
├── examples/
│ ├── sklearn_classification.py # Multi-model breast cancer comparison
│ ├── sklearn_regression.py # Regression with context manager
│ └── hyperparameter_search.py # Grid search + learning curves
├── tests/
│ ├── test_models.py
│ └── test_tracker.py
├── .env.example
└── pyproject.tomlRunning Examples
pip install -e ".[dev]"
# Classification — compares 4 models on breast cancer dataset
python examples/sklearn_classification.py
# Regression — uses start_run() context manager
python examples/sklearn_regression.py
# Hyperparameter search — grid search with learning curves
python examples/hyperparameter_search.pyRunning Tests
pip install -e ".[dev]"
pytest tests/ -vInstallation Options
# Core only (local storage + charts)
pip install -e .
# With Notion support
pip install -e ".[notion]"
# With Google Sheets support
pip install -e ".[sheets]"
# Everything
pip install -e ".[all]"
# Development (includes scikit-learn + test tools)
pip install -e ".[dev]"Environment Variables
Variable | Required | Description |
| Notion only | Integration token from notion.so/my-integrations |
| Notion only | Target database ID from the Notion URL |
| Sheets only | Service account JSON as a string |
| Sheets only | Path to service account JSON file |
| Sheets only | Spreadsheet name (default: "ML Experiment Results") |
| Optional | Override default SQLite path |
License
MIT © tonyc973
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Notes, tasks, habits, journal and 6 more tools Claude can read and change, with undo. Free.
Work with your database from AI tools: ask, export, approved changes, and scheduled jobs.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Running journal for Claude & ChatGPT: logs runs, reads your history, writes your next session.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI assistants to interact with MLflow experiments, runs, and registered models. Supports browsing experiments, retrieving run details with metrics and parameters, and querying the model registry through natural language.7MIT
- AlicenseNot gradedqualityDmaintenanceProvides database access capabilities to Claude with support for both SQLite and SQL Server databases. It enables users to manage schemas, execute SQL queries, and export results through natural language interaction.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to query and manage databases (SQLite, SQL Server, PostgreSQL, MySQL) through natural language, supporting read/write operations and schema management.MIT
- AlicenseBqualityBmaintenanceEnables Claude to answer trail and ultra running questions from a local DuckDB warehouse built from Garmin FIT files, with 29 parameterised tools that compute running-only pace by grade, matched-terrain heart rate drift, segment comparisons and training load, each result stating its filters and exclusions.29MIT