Stata MCP Server

Enable Claude Code, Codex, OpenClaw, and other AI agents to safely invoke Stata on your local device for data analysis.

Local serverstdioPython

What is the Stata MCP MCP server?

Enable Claude Code, Codex, OpenClaw, and other AI agents to safely invoke Stata on your local device for data analysis. The stata mcp mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 14 defined tools rather than through you.

What it actually does

  • Security Guard — Blocks dangerous commands (!, shell, erase, etc.)
  • RAM Monitoring — Prevents memory exhaustion with configurable limits
  • Layered Configuration — User, project, environment, and Linux system config support
  • Beta async stata_do execution — Supports concurrent MCP calls for multi-client workflows
  • Configurable data access boundaries — Data info URL guard and optional direct read_log boundary
  • Cross-platform support (macOS, Windows, Linux)

Its toolset

Everything the assistant can do here goes through one of these:

  • Name — stata-mcp
  • Command — ~/.local/bin/stata-mcp
  • Cross — platform support (macOS, Windows, Linux)
  • Agent — Tag
  • Cursor — cursor
  • OpenCode — opencode
  • OpenClaw — openclaw
  • FeatureMCP-for-Stata (this)
  • Agents — All
  • Type — MCP Server + CLI toolkit
  • Execution — do-file via subprocess
  • Safety — Command guard + RAM monitor

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at stata-mcp on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Configuration

  • uv - Package installer and virtual environment manager - Claude Code, Codex, OpenClaw or other Agents - Stata License - Your API-KEY from LLM If you want to check whether your device is supported, you can run: It displays basic information about your device and checks whether your setup is supported. Example output >

When to reach for it

Plenty of monitoring and observability servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Stata MCP's toolset — Name, Command, Cross and 11 more — is a fair guide to whether it matches your workflow. It is maintained by SepineTam; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Stata MCP.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the stata mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
Namestata-mcp
Command~/.local/bin/stata-mcp
Crossplatform support (macOS, Windows, Linux)
AgentTag
Cursorcursor
OpenCodeopencode
OpenClawopenclaw
Feature[MCP-for-Stata](https://aidea-labs.com/mcp-for-stata) (this)
AgentsAll
TypeMCP Server + CLI toolkit
Executiondo-file via subprocess
SafetyCommand guard + RAM monitor
LogsText + SMCL readers
Graphs

How to install the Stata MCP MCP server

{
  "mcpServers": {
    "stata": {
      "command": "uvx",
      "args": ["stata-mcp"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • uv - Package installer and virtual environment manager - Claude Code, Codex, OpenClaw or other Agents - Stata License - Your API-KEY from LLM If you want to check whether your device is supported, you can run: It displays basic information about your device and checks whether your setup is supported. Example output >

Example prompts to try

  • Use Stata MCP to Name.
  • Use Stata MCP to Command.
  • Use Stata MCP to Cross.

Frequently asked questions

It connects Stata MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Name, Command, Cross, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Stata MCP directly.