SPSS Studio MCP
Click on "Deploy 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., "@SPSS Studio MCP Run PROCESS Model 4 mediation: X=autonomy, M=satisfaction, Y=performance, 5000 bootstraps"
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.
SPSS Studio MCP
让 SPSS 成为 Agent 的「统计引擎 + 制图工厂」:论文级图片、深度结果解析、方法真机验证、安全执行。
简体中文 | English
spss-studio-mcp 是一个面向 IBM SPSS Statistics 的 MCP(Model Context
Protocol)服务器,为 Codex / Claude Code / Cursor 等 Agent 客户端提供:
论文级出图:11 类
spss_chart_*工具,一键导出 PNG / TIFF / EMF(1950×1500 @300 dpi),路径回传可直接投稿;深度结果解析:OMS 文本 → Markdown 表格 + 结构化 JSON + 16 类分析统计摘要(t / F / r / B / Wald / α / χ² / p / 效应量);
方法真机验证:37 个分析方法 + 11 个补充工具全部在真实 SPSS 32 验收通过;
中介 / 调节:新增
spss_process调用本机 Hayes PROCESS Model 4(单一/并行中介、Bootstrap),并保留spss_mediation三步回归 + Sobel 与spss_moderation中心化交互回归;安全执行层:危险命令拦截、数据路径白名单、
dry_run预检、JSONL 审计日志。
原版分析与制图能力已在 IBM SPSS Statistics 32.0.0(Windows) 真机验证;新增 PROCESS 适配已通过自动测试,其 Windows 真机执行仍需在安装了 PROCESS 的 Windows SPSS 上复核。
系统架构

MCP 客户端(Codex / Claude Code / Cursor)
│ MCP 协议(stdio)
▼
工具层 60+ 工具:文件/元数据 · 37+ 分析方法 · 11 类图表 · 中介/调节 · 结构化结果
▼
语法构建 方法模板 + Pydantic 校验 | 安全层(危险拦截 / 白名单 / dry_run / 审计)
▼
引擎层 SPSS Python3 XD API 持久会话(spss.StartSPSS / spss.Submit)
▼
输出层 OMS TEXT→Markdown+JSON 摘要 | OMS HTML→PNG/TIFF | OMS DOCX→EMF
▼
IBM SPSS Statistics 32.0.0(Windows,本地授权)架构源文件(draw.io 可编辑):docs/diagrams/architecture.drawio
Related MCP server: SPSS-MCP Extended
快速开始
git clone https://github.com/beatricej0929-creator/spss-studio-mcp-windows-process.git
cd spss-studio-mcp-windows-process
pip install -e ".[dev]"
spss-studio-mcp status # 应显示 SPSS batch: OK
spss-studio-mcp configure-codex # 写入 Codex 客户端配置(~/.codex/config.toml)
spss-studio-mcp configure-claude # 写入 Claude Code 配置(~/.claude.json)Hayes PROCESS Model 4
本仓库不分发第三方 process.sps。请从 Andrew F. Hayes 官方网站
下载 PROCESS,解压后在 PowerShell 中设置:
$env:SPSS_PROCESS_MACRO_PATH = "C:\Users\YourName\Downloads\PROCESS v5.1 for SPSS\process.sps"也可以把该值写入项目根目录的 .env。重启 MCP 客户端后运行
spss_check_status;状态表显示 PROCESS 版本即可调用:
用 spss_process 运行 Model 4:X=PEOU,M=PU,Y=BI,Bootstrap 5000 次。首版支持一个中介或多个并行中介、协变量、总效应/直接效应/间接效应、 Bootstrap 置信区间、间接效应对比、效应量和标准化系数。SPSS 图形菜单不是必需的。
然后在客户端里直接用自然语言驱动,例如:
对 examples/data/survey_study.sav 做描述统计和可靠性分析
用 examples/data/experiment_study.sav 做独立样本 t 检验(group 分组,posttest)
用 examples/data/mediation_study.sav 做中介分析:autonomy → satisfaction → performance
画 examples/data/survey_study.sav 学习投入总分的直方图(带正态密度),PNG 300dpi论文级图表(核心卖点)
工具 | 用途 |
| 分布直方图 / 直方图 + 正态密度 |
| 两变量散点图 |
| 分类均值条形 / 条形 + 95% CI 误差须 |
| 时间序列折线 / 面积图 |
| 分组箱线图 |
| 均值 ± CI 误差条 |
| 正态 Q-Q 图 |
| Kaplan-Meier 生存曲线 |
spss_chart_histogram_density(
variable="engagement_total",
title="学习投入总分分布(带正态密度)",
image_format="PNG", # PNG / TIFF / EMF
width_px=1950, height_px=1500, dpi=300,
data_file="examples/data/survey_study.sav",
)
# → 返回图片文件路径,可直接投稿样例输出(SPSS 32 真机导出,1950×1500 @300 dpi):

结构化结果与统计摘要
spss_structured_result(
syntax="T-TEST GROUPS=group(1 2) /VARIABLES=posttest.",
data_file="examples/data/experiment_study.sav",
)
# → {markdown, json: {tables, summary}, files, warnings}run_syntax 返回的 Markdown 末尾自动附加 ### 统计摘要(自然语言结论 + 关键统计量),
16 类分析的摘要抽取细节见 docs/result_parsing.md。
样例数据
examples/data/ 提供 5 组贴近论文场景的样例数据(固定随机种子,可复现):
文件 | 场景 | 关键变量 |
| 问卷:200 人学习投入 |
|
| 实验:120 人记忆训练前后测 |
|
| 生存:150 例随访 |
|
| 中介:300 员工 |
|
| 纵向:60 人 3 次测量 |
|
安全执行
危险命令(
HOST/ERASE/DELETE FILE等)行首匹配拦截;数据文件路径白名单(
SPSS_ALLOWED_DIRS,默认examples/+ 系统临时目录);spss_run_syntax(..., dry_run=True)先校验不执行;审计日志默认写入
logs/audit.jsonl(可用SPSS_AUDIT_LOG改路径)。
详见 docs/security.md。
文档
Agent 傻瓜式使用教程:包含一键安装 Prompt、Codex/Claude Code 配置、论文分析场景和故障排查
生态收录与发布
状态:基于 Windows v1.0.0 增加 PROCESS Model 4,当前版本 v1.1.0(GitHub Releases);
LobeHub / PulseMCP 收录条目与提交清单:docs/ecosystem.md;
Release v1.1.0 说明:docs/release_notes_v1.1.0.md。
许可证
MIT(Windows 上游:flupke91/spss-studio-mcp;更早上游:Exekiel179/SPSS-MCP)。
Available Tools
52 toolsspss_anovaSpss AnovaB
Run SPSS one-way ANOVA (ONEWAY). Optionally includes post-hoc tests (e.g., TUKEY, BONFERRONI, LSD). Requires IBM SPSS Statistics to be installed.
Inputs: factor (required), dependent (required), file_path (required), post_hoc. Returns: result
spss_chart_areaSpss Chart AreaB
Export a publication-ready area chart (PNG/TIFF/EMF) of y against a time/ordinal x variable, via GGRAPH + OMS.
Inputs: x (required), y (required), dpi, title, +6 more. Returns: result
spss_chart_barSpss Chart BarB
Export a publication-ready bar chart (PNG/TIFF/EMF) of a categorical variable against the mean (or sum) of a continuous variable, via GGRAPH + OMS IMAGE.
Inputs: value (required), category (required), dpi, stat, +7 more. Returns: result
spss_chart_bar_errorSpss Chart Bar ErrorC
Export a publication-ready bar chart of category means with confidence-interval error bars (PNG/TIFF/EMF) via GGRAPH + OMS.
Inputs: value (required), category (required), ci, dpi, +7 more. Returns: result
spss_chart_boxplotSpss Chart BoxplotC
Export a publication-ready box-and-whisker plot (PNG/TIFF/EMF) via GGRAPH + OMS. Provide a continuous variable and optionally a categorical grouping variable.
Inputs: variable (required), dpi, title, x_label, +6 more. Returns: result
spss_chart_errorbarSpss Chart ErrorbarC
Export a publication-ready error bar chart (PNG/TIFF/EMF): mean with confidence-interval whiskers per category, via GGRAPH + OMS.
Inputs: value (required), category (required), ci, dpi, +7 more. Returns: result
spss_chart_histogramSpss Chart HistogramC
Export a publication-ready histogram (PNG/TIFF/EMF) via GGRAPH + OMS IMAGE. Provide the continuous variable; the chart file path is returned for direct submission.
Inputs: variable (required), dpi, title, x_label, +5 more. Returns: result
spss_chart_histogram_densitySpss Chart Histogram DensityB
Export a publication-ready histogram overlaid with a normal density curve (PNG/TIFF/EMF) via GGRAPH + OMS. Provide a continuous variable.
Inputs: variable (required), dpi, title, x_label, +5 more. Returns: result
spss_chart_km_curveSpss Chart Km CurveC
Export a publication-ready Kaplan-Meier survival curve (PNG/TIFF/EMF) via the KM procedure. Provide time and status variables; group is optional.
Inputs: time (required), status (required), dpi, event, +6 more. Returns: result
spss_chart_lineSpss Chart LineB
Export a publication-ready line chart (PNG/TIFF/EMF) via GGRAPH + OMS IMAGE. Provide the x (time/ordinal) and y variables; the file path is returned.
Inputs: x (required), y (required), dpi, title, +6 more. Returns: result
spss_chart_qqplotSpss Chart QqplotA
Export a publication-ready normal Q-Q plot (PNG/TIFF/EMF) of a continuous variable via PPLOT, captured through the OMS chart pipeline.
Inputs: variable (required), dpi, title, width_px, +3 more. Returns: result
spss_chart_scatterSpss Chart ScatterC
Export a publication-ready scatter plot (PNG/TIFF/EMF) via GGRAPH + OMS IMAGE. Provide x and y variables; the chart file path is returned for direct submission.
Inputs: x (required), y (required), dpi, title, +6 more. Returns: result
spss_check_statusSpss Check StatusA
Check the SPSS MCP server status: which capabilities are available (SPSS installed vs file-only mode), SPSS path, library versions, and configuration. Call this first to understand what tools are available.
Inputs: no named parameters. Returns: result
spss_cluster_hierarchicalSpss Cluster HierarchicalC
Run hierarchical cluster analysis with dendrogram. Supports multiple linkage methods and distance measures. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), variables (required), method, measure, +2 more. Returns: result
spss_compute_scale_scoreSpss Compute Scale ScoreC
Compute a scale score (SUM or MEAN) from multiple item variables, with optional reverse coding and minimum valid item count. Requires IBM SPSS Statistics to be installed.
Inputs: items (required), file_path (required), new_variable (required), method, +4 more. Returns: result
spss_correlationsSpss CorrelationsC
Run SPSS CORRELATIONS to compute Pearson or Spearman correlation matrix. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), variables (required), method, two_tailed. Returns: result
spss_cox_regressionSpss Cox RegressionC
Run Cox proportional hazards regression for survival analysis. Supports time-dependent covariates, stratification, and model diagnostics. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), predictors (required), time_variable (required), status_variable (required), +5 more. Returns: result
spss_crosstabsSpss CrosstabsA
Run SPSS CROSSTABS to create a contingency table between two categorical variables. Optionally includes chi-square test and row/column percentages. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), row_variable (required), column_variable (required), include_col_pct, +2 more. Returns: result
spss_descriptivesSpss DescriptivesB
Run SPSS DESCRIPTIVES for numeric variables. Returns N, mean, std deviation, min, max, and optional statistics. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), variables (required), statistics. Returns: result
spss_discriminantSpss DiscriminantC
Run discriminant analysis to classify cases into groups. Supports stepwise selection and cross-validation. Requires IBM SPSS Statistics to be installed.
Inputs: groups (required), file_path (required), predictors (required), method, +4 more. Returns: result
spss_factorSpss FactorC
Run SPSS FACTOR analysis (principal components or principal axis factoring). Includes eigenvalues, variance explained, and rotated factor matrix. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), variables (required), method, rotation, +1 more. Returns: result
spss_file_summarySpss File SummaryA
Get a summary of an SPSS .sav file: case count, variable count, variable list, and basic descriptive statistics computed locally (no SPSS needed). Does not require SPSS to be installed.
Inputs: file_path (required). Returns: result
spss_frequenciesSpss FrequenciesB
Run SPSS FREQUENCIES on one or more variables. Returns frequency tables with counts, percentages, and optional statistics. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), variables (required), statistics. Returns: result
spss_genlinSpss GenlinC
Run generalized linear model (GENLIN) with flexible distribution and link functions. Supports Poisson, binomial, gamma, negative binomial, and other distributions. Requires IBM SPSS Statistics to be installed.
Inputs: dependent (required), file_path (required), predictors (required), link, +4 more. Returns: result
spss_genlinmixedSpss GenlinmixedC
Run generalized linear mixed model combining GLM with random effects. Supports non-normal outcomes with hierarchical structure. Requires IBM SPSS Statistics to be installed.
Inputs: dependent (required), file_path (required), fixed_effects (required), link, +3 more. Returns: result
spss_get_method_schemaSpss Get Method SchemaA
Get the JSON schema for a registry-backed SPSS method. Useful for structured orchestration and parameter inspection before execution.
Inputs: tool_name (required). Returns: result
spss_get_method_supportSpss Get Method SupportB
Get support metadata for a registry-backed SPSS method, including command family, support tier, coverage assertions, and documentation tags.
Inputs: tool_name (required). Returns: result
spss_glm_univariateSpss Glm UnivariateB
Run univariate general linear model (GLM) with factorial designs. Supports estimated marginal means, contrasts, and post-hoc tests. Requires IBM SPSS Statistics to be installed.
Inputs: factors (required), dependent (required), file_path (required), emmeans, +4 more. Returns: result
spss_import_csvSpss Import CsvA
Convert a CSV file to SPSS .sav format directly using pandas + pyreadstat — no IBM SPSS Statistics installation required. Much faster than going through SPSS syntax because it bypasses the SPSS engine entirely. Saves the .sav file next to the CSV by default, or to a custom output_path.
Inputs: csv_path (required), encoding, delimiter, output_path, +1 more. Returns: result
spss_kaplan_meierSpss Kaplan MeierC
Run Kaplan-Meier survival analysis with log-rank test. Produces survival curves and compares groups. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), time_variable (required), status_variable (required), status_event_value (required), +3 more. Returns: result
spss_list_filesSpss List FilesB
List SPSS .sav files in a directory. Useful for discovering available datasets when the user hasn't specified a file path.
Inputs: directory (required), recursive. Returns: result
spss_list_supported_methodsSpss List Supported MethodsA
List registry-backed SPSS methods available for structured execution. Use this to discover cold methods that have schemas, templates, and coverage assertions.
Inputs: no named parameters. Returns: result
spss_list_variablesSpss List VariablesB
List all variable names and their labels from an SPSS .sav file. Optionally filter by a search term. Does not require SPSS to be installed.
Inputs: file_path (required), search. Returns: result
spss_logistic_regressionSpss Logistic RegressionB
Run binary or multinomial logistic regression. Supports stepwise selection, categorical predictors, and model diagnostics. Requires IBM SPSS Statistics to be installed.
Inputs: dependent (required), file_path (required), predictors (required), method, +4 more. Returns: result
spss_manovaSpss ManovaC
Run multivariate analysis of variance (MANOVA) for multiple dependent variables. Tests multivariate effects and provides univariate follow-ups. Requires IBM SPSS Statistics to be installed.
Inputs: factors (required), file_path (required), dependents (required), method, +4 more. Returns: result
spss_mediationSpss MediationA
Run a Baron & Kenny three-step mediation analysis (X -> M -> Y) with regression, reporting paths a/b/c/c', the indirect effect a*b, and a Sobel test. Does not bundle the PROCESS macro.
Inputs: x (required), y (required), mediator (required), file_path (required). Returns: result
spss_mixedSpss MixedC
Run linear mixed-effects model (multilevel model) with random effects. Supports nested and crossed random effects, repeated measures structures. Requires IBM SPSS Statistics to be installed.
Inputs: dependent (required), file_path (required), fixed_effects (required), method, +5 more. Returns: result
spss_moderationSpss ModerationA
Run a mean-centred moderation regression (Y ~ X + W + X*W) and report the interaction term that tests the moderating effect of W.
Inputs: x (required), y (required), file_path (required), moderator (required). Returns: result
spss_nonparametric_testsSpss Nonparametric TestsC
Run common nonparametric tests in SPSS: Mann-Whitney U, Wilcoxon signed-rank, or Kruskal-Wallis. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), test_type (required), variables (required), group_values, +1 more. Returns: result
spss_normality_outliersSpss Normality OutliersA
Run SPSS EXAMINE to check normality and outliers for numeric variables, with optional diagnostic plots. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), variables (required), plots. Returns: result
spss_ordinal_regressionSpss Ordinal RegressionB
Run ordinal regression (PLUM) for ordered categorical outcomes. Supports multiple link functions and parallel lines test. Requires IBM SPSS Statistics to be installed.
Inputs: dependent (required), file_path (required), predictors (required), link, +3 more. Returns: result
spss_processSpss ProcessA
Run the locally installed Hayes PROCESS macro for model 4 mediation. Supports one mediator or multiple parallel mediators, bootstrap confidence intervals, covariates, total/direct/indirect effects, pairwise indirect-effect contrasts, effect sizes, and standardized coefficients. The trusted macro path is auto-detected or configured with SPSS_PROCESS_MACRO_PATH; callers cannot supply an arbitrary macro file.
Inputs: x (required), y (required), file_path (required), mediators (required), +12 more. Returns: result
spss_read_dataSpss Read DataB
Read rows of data from an SPSS .sav file as a Markdown table. Optionally filter to specific variables and limit row count. Does not require SPSS to be installed.
Inputs: file_path (required), max_rows, variables, apply_value_labels. Returns: result
spss_read_metadataSpss Read MetadataB
Read variable names, types, labels, and value labels from an SPSS .sav file. Returns a detailed Markdown report of the file's structure. Does not require SPSS to be installed.
Inputs: file_path (required). Returns: result
spss_regressionSpss RegressionB
Run SPSS linear regression. Specify a dependent variable and one or more predictors. Returns coefficients, R-squared, ANOVA table, and significance tests. Requires IBM SPSS Statistics to be installed.
Inputs: dependent (required), file_path (required), predictors (required), method, +1 more. Returns: result
spss_reliability_alphaSpss Reliability AlphaC
Run SPSS RELIABILITY analysis (Cronbach's alpha). Returns scale reliability and item statistics for psychometric workflows. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), variables (required), model, scale_name. Returns: result
spss_repeated_measures_anovaSpss Repeated Measures AnovaB
Run SPSS repeated-measures ANOVA (within-subject GLM). Provide within-factor name, number of levels, and one variable per level. Requires IBM SPSS Statistics to be installed.
Inputs: levels (required), file_path (required), variables (required), within_factor_name (required), +1 more. Returns: result
spss_run_syntaxSpss Run SyntaxB
Execute arbitrary SPSS syntax commands and return the output as Markdown. Optionally specify a data_file to automatically prepend GET FILE. By default, this also persists .spv (SPSS viewer) and .sps (executed syntax) files. Requires IBM SPSS Statistics to be installed.
Inputs: syntax (required), dry_run, data_file, select_if, +3 more. Returns: result
spss_structured_resultSpss Structured ResultC
Run SPSS syntax and return a unified structured result as JSON: {markdown, json: {tables, summary}, files, warnings}. The summary extracts key statistics (t/F/r/B/p) for t-test, ANOVA, correlation, regression, descriptives and frequencies.
Inputs: syntax (required), data_file, select_if, filter_variable, +2 more. Returns: result
spss_t_testSpss T TestC
Run SPSS t-test. Supports one_sample, independent, and paired test types. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), test_type (required), variables (required), test_value, +1 more. Returns: result
spss_twostep_clusterSpss Twostep ClusterB
Run two-step cluster analysis with automatic cluster number determination. Handles large datasets and mixed variable types. Requires IBM SPSS Statistics to be installed.
Inputs: file_path (required), distance, continuous, categorical, +3 more. Returns: result
spss_validate_syntaxSpss Validate SyntaxA
Validate SPSS syntax without executing it. Checks for basic syntax errors. Requires IBM SPSS Statistics to be installed.
Inputs: syntax (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 52 tools
Most tools target clearly distinct statistical procedures, but there are real overlap clusters: spss_process vs spss_mediation (two mediation paths), spss_run_syntax vs spss_structured_result (both execute syntax), and spss_chart_bar vs spss_chart_bar_error vs spss_chart_errorbar (three similar bar/CI variants). Descriptions do help disambiguate, but an agent could easily misselect among these pairs without careful reading.
All tools share a consistent spss_ prefix and snake_case, with no camelCase or style mixing. However, there is a split between verb_noun names (spss_run_syntax, spss_read_data, spss_get_method_schema) and bare procedure names (spss_frequencies, spss_regression, spss_crosstabs), which slightly breaks the uniform pattern.
At 52 tools this is well above a comfortable surface, even for a rich statistics domain. Many are legitimate distinct procedures, but the 11 chart_* variants and three separate metadata-reading tools plus a registry trio make the set feel bloated and could be consolidated.
Coverage is strong: file discovery/reading, CSV import, syntax validation/execution, a wide statistical procedure set, chart export, and registry introspection. Notable gaps remain around data manipulation (recode, select/filter cases, sort, merge datasets) and exporting results back to other formats, which agents would often need.
Maintenance
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
The Excel engine for AI agents: read, check and edit Excel models over MCP.
Windows computers for AI agents. Office, desktop apps, browser tasks, testing and file transfer.
Connect AI assistants to registered Windows and macOS computers using OAuth 2.0 and Streamable HTTP. Use 19 MCP tools for files, commands, processes, services and TLS 1.3 direct LAN file transfer. The Windows desktop client includes MCP Services to scan supported local software and quick-connect integrations such as ComfyUI, Blender, DaVinci Resolve, OBS and Microsoft Office. Free plan: 1 device and 10,000 tool calls/month. Windows guide: https://github.com/DNSDATA/dns-data-mcp/tree/main/windows-client Glama repository listing: https://glama.ai/mcp/servers/DNSDATA/dns-data-mcp
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to drive IBM SPSS Statistics for statistical analysis and publication-quality chart generation through natural language, returning structured results and ensuring safe execution.2519MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to execute IBM SPSS Statistics workflows via natural language, covering data management, restructuring, analysis, charting, and report export.6936 PyPI2MIT
- AlicenseBqualityCmaintenanceEnables AI agents to run IBM SPSS Statistics on macOS for statistical analyses, generate paper-ready charts, extract structured results, and execute mediation/moderation analyses with safety controls.51MIT
- AlicenseBqualityBmaintenanceEnables AI agents to safely execute statistical analyses, parse results into Markdown and JSON, and generate publication-ready charts through a local IBM SPSS Statistics installation on macOS and Windows.5126 PyPI1MIT