# stata-code MCP server

> Enables AI agents to execute Stata commands, run empirical research models like DiD and IV, and retrieve structured, publication-ready results.

- Repository: https://github.com/brycewang-stanford/stata-code
- Page: https://hostedmcp.org/servers/brycewang-stanford/stata-code
- Transport: —
- Stars: 55
- License: MIT

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `STATA_CODE_COMMAND_POLICY` | no | no |  |
| `STATA_CODE_POLICY_ALLOW` | no | no |  |
| `STATA_CODE_POLICY_BLOCK` | no | no |  |
| `STATA_CODE_STATA_CLI` | no | no |  |

## FAQ

### How can I use this with Claude Code?

You can add it to Claude Code using the command: claude mcp add stata-code --scope user -- uvx --from "stata-code[mcp]" stata-code-mcp.
