{"name":"io.github.aliveranme/stata-mcp","slug":"aliveranme-stata-mcp","title":"Stata MCP Server","description":"通过 pystata 驱动真实 Stata 的 MCP 服务器：数据加载/清洗/建模/诊断/图形导出，75 个工具覆盖完整计量工作流。","url":"https://mcp.market/server/aliveranme-stata-mcp","rating":null,"grade":"A","score":88,"certified":false,"status":"active","category":"other","tags":[],"presence":{"score":20,"stars":0,"forks":0,"downloads_week":95,"last_push_at":"2026-08-30T20:25:11.000Z","license":"MIT"},"uptime":null,"claimed":false,"transport":"npm","callable_via_gateway":false,"default_price_micros":0,"repository":"https://github.com/aliveranme/stata-mcp","website":null,"version":"1.0.10","remotes":[],"packages":[{"registryType":"npm","identifier":"@aliveranme/stata-mcp","version":"1.0.10","runtimeHint":"npx","transport":{"type":"stdio"},"environmentVariables":[{"description":"Stata 安装目录（含 utilities/pystata），如 /Applications/StataNow","isRequired":true,"format":"filepath","name":"STATA_HOME"},{"description":"Stata 版本 mp|se|be","format":"string","default":"mp","name":"STATA_EDITION"},{"description":"路径沙箱白名单（分号分隔）；可选","format":"string","name":"STATA_ALLOWED_ROOTS"}]}],"tools":[{"name":"stata_append","description":"纵向追加数据集（``append``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_background","description":"在后台执行 Stata 命令，立即返回任务号，不阻塞当前请求。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_clear","description":"重置 / 清空当前 Stata 会话状态。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_codebook","description":"生成数据集的 Codebook（变量字典）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_collapse","description":"按组聚合，把数据集**就地替换**为汇总结果（``collapse``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_correlate","description":"计算相关系数矩阵。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_describe","description":"描述当前数据集的变量信息。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_describe_package","description":"查看某个扩展包的详情（作者、功能、包含的文件）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_destring","description":"把字符串变量转为数值变量（destring）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_display","description":"计算并显示 Stata 表达式的结果。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_drop","description":"删除变量或观测（drop）。","write_action":true,"price_micros":0,"input_schema":null},{"name":"stata_egen","description":"用扩展生成函数创建新变量（egen）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_estat","description":"运行后估计诊断（``estat``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_estimates","description":"管理已存储的估计结果（``estimates``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_etable","description":"生成回归结果表并可导出（官方 ``etable``，Stata 17+）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_export_delimited","description":"将当前数据集导出为分隔文本文件（CSV / TSV / 自定义分隔符）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_export_excel","description":"将当前数据集导出为 Excel (.xlsx/.xls) 文件，或将回归结果导出为 CSV。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_find_package","description":"搜索可安装的 Stata 扩展包（联网）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_frame","description":"管理数据 frame —— 在内存中同时持有多个数据集（Stata 16+）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_generate","description":"创建新变量（generate）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_graph","description":"生成 Stata 图形并可选导出为文件。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_hausman","description":"对两个已存储的估计结果做 Hausman 设定检验（``hausman``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_help","description":"查询任意 Stata 命令的官方帮助文档（语法、选项、示例）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_import","description":"导入非 .dta 格式的数据文件（与 stata_export_* 对称）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_install_package","description":"安装 Stata 扩展包（联网）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_ivregress","description":"运行工具变量回归（ivregress，2SLS/LIML/GMM）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_keep","description":"保留变量或观测，删除其余（keep）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_lincom","description":"对当前估计结果做线性组合的 Wald 检验（``lincom``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_list","description":"列出当前数据集中的数据值。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_list_packages","description":"列出当前已安装的所有 Stata 扩展包（包名 + 一句简介）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_list_resources","description":"列出本会话全部已登记的文件资源。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_logistic","description":"运行 Logistic 回归分析。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_logit","description":"运行 Logit 回归分析。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_margins","description":"估计边际效应 / 预测边际（margins，后估计命令）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_merge","description":"横向合并数据集（``merge``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_mixed","description":"运行多层混合效应线性回归（multilevel mixed-effects，mixed）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_mlogit","description":"运行多分类 Logit 回归分析（multinomial logit）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_more","description":"翻页浏览上一条 Stata 命令的完整输出。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_nbreg","description":"运行负二项回归分析（negative binomial regression）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_nlcom","description":"对当前估计结果做非线性组合的 delta 法检验（``nlcom``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_ping","description":"心跳检测 — 快速测试 Stata MCP Server 是否存活。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_poisson","description":"运行 Poisson 回归（计数因变量）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_predict","description":"在估计后生成预测值 / 残差等（predict，后估计命令）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_probit","description":"运行 Probit 回归（二元因变量）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_qreg","description":"运行分位数回归（quantile regression，qreg）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_read_file","description":"读取本会话导出/登记的文件（**实际内容**，而不仅是路径）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_read_log","description":"读取本 MCP Server 自身的运行日志（stata-mcp.log）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_recode","description":"按规则组重编码变量取值（recode）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_register_file","description":"把磁盘上已有的文件显式登记为可读资源。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_regress","description":"运行线性回归分析 (OLS)。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_rename","description":"重命名变量（rename）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_replace","description":"替换既有变量的取值（replace）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_reshape","description":"长宽表互转（``reshape``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_return_list","description":"一次列出全部返回值（``return`` / ``ereturn`` / ``creturn list``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_run","description":"执行一条或多条 Stata 命令并返回输出。","write_action":true,"price_micros":0,"input_schema":null},{"name":"stata_run_do_file","description":"执行一个 Stata .do 文件并返回全部输出。","write_action":true,"price_micros":0,"input_schema":null},{"name":"stata_save_dataset","description":"将当前内存中的数据集保存为 .dta 文件。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_scheme","description":"查询或设置 Stata 图形主题（scheme）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_set_cwd","description":"更改 Stata 的工作目录。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_snapshot","description":"会话内快照：保存 / 恢复 / 列出 / 删除当前内存数据集。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_status","description":"获取当前 Stata 会话状态。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_summarize","description":"计算变量的摘要统计量。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_tabulate","description":"创建频数分布表或交叉表。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_task_cancel","description":"请求取消一个运行中的后台任务。","write_action":true,"price_micros":0,"input_schema":null},{"name":"stata_task_list","description":"列出全部（含已结束的）后台任务。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_task_result","description":"获取后台任务的完整输出结果。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_task_status","description":"查询后台任务的状态与进度。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_test","description":"对上一个估计结果做 Wald 检验（test，后估计命令）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_ttest","description":"运行 t 检验（单样本 / 按组两样本 / 配对 / 非配对）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_uninstall_package","description":"卸载一个已安装的 Stata 扩展包（删除其 ado 文件）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_use_dataset","description":"加载 Stata 数据集 (.dta 文件) 到内存中。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_use_example","description":"加载 Stata 官方示例数据集（``sysuse`` / ``webuse``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_verify","description":"数据完整性检查（``count`` / ``assert`` / ``duplicates`` / ``isid`` / ``misstable``）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_xtreg","description":"运行面板数据回归（xtreg）。","write_action":false,"price_micros":0,"input_schema":null},{"name":"stata_xtset","description":"声明面板 / 时间序列结构（``xtset`` / ``tsset``）。","write_action":false,"price_micros":0,"input_schema":null}],"scan":{"score":88,"grade":"A","scanned_at":"2026-11-03T14:21:36.552Z","report":{"scannerVersion":"0.1.10","scannedAt":"2026-11-03T14:21:36.501Z","components":{"code":{"score":25,"max":25,"notes":["17 source files scanned"]},"reliability":{"score":-1,"max":20,"notes":["no gateway calls yet and no remote to probe"]},"poisoning":{"score":-1,"max":15,"notes":["tools not inspected (local package is not executed); not counted"]},"auth":{"score":12,"max":15,"notes":["local package, no credentials required"]},"maintenance":{"score":12,"max":15,"notes":["last push 65 days ago"]},"identity":{"score":8,"max":10,"notes":["registry namespace matches repository owner","GitHub account older than a year"]}},"findings":[],"inputs":{"packages":[{"registryType":"npm","identifier":"@aliveranme/stata-mcp","version":"1.0.10","found":true,"license":"MIT","hasInstallScripts":false,"dependencyCount":0,"publishedAt":"2026-08-16T22:10:14.506Z","weeklyDownloads":95}],"repo":{"found":true,"owner":"aliveranme","repo":"stata-mcp","archived":false,"pushedAt":"2026-08-30T20:25:11Z","stars":0,"forks":0,"openIssues":0,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/143232692?v=4","ownerCreatedAt":"2023-08-26T00:06:11Z","license":"MIT"},"icon":{"url":"https://avatars.githubusercontent.com/u/143232692?v=4&s=128","source":"registry"},"presence":{"stars":0,"forks":0,"downloadsWeek":95,"license":"MIT","lastPushAt":"2026-08-30T20:25:11.000Z","score":20}}}},"grade_history":[],"reviews":[]}