Wraps the MasteryTrace CLI as a single generic MCP tool for skill-mastery tracking.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MasteryTrace ships as two independent, equally first-class packages that implement the same two models (BKT, 2PL IRT) and the same CLI contract.
npm (TypeScript CLI + library):
Requires Node.js 18 or later.
pip (Python CLI + library): a full, independent Python port of this
repo's TypeScript source lives in python/ -- same two models, same CLI
contract, its own 75-test pytest suite, built and verified end to end
from a real wheel install.
This installs the same four subcommands (init, record, score,
report) as a masterytrace console script, plus an importable
masterytrace library, a genuine, independent port of this repo's
TypeScript source, not a wrapper around the Node binary. See
python/README.md for Python-specific usage.
[!NOTE] The npm and pip distributions return equivalent data but with different JSON key casing (
camelCasefrom the TypeScript CLI,snake_casefrom the Python CLI). Account for this if you parse output from both in the same pipeline.
theta) per learner and item difficulty/discrimination per skill. Run either or both with --model bkt|irt|both.masterytrace-cli, TypeScript) and the PyPI package (masterytrace-cli, Python) are a real line-for-line port of each other, not a Python wrapper around the Node binary; this audit ran the same 58-event sample through both and got identical mastery scores.--json flag, report also takes --format markdown, and there's a real three-value exit code contract (0 success, 1 usage error, 2 bad event data) instead of a single generic failure code.theta, item difficulty, and item discrimination..masterytrace/ directory next to where you run the CLI. Scoring 100,000 events takes under a second on a single core.init scaffolds a sample events.json (3 learners, 3 skills, several responses each) and a default masterytrace.config.json in the current directory. Real output from that flow:
[!WARNING]
masterytrace recordalways replaces the entire previously stored event log; there is no append mode. If you need to add new responses without losing existing ones, merge them into one file and re-runrecordwith the full, combined log.
report also takes --format markdown or --format json, and every command accepts a global --json flag for machine-readable output on stdout, with a real exit code contract (0 success, 1 general/usage error, 2 bad event data) so a script or agent invoking this CLI can branch on the result without parsing text.
Your own event log is a JSON array of { learnerId, skillId, correct, timestamp } objects, or a CSV with header learner_id,skill_id,correct,timestamp. timestamp must be ISO 8601; correct is a boolean (JSON) or true/false/1/0 (CSV), and any other value in a CSV correct cell is rejected as a validation error rather than silently treated as false. Event log files over 100 MB are rejected up front with a clear error; event logs are small structured records and have no legitimate reason to approach that size.
| Command | Arguments | Options | Does |
|---|---|---|---|
masterytrace init | --force | Scaffolds a sample events.json and masterytrace.config.json in the current directory. Skips files that already exist unless --force is passed. | |
masterytrace record <path> | <path>: JSON or CSV event log | Validates an event log and stores it to .masterytrace/events.json. Always replaces any previously stored log. | |
masterytrace score | --model <bkt|irt|both> (default both) | Fits and scores the stored event log, writing the result to .masterytrace/scores.json. | |
masterytrace report | --format <table|json|markdown> (default table) | Reads .masterytrace/scores.json and prints a per-learner, per-skill mastery table. |
Global option: --json forces machine-readable JSON on stdout for any command, overriding --format on report.
Exit codes: 0 success, 1 general or usage error (bad flag, missing file), 2 validation error (the event log itself is malformed).

MasteryTrace ships a Model Context Protocol (MCP) server, so an agent (Claude Desktop, Claude Code, or any other MCP client) can invoke the CLI directly instead of shelling out itself.
Install the Python package with the mcp extra:
Then point an MCP client at the masterytrace-mcp console script. Claude Desktop config example (claude_desktop_config.json):
The server exposes a single tool, run(args: list[str]) -> dict, which shells out to the installed masterytrace CLI with the given argument list and returns its parsed output -- any subcommand or flag the CLI supports is reachable through it. Example call: run(["score", "--model", "bkt", "--json"]) fits a BKT model against the stored event log and returns the parsed JSON mastery report.
Everything below is exported from masterytrace-cli's package entry point (src/index.ts, re-exporting src/core/* and src/models/*):
A minimal library usage example:
BktModel and IrtModel both implement the same ScoringModel interface (fit(events) then score(fittedModel)), so the engine, and your own code, can treat them interchangeably.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/masterytrace)<a href="https://allmcps.com/mcp/masterytrace"><img src="https://allmcps.com/api/badge/masterytrace?style=directory" alt="Masterytrace on AllMCPs" /></a>