{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_hwa8cwnstmq8","handle":"stata-gui-mcp","url":"https://wellknown.network/agents/stata-gui-mcp","links":{"self":"https://wellknown.network/agents/stata-gui-mcp/record.json","html":"https://wellknown.network/agents/stata-gui-mcp","markdown":"https://wellknown.network/agents/stata-gui-mcp/record.md","api":"https://wellknown.network/api/v1/agents/stata-gui-mcp","status":"https://wellknown.network/api/v1/agents/stata-gui-mcp/status","claim":"https://wellknown.network/agents/stata-gui-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/stata-gui-mcp/claim.json","badge":"https://wellknown.network/agents/stata-gui-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/stata-gui-mcp/history","tools":"https://wellknown.network/api/v1/agents/stata-gui-mcp/tools"},"ard":{"identifier":"urn:air::server:stata-gui-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"stata-gui-mcp","summary":"Control the Stata GUI through MCP on Windows","description":"# Stata GUI MCP \n \n通过 Windows Stata Automation COM，让 Claude Code、Codex、OpenCode、Claude Desktop、Cursor 和 VS Code 控制**可见的 Stata GUI**，并把每次执行的真实 text log 自动返回给 AI。 \n \nA Windows MCP server that controls a **visible Stata GUI** through Stata Automation COM and automatically returns the real Stata text log for every execution. \n \n**[中文](#中文) | [English](#english)** \n \n![Stata GUI MCP Demo](https://github.com/shichengg/stata-mcp/releases/download/v1.0.0/demo.gif) \n \n--- \n \n## 中文 \n \n### 项目特点 \n \n- **真实 GUI**：命令在可见的 Stata GUI 中运行，而不是隐藏的 Python 模拟环境。 \n- **人工接管**：AI 执行后，用户可以直接在同一个 Stata 窗口中检查、修改和继续分析。 \n- **持久 Session**：同一个 `session_id` 复用同一个 Stata GUI；数据、宏、矩阵、估计结果和工作目录可继续使用。 \n- **自动返回结果**：运行若干行代码或完整 do 文件后，MCP 自动读取本次 text log 并返回给 AI。 \n- **完整代码块**：多行选择通过临时 do 文件整体执行，支持循环、程序定义和续行语法。 \n- **多任务窗口**：不同 `session_id` 可以维护不同的 Stata GUI 和项目日志。 \n- **项目本地记录**：session、do 文件和最新日志关系保存在项目的 `.stata-mcp/` 中。 \n- **不改原始脚本**：运行完整 do 文件时不会重写用户源文件。 \n- **pip 安装**：无需下载仓库或在 MCP 配置中填写源码路径。 \n \n### 适用范围 \n \n| 要求 | 说明 | \n|---|---| \n| 操作系统 | Windows 10/11 | \n| Stata | 已安装并获得授权的 Stata 17/18/19，MP、SE 或 BE 均可 | \n| Automation | Stata COM 接口已注册 | \n| Python | 3.10–3.13 | \n| MCP 传输 | 本地 stdio | \n \n本项目当前**不支持 macOS/Linux**，也不使用 PyStata、Stata CLI 或 batch 后端。pip 包只包含 MCP Python 代码，不包含 Stata 软件、许可证或第三方 ado 包。 \n \n## 安装 \n \n### 1. 安装 Python 包 \n \n在 PowerShell 中运行： \n \n```powershell \npip install stata-gui-mcp \n``` \n \npip 会同时安装 MCP Python SDK 和 Windows 所需的 `pywin32`。用户不需要克隆 GitHub 仓库。 \n \n### 2. 注册 Stata Automation \n \n以**管理员身份**打开 PowerShell，按实际安装路径运行： \n \n```powershell \nStart-Process -FilePath \"C:\\Program Files\\Stata18\\StataMP-64.exe\" -ArgumentList \"/Register\" -Wait \n``` \n \n常见可执行文件名包括： \n \n```text \nStataMP-64.exe \nStataSE-64.exe \nStataBE-64.exe \n``` \n \n请根据 Stata 版本、edition 和安装位置调整路径。不要直接在 Git Bash 中运行 `/Register`，因为 Git Bash 可能把它改写成文件路径。 \n \n正常启动时，MCP 直接调用已注册的 COM ProgID `stata.StataOLEApp`，不要求手工填写 Stata 安装路径。 \n \n## MCP 客户端配置 \n \n所有客户端都启动同一个本地 stdio 命令： \n \n```text \nstata-gui-mcp \n``` \n \n| 客户端 | 推荐方式 | 配置键/文件 | \n|---|---|---| \n| …","publisher":{"name":"shichengg","url":null},"homepage":"https://github.com/shichengg/stata-mcp","repository":"https://github.com/shichengg/stata-mcp","version":"1.1.0","license":null,"protocols":["mcp"],"tags":["stata","mcp","model-context-protocol","automation","econometrics"],"pricing":null,"endpoints":[{"url":"pypi:stata-gui-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"dev.version-control","name":"Version Control","confidence":0.745,"provenance":"derived"}],"categories":["dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"stata-gui-mcp","registry":"pypi","observedAt":"2026-11-04T01:24:54.657Z","publishedAt":"2026-08-29T13:37:05.820957Z","latestVersion":"1.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"stata-gui-mcp","url":"https://pypi.org/project/stata-gui-mcp/","firstSeenAt":"2026-09-10T13:19:36.612Z","fetchedAt":"2026-11-04T01:23:43.151Z","normalizedAt":"2026-11-04T01:23:43.151Z"}]},"firstSeenAt":"2026-09-10T13:19:36.612Z","updatedAt":"2026-11-04T01:24:54.657Z"}