返回目录

mcp-for-stata

维护状态: 活跃

sepinetam/mcp-for-stata

将 Stata 接入智能体的 MCP 服务器,支持计量经济学与社会科学实证研究。

前往 GitHub项目主页
$ dsh plugin add mcp-for-stata

258

星标

36

Fork

Python

语言

AGPL-3.0

许可证

2025-03-28

创建于

2026-09-06

最近推送

AGPL-3.0 开源的 Stata MCP server,一条命令 `uvx stata-mcp install -c dsh` 即可接入 DeepSeek Harness 作为 mcp tools 使用,自带安全守卫、内存监控与 doctor 环境检查。

DSH 适配

兼容

作者声明

安全审计

未审计

最后核验

2026-08-21

许可证

AGPL-3.0

01它能帮你完成什么?

  • Let the DeepSeek Harness agent drive Stata on your local machine for econometric and empirical analysis

    Stata do-file execution with automatic log capture, regression / empirical results, plus paper replication, hypothesis testing and result interpretation workflows

    Social-science and economics researchers who run DeepSeek Harness (dsh) and hold a licensed Stata installation

  • Register Stata as an MCP server for dsh with a single command — no manual JSON config

    A working stata-mcp MCP server inside DeepSeek Harness, ready for the agent to call Stata tools

    Researchers and developers who want Stata MCP tools in DeepSeek Harness without hand-editing MCP configuration files

02如何接入 DeepSeek Harness?

前置条件

  • uv — package installer and virtual environment manager
  • DeepSeek Harness (dsh) or another supported agent
  • A licensed copy of Stata installed at the default path (the Stata CLI must exist on macOS and Linux)
  • Your API-KEY from an LLM provider

安装步骤

  1. 01

    Install MCP-for-Stata into DeepSeek Harness: `uvx stata-mcp install -c dsh`

  2. 02

    Or install for every supported client at once: `uvx stata-mcp install --all`

  3. 03

    If uv is missing, install it via the uv guide or the project's install script (`install.sh` on macOS/Linux, `install.ps1` on Windows), which auto-installs uv

验证接入成功

  • Run `uvx stata-mcp doctor` — it displays basic information about your device and checks whether your setup is supported (OS, Python, uv, Stata CLI, config, guard, PyPI reachability)

03DSH 适配与能力边界

DSH 适配兼容

Installed inside DeepSeek Harness as an MCP server via the one-command installer (`uvx stata-mcp install -c dsh`), exposing Stata execution as MCP tools to the dsh agent

  • Agent-driven Stata execution

    natural-language analysis requests from the dsh agentStata do-file execution via subprocess with automatic log capture and error reporting

    invokes Stata on your local device and executes generated do-filescaptures logs automatically
  • Security guard & RAM monitoring

    every Stata command issued through the MCP toolsdangerous commands (`!`, `shell`, `erase`, etc.) blocked before execution; memory exhaustion prevented with configurable RAM limits

  • Data handlers & log readers

    CSV, DTA, XLSX, SPSS datasets and Stata logsstructured data access across these formats plus text and SMCL log reading

  • One-command multi-agent installer + doctor check

    `uvx stata-mcp install -c <client>` or `--all`MCP config written for the chosen agent(s); `uvx stata-mcp doctor` reports whether the setup is supported

    writes MCP configuration files for the target agentdownloads the stata-mcp package from PyPI via uvx

04适合谁?何时不该用?

适合

  • Social-science and economics researchers who run DeepSeek Harness (dsh) and hold a licensed Stata installation
  • Researchers and developers who want Stata MCP tools in DeepSeek Harness without hand-editing MCP configuration files

不适合

  • A licensed copy of Stata from StataCorp is mandatory — the project does not distribute Stata software, so users must independently purchase and install it, and the README lists 'Stata License' as a prerequisite.
  • The standard config assumes Stata is installed at the default path, and on macOS/Linux the Stata CLI must exist on the system; non-default setups need manual env configuration.

05兼容性、维护与安全提示

  • A licensed copy of Stata from StataCorp is mandatory — the project does not distribute Stata software, so users must independently purchase and install it, and the README lists 'Stata License' as a prerequisite.
  • The standard config assumes Stata is installed at the default path, and on macOS/Linux the Stata CLI must exist on the system; non-default setups need manual env configuration.
  • Installation downloads stata-mcp from PyPI through uvx, so it needs network access; package downloads can be slow or fail in some regions (a troubleshooting doc is referenced for China).
2025-03-282026-08-14v1.22.0

AGPL-3.0 · actively maintained (latest release v1.22.0, 2026-08-13)

06常见问题

MCP-for-Stata 如何接入 DeepSeek Harness?

运行 `uvx stata-mcp install -c dsh` 即可。项目提供 DeepSeek Harness Day 0 支持和专门的接入指南,安装器会自动写好 MCP 配置,无需手动编辑 JSON。

与 DeepSeek Harness 的集成是原生还是 MCP?

通过 MCP:MCP-for-Stata 是一个独立的 MCP server,由 `uvx stata-mcp` 启动,一条命令安装器把它注册进 DeepSeek Harness,和 Claude Code、Codex、OpenClaw 等其他 agent 的接入方式一致。

需要哪些前置条件?

uv 包管理器、一份安装在默认路径的正版 Stata(macOS/Linux 需要存在 Stata CLI)、DeepSeek Harness 等任一 agent,以及你的 LLM API key。

内置了哪些安全防护?

安全守卫会在执行前拦截危险 Stata 命令(如 `!`、`shell`、`erase`),RAM 监控以可配置的上限防止内存耗尽;数据访问边界可配置,日志会被自动捕获。

如何验证安装是否成功?

运行 `uvx stata-mcp doctor`,它会显示设备基本信息并逐项检查系统、Python、uv、依赖、Stata CLI、配置、安全守卫与 PyPI 连通性,输出通过/失败结果。

08数据与来源

  • 作者声明github.come5b25dc90058…

    🚀 **DeepSeek Harness Day 0 Support**: Install MCP-for-Stata in DeepSeek Harness with `uvx stata-mcp install -c dsh`.

页面基于项目公开文档、仓库元数据和 DSH Plugins 的结构化解析生成;最后核验于 2026-08-21。发现错误?提交更正。

🏆

最佳 DeepSeek Harness 插件

从全目录挑出的 12 个值得优先安装的插件,覆盖各个分类。

DSH Plugins 是独立的 DeepSeek Harness 插件市场,与 DeepSeek 官方无关,也不代表官方背书。第三方插件未经安全审计,安装前请审查源码。

每周获取最新的 DeepSeek Harness 插件,绝不滥发。