Skip to main content
Glama
Ian3738
by Ian3738

mplus-mcp

test License: MIT Python 3.12+ Mplus 8

Mplus を操作する MCP サーバーです。データの準備、入力ファイルの作成と実行、出力の読み取りを、数百行の固定幅テキストではなくテーブルとして行います。

ライセンス版の実行ファイルと Mplus Demo(モデルが従属変数 6 個・独立変数 2 個に制限されます)の両方で動作します。

繁体中国語の説明は README.zh-TW.md を参照してください。


ツール

ツール

機能

mplus_status

使用中の実行ファイル、そのバージョン、デモの制限を表示

syntax_help

トピック別の構文リファレンス(モデル、混合、不変性、エラーなど)

data_prepare

CSV/Excel/SPSS/Stata → Mplus の .dat ファイルと VARIABLE ブロックを作成

build_syntax

cfa、efa、path、sem、mediation、growth、lpa、lca、invariance、twolevel の入力構文を作成

run_syntax

構文をファイルに書き込み、実行し、出力を要約

run_file

既存の .inp を実行

output_summary

任意の .out を再読込:適合度、推定値、警告

output_section

特定のセクションをそのまま表示(TECH1、残差、ランダム開始点など)

compare_fit

適合指標を並べて表示し、スケーリング済みカイ二乗差検定を実施

savedata_read

因子スコアやクラス確率を読み戻し、必要に応じて CSV として出力

Related MCP server: aigroup-econ-mcp

インストール

uv と Mplus のインストールが必要です。デモ版でも動作します。

Claude Code

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

Claude Desktop

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"]
    }
  }
}

クライアントが uvx を見つけられない場合は、絶対パスを指定してください(which uvx)。

クローンから

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

run-server.sh は、素の uv run では対応できない 2 つの状況のために存在します。PATH に uv がない状態で起動する GUI クライアントと、iCloud Drive 内のクローン(仮想環境を同期フォルダの外に置く必要がある場合)です。

設定

変数

デフォルト

目的

MPLUS_MCP_BINARY

最初に見つかった実行ファイル(下記参照)

Mplus 実行ファイルへのパス。ライセンス版をデモより優先する場合に設定します。

MPLUS_MCP_WORKDIR

~/Mplus-MCP

フォルダが指定されない場合の実行場所

自動検索される場所:mplus / mpdemo(PATH 上)、/Applications/Mplus/mplus/Applications/MplusDemo/mpdemo/usr/local/bin/mplus/opt/mplus/mplusC:\Program Files\Mplus\Mplus.exe

.sav ファイルを読み取るには追加パッケージが必要です:uv sync--extra spss を追加するか、uvx --from "git+https://github.com/Ian3738/mplus-mcp[spss]" mplus-mcp を使用します。

セットアップを確認するには、モデルに mplus_status を呼び出させてください。

セッションの流れ

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)

Mplus 自体に関する注意

  • データファイルは入力ファイルが実行されるフォルダを基準に解決されるため、サーバーは常に .inp フォルダを作業ディレクトリとして実行し、データはファイル名のみで参照します。これにより、スペースを含むフォルダ名でも動作します。

  • 入力行は 90 文字に制限されています。run_syntax は長い行を折り返します。

  • 変数名は 8 文字に制限されています。data_prepare は名前を変更して報告します。

  • 実行が失敗しても .out ファイルは書き出されるため、エラーは解析され、該当する場合は既知の原因とともに返されます。

ライセンス

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