Back to directory

mcp-for-stata

Maintenance: Active

sepinetam/mcp-for-stata

A MCP server for integrating Stata into your agent loop with a safety-first design.

View on GitHubHomepage
$ dsh plugin add mcp-for-stata

258

stars

36

forks

Python

Language

AGPL-3.0

License

2025-03-28

Created

2026-09-06

Last push

AGPL-3.0 MCP server that connects Stata to DeepSeek Harness as MCP tools — one-command install (`uvx stata-mcp install -c dsh`) with security guard, RAM monitoring and doctor-based setup checks.

DSH integration

Compatible

Author-claimed

Safety audit

Unaudited

Last verified

2026-08-21

License

AGPL-3.0

01What can it help you accomplish?

  • 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

02How to install into DeepSeek Harness

Prerequisites

  • 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

Installation steps

  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

Verify the integration

  • 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 integration and capability boundaries

DSH integrationCompatible

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

04Who is it for? When not to use it?

Good for

  • 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

Not for

  • 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.

05Compatibility, maintenance and safety notes

  • 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)

06Frequently asked questions

How do I connect MCP-for-Stata to DeepSeek Harness?

Run `uvx stata-mcp install -c dsh`. The project ships DeepSeek Harness Day 0 support with a dedicated guide, and the installer writes the MCP configuration automatically — no manual JSON editing.

Is the DeepSeek Harness integration native or via MCP?

Via MCP: MCP-for-Stata is a standalone MCP server launched through `uvx stata-mcp`, and the one-command installer registers it inside DeepSeek Harness like it does for Claude Code, Codex, OpenClaw and other agents.

What prerequisites do I need?

uv (the package installer), a validly licensed copy of Stata installed at the default path (the Stata CLI must exist on macOS/Linux), an agent such as DeepSeek Harness, and your LLM API key.

What safety protections are built in?

A security guard blocks dangerous Stata commands (`!`, `shell`, `erase`, etc.), and RAM monitoring prevents memory exhaustion with configurable limits. Data access boundaries are configurable, and logs are captured automatically.

How can I verify that my setup works?

Run `uvx stata-mcp doctor`. It displays device information and checks your setup — OS, Python, uv, dependencies, Stata CLI, config, guard and PyPI reachability — reporting pass/fail for each item.

08Data and sources

  • Author-claimedgithub.come5b25dc90058…

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

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-08-21. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.