Skip to main content
Glama
Ian3738
by Ian3738

mplus-mcp

test License: MIT Python 3.12+ Mplus 8

Ein MCP-Server, der Mplus steuert: Er bereitet Daten vor, schreibt und führt Eingabedateien aus und liest die Ausgabe als Tabellen zurück – statt mehrerer hundert Zeilen Festbreitentext.

Funktioniert mit der lizenzierten ausführbaren Datei und mit Mplus Demo (das das Modell auf 6 abhängige und 2 unabhängige Variablen begrenzt).

繁體中文說明請見 README.zh-TW.md


Werkzeuge

Werkzeug

Was es tut

mplus_status

Welche ausführbare Datei verwendet wird, ihre Version, Demo-Limits

syntax_help

Syntax-Referenz nach Thema (Modell, Mischung, Invarianz, Fehler …)

data_prepare

CSV/Excel/SPSS/Stata → eine Mplus-.dat-Datei plus den VARIABLE-Block

build_syntax

Eingabesyntax für cfa, efa, path, sem, mediation, growth, lpa, lca, invariance, twolevel

run_syntax

Syntax in eine Datei schreiben, ausführen, Ausgabe zusammenfassen

run_file

Eine vorhandene .inp-Datei ausführen

output_summary

Jede .out-Datei erneut lesen: Anpassung, Schätzungen, Warnungen

output_section

Ein Abschnitt wörtlich (TECH1, Residuen, Zufallsstarts …)

compare_fit

Anpassungsindizes nebeneinander, mit skaliertem Chi-Quadrat-Differenztest

savedata_read

Faktorwerte / Klassenwahrscheinlichkeiten zurücklesen, optional als CSV

Related MCP server: aigroup-econ-mcp

Installation

Benötigt uv und eine Installation von Mplus. Die Demo-Version funktioniert ebenfalls.

Claude Code

claude mcp add mplus -- uvx --from git+https://github.com/Ian3738/mplus-mcp mplus-mcp

Claude Desktop

Fügen Sie zu claude_desktop_config.json hinzu (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):

{
  "mcpServers": {
    "mplus": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Ian3738/mplus-mcp", "mplus-mcp"]
    }
  }
}

Wenn der Client uvx nicht finden kann, geben Sie den absoluten Pfad an (which uvx).

Aus einem Klon

git clone https://github.com/Ian3738/mplus-mcp
cd mplus-mcp
uv sync
claude mcp add mplus -- "$(pwd)/run-server.sh"

run-server.sh existiert für zwei Situationen, die ein bloßes uv run nicht abdeckt: GUI-Clients, die ohne uv im PATH starten, und Klone in iCloud Drive, wo die virtuelle Umgebung außerhalb des synchronisierten Ordners liegen muss.

Konfiguration

Variable

Standard

Zweck

MPLUS_MCP_BINARY

erste gefundene ausführbare Datei (siehe unten)

Pfad zur Mplus-Ausführungsdatei. Setzen Sie dies, um eine lizenzierte Kopie der Demo vorzuziehen.

MPLUS_MCP_WORKDIR

~/Mplus-MCP

Wo Ausführungen abgelegt werden, wenn kein Ordner angegeben ist

Automatisch gesucht: mplus / mpdemo im PATH, /Applications/Mplus/mplus, /Applications/MplusDemo/mpdemo, /usr/local/bin/mplus, /opt/mplus/mplus, C:\Program Files\Mplus\Mplus.exe.

Das Lesen von .sav-Dateien benötigt ein zusätzliches Paket: Fügen Sie --extra spss zu uv sync hinzu oder verwenden Sie uvx --from "git+https://github.com/Ian3738/mplus-mcp[spss]" mplus-mcp.

Überprüfen Sie die Einrichtung, indem Sie das Modell bitten, mplus_status aufzurufen.

Wie eine Sitzung abläuft

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)

Hinweise zu Mplus selbst

  • Datendateien werden relativ zum Ordner aufgelöst, in dem die Eingabedatei ausgeführt wird. Der Server führt daher immer mit dem Arbeitsverzeichnis auf den .inp-Ordner aus und verweist auf Daten nur mit ihrem bloßen Dateinamen. Dadurch funktionieren Ordnernamen mit Leerzeichen.

  • Eingabezeilen sind auf 90 Zeichen begrenzt; run_syntax faltet längere um.

  • Variablennamen sind auf 8 Zeichen begrenzt; data_prepare benennt um und meldet.

  • Ein Lauf, der fehlschlägt, schreibt trotzdem eine .out-Datei, sodass der Fehler analysiert und mit den bekannten Ursachen zurückgegeben wird, wo sie zutreffen.

Lizenz

MIT

A
license - permissive license
A
quality
C
maintenance

Maintenance

0Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Provides easy access to MLB, Baseball Savant, Statcast, and Fangraphs baseball data. Query detaile…

  • Structured analysis API and remote MCP tool for text, JSON records and numeric series.

  • IMF MCP — wraps IMF SDMX JSON REST API (dataservices.imf.org)

  • Provide structured access to ClinicalTrials.gov data for searching, retrieving, and analyzing clin…

View all MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An 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.
    22
    15
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables comprehensive statistical analysis including descriptive statistics, hypothesis testing, regression, and more via a FastMCP-based API.
    3

View all related MCP servers

Latest Blog Posts

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