Control the Stata GUI through MCP on Windows
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"stata-gui-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# Stata GUI MCP 通过 Windows Stata Automation COM,让 Claude Code、Codex、OpenCode、Claude Desktop、Cursor 和 VS Code 控制**可见的 Stata GUI**,并把每次执行的真实 text log 自动返回给 AI。 A Windows MCP server that controls a **visible Stata GUI** through Stata Automation COM and automatically returns the real Stata text log for every execution. **[中文](#中文) | [English](#english)**  --- ## 中文 ### 项目特点 - **真实 GUI**:命令在可见的 Stata GUI 中运行,而不是隐藏的 Python 模拟环境。 - **人工接管**:AI 执行后,用户可以直接在同一个 Stata 窗口中检查、修改和继续分析。 - **持久 Session**:同一个 `session_id` 复用同一个 Stata GUI;数据、宏、矩阵、估计结果和工作目录可继续使用。 - **自动返回结果**:运行若干行代码或完整 do 文件后,MCP 自动读取本次 text log 并返回给 AI。 - **完整代码块**:多行选择通过临时 do 文件整体执行,支持循环、程序定义和续行语法。 - **多任务窗口**:不同 `session_id` 可以维护不同的 Stata GUI 和项目日志。 - **项目本地记录**:session、do 文件和最新日志关系保存在项目的 `.stata-mcp/` 中。 - **不改原始脚本**:运行完整 do 文件时不会重写用户源文件。 - **pip 安装**:无需下载仓库或在 MCP 配置中填写源码路径。 ### 适用范围 | 要求 | 说明 | |---|---| | 操作系统 | Windows 10/11 | | Stata | 已安装并获得授权的 Stata 17/18/19,MP、SE 或 BE 均可 | | Automation | Stata COM 接口已注册 | | Python | 3.10–3.13 | | MCP 传输 | 本地 stdio | 本项目当前**不支持 macOS/Linux**,也不使用 PyStata、Stata CLI 或 batch 后端。pip 包只包含 MCP Python 代码,不包含 Stata 软件、许可证或第三方 ado 包。 ## 安装 ### 1. 安装 Python 包 在 PowerShell 中运行: ```powershell pip install stata-gui-mcp ``` pip 会同时安装 MCP Python SDK 和 Windows 所需的 `pywin32`。用户不需要克隆 GitHub 仓库。 ### 2. 注册 Stata Automation 以**管理员身份**打开 PowerShell,按实际安装路径运行: ```powershell Start-Process -FilePath "C:\Program Files\Stata18\StataMP-64.exe" -ArgumentList "/Register" -Wait ``` 常见可执行文件名包括: ```text StataMP-64.exe StataSE-64.exe StataBE-64.exe ``` 请根据 Stata 版本、edition 和安装位置调整路径。不要直接在 Git Bash 中运行 `/Register`,因为 Git Bash 可能把它改写成文件路径。 正常启动时,MCP 直接调用已注册的 COM ProgID `stata.StataOLEApp`,不要求手工填写 Stata 安装路径。 ## MCP 客户端配置 所有客户端都启动同一个本地 stdio 命令: ```text stata-gui-mcp ``` | 客户端 | 推荐方式 | 配置键/文件 | |---|---|---| | …
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.