MCP server for Mplus: prepare data, build and run input files, and parse the output into readable tables
mplus-mcp demonstrates solid tool design with clear, domain-specific naming and comprehensive parameter schemas. All 9 tools have descriptions (avg 180 chars) and detailed input schemas with type definitions. However, output schemas are not explicitly documented in the source, and error handling lacks recovery guidance. Tool names follow verb_noun convention (data_prepare, build_syntax, run_syntax). Parameter descriptions are thorough and include constraints (e.g., missing_flag default -999, timeout default 600). The server correctly avoids exposing secrets and uses path expansion for file handling. Main gaps: no documented return types, limited error classification, and missing tool annotations (readOnlyHint/destructiveHint).
Write an Mplus input file from a template and parameters. Returns the syntax as text; read it, edit it, then pass to `run_syntax`. Does not run anything.
Compare fit indices from two Mplus output files. Computes differences and scaled chi-square tests for MLR.
Convert a CSV, Excel, SPSS (.sav), Stata (.dta) or parquet file into an Mplus .dat file: numeric only, no header, missing values flagged, names cut to 8 characters. Returns the DATA and VARIABLE block to paste into an input file, plus a per-variable summary and a note of anything that was renamed or recoded.
Report which Mplus executable will be used, its version, and any demo-version limits. Call this first when a run fails for reasons that look like the installation rather than the model.
Read a section from an Mplus output file and return it as text. Useful for extracting specific parts of the output.
Read a file written by Mplus SAVEDATA and return it as a table. Handles fixed-width and space-delimited formats.
Output schemas not documented. Tools return structured data (markdown tables, parsed fit indices, parameter estimates) but no explicit schema definitions are visible in source. LLMs cannot plan downstream operations without knowing return field names and types.
Tool annotations missing. No readOnlyHint, destructiveHint, or idempotentHint attributes visible. Agents cannot distinguish safe (read-only) tools from state-modifying ones without explicit hints.
Error handling lacks recovery guidance. No visible error classification (retryable vs user-fixable vs fatal) or actionable error messages. When run_syntax fails, agents receive no guidance on next steps.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | 2026-07-28+ | v2 |
Write an input file to disk, run Mplus on it, and read back the output. Folds long lines and flags anything else it can see. Every run leaves a real .inp and .out on disk.
Read an Mplus output file and return a markdown summary: status, warnings, fit indices, parameter estimates, and more. Highly configurable.
Mplus syntax reference by topic: overview, data, variable, analysis, model, mediation, cfa, invariance, growth, mixture, multilevel, output, fit, montecarlo, errors, demo. Call with no topic to list them. Use it before writing syntax for a model family you have not written recently.
Parameter 'include' in summarize_output accepts arbitrary strings but only recognizes specific keys (fit, params, standardized, etc.). Should be an enum to prevent hallucinated values.
No pagination support. Tools like output_section and read_savedata may return large results (entire output files, large data tables) without limit or offset parameters. Could exhaust context windows.