SPSS Studio MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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)。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A statistical analyst in your AI chat: bring data and a question, get a citable, re-runnable report.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
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.518MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to execute IBM SPSS Statistics workflows via natural language, covering data management, restructuring, analysis, charting, and report export.691MIT
- AlicenseBqualityBmaintenanceEnables 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
- AlicenseCqualityBmaintenanceEnables an agent to drive STATISTICA 12 through its COM interface, opening and editing .sta/.stw data files, writing formulas, and running built-in or arbitrary analysis modules (descriptives, correlation, t-tests, regression, time series, graphs) while returning results as tables or exported files. Supports both stateless batch calls and an "attach" mode that edits a live open STATISTICA window.41Apache 2.0