mplus-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mplus-mcpRun a growth model on my longitudinal data and compare fit"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mplus-mcp
An MCP server that drives Mplus: it prepares data, writes and runs input files, and reads the output back as tables instead of several hundred lines of fixed-width text.
Works with the licensed executable and with Mplus Demo (which caps the model at 6 dependent and 2 independent variables).
繁體中文說明請見 README.zh-TW.md。
Tools
Tool | What it does |
| Which executable is in use, its version, demo limits |
| Syntax reference by topic (model, mixture, invariance, errors …) |
| CSV/Excel/SPSS/Stata → an Mplus |
| Input syntax for cfa, efa, path, sem, mediation, growth, lpa, lca, invariance, twolevel |
| Write syntax to a file, run it, summarise the output |
| Run an existing |
| Re-read any |
| One section verbatim (TECH1, residuals, random starts …) |
| Fit indices side by side, with a scaled chi-square difference test |
| Read back factor scores / class probabilities, optionally as CSV |
Related MCP server: aigroup-econ-mcp
Install
Needs uv and an installation of Mplus. The demo build works too.
Claude Code
claude mcp add mplus -- uvx --from git+https://github.com/Ian3738/mplus-mcp mplus-mcpClaude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/,
Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"mplus": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Ian3738/mplus-mcp", "mplus-mcp"]
}
}
}If the client cannot find uvx, give the absolute path (which uvx).
From a clone
git clone https://github.com/Ian3738/mplus-mcp
cd mplus-mcp
uv sync
claude mcp add mplus -- "$(pwd)/run-server.sh"run-server.sh exists for two situations a bare uv run does not handle: GUI
clients that start without uv on PATH, and clones inside iCloud Drive, where
the virtualenv has to live outside the synced folder.
Configuration
Variable | Default | Purpose |
| first executable found (see below) | Path to the Mplus executable. Set it to prefer a licensed copy over the demo. |
|
| Where runs go when no folder is given |
Searched automatically: mplus / mpdemo on PATH, /Applications/Mplus/mplus,
/Applications/MplusDemo/mpdemo, /usr/local/bin/mplus, /opt/mplus/mplus,
C:\Program Files\Mplus\Mplus.exe.
Reading .sav files needs one extra package: add --extra spss to uv sync, or
use uvx --from "git+https://github.com/Ian3738/mplus-mcp[spss]" mplus-mcp.
Verify the setup by asking the model to call mplus_status.
How a session goes
data_prepare(path="ses.csv")
→ writes ses.dat, reports that `motivation` became `motivat`, hands back
NAMES = id sex y1 y2 y3 y4 x1 x2; MISSING = ALL (-999);
build_syntax(model_type="cfa", data_file="ses.dat",
names="id sex y1-y4 x1 x2",
factors={"F1": ["y1", "y2", "y3", "y4"]})
→ the input file as text
run_syntax(syntax=..., workdir="/path/holding/ses.dat", name="cfa1")
→ status, fit table, parameter estimates, any warnings, and cfa1.out on disk
compare_fit(out_paths=["cfa1.out", "cfa2.out"], chisq_diff=True)Notes on Mplus itself
Data files are resolved relative to the folder the input file runs in, so the server always runs with the working directory set to the
.inpfolder and refers to data by its bare file name. That is what makes folder names with spaces work.Input lines are capped at 90 characters;
run_syntaxfolds longer ones.Variable names are capped at 8 characters;
data_preparerenames and reports.A run that fails still writes an
.out, so the error is parsed and returned with the well-known causes attached where they apply.
Licence
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for NONMEM pharmacometric modeling that provides structured access to model parsing, execution, and results analysis. It enables users to perform diagnostics, manage PsN workflows, and translate models to mrgsolve for PK simulations through natural language.2215MIT
- AlicenseNot gradedqualityDmaintenanceEconometrics MCP server for regression, causal inference, time series, panel data, machine learning, and broader statistical analysis workflows.10MIT
- FlicenseNot gradedqualityCmaintenanceEnables comprehensive statistical analysis including descriptive statistics, hypothesis testing, regression, and more via a FastMCP-based API.3
- FlicenseNot gradedqualityCmaintenanceMCP bridge for Demeter/Artemis EXAFS fitting. Enables headless fits, building Artemis projects, generating LaTeX reports, and launching the Artemis GUI.
Related MCP Connectors
Sports Game Odds MCP — wraps the Sports Game Odds API (sportsgameodds.com)
Patents MCP — wraps the USPTO Open Data Portal (ODP) Patent File Wrapper API
EPA Emissions MCP — wraps EPA Envirofacts REST API (free, no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ian3738/mplus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server