# MCP-for-Stata

> Run local Stata analysis through an AI agent.

- **URL**: https://followmcp.com/en/servers/mcp-for-stata
- **Category**: Other
- **Origin**: Community
- **Stars**: 285
- **FMRS Score**: 52/100 (Grade D)
- **Source**: https://github.com/SepineTam/mcp-for-stata
- **Transports**: stdio (local process)
- **Runtimes**: Python
- **Auth**: API key / credential required

## Overview
MCP-for-Stata (Stata-MCP) is an open-source MCP server and CLI tool that lets AI agents invoke Stata on the user's device for regression analysis, econometrics, paper replication, and empirical research. It provides command guards, resource monitoring, and automatic log capture. Users must install Stata and hold a valid license. The project is licensed under AGPL-3.0 and is independent of, and not endorsed by, StataCorp.

## Best for
- Econometrics, social science, and empirical research users who want an AI agent to run local Stata
- Stata users who want command guards and automatic log capture in their research workflow

## Not for
- Users without an installed copy of Stata and a valid license
- Users who require cloud Stata execution or graph export; the supplied material does not establish that this server provides those capabilities

## Required permissions
- Needs to invoke the local Stata command-line program and run analyses on the device
- Needs access to the configured working directory and the data and files used for analysis
- The AI client requires its own API key; the manifest declares no server environment variables

## Risks
- Stata code run by an AI agent may read or change data and files in the working directory; command guards aim to block some dangerous commands but do not establish zero risk
- The README describes previously fixed security vulnerabilities; check the version in use and its security fixes
- Analysis depends on the local Stata installation, license, and configuration

## Client config (JSON)
```json
{"mcpServers":{"stata-mcp":{"command":"uvx","args":["stata-mcp"]}}}
```
