Stata MCP Server

MCP-for-Stata: one-command install of a Stata MCP server for Claude Code, Codex, OpenClaw, and 7+ AI agents. Run Stata do-files through natural

Local serverstdioPython

What is the Stata MCP Server?

MCP-for-Stata: one-command install of a Stata MCP server for Claude Code, Codex, OpenClaw, and 7+ AI agents. Run Stata do-files through natural language.

What you get

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

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

Configuration and credentials

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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Stata MCP Server

{
  "mcpServers": {
    "stata-1": {
      "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 to Name.”
  • “Use Stata to Command.”
  • “Use Stata to Cross.”

Frequently asked questions

MCP-for-Stata: one-command install of a Stata MCP server for Claude Code, Codex, OpenClaw, and 7+ AI agents. Run Stata do-files through natural language. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.